CoolFace
Modelpublic

tifin-india/sarvam-m-24b-q4-k-m-gguf

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
1likes56downloads
Model Card

sarvam-m-24b - Q4KM GGUF

This repository contains the Q4_K_M quantized version of sarvam-m-24b in GGUF format.

Model Details

  • —Quantization: Q4KM
  • —File Size: ~13.3GB
  • —Description: Medium Q4 model with balanced quality/size
  • —Format: GGUF (compatible with llama.cpp)

Usage

With llama.cpp

bash
# Download the model
huggingface-cli download tifin-india/sarvam-m-24b-q4_k_m-gguf

# Run inference
./main -m sarvam-m-24b-Q4_K_M.gguf -p "Your prompt here"

With Python (llama-cpp-python)

python
from llama_cpp import Llama

# Load the model
llm = Llama(
    model_path="./sarvam-m-24b-Q4_K_M.gguf",
    n_ctx=2048,  # Context length
    n_gpu_layers=35,  # Adjust based on your GPU
    verbose=False
)

# Generate text
response = llm("Your prompt here", max_tokens=100)
print(response['choices'][0]['text'])

With Transformers + AutoGGUF

python
from transformers import AutoTokenizer
from auto_gptq import AutoGPTQForCausalLM

model_name = "tifin-india/sarvam-m-24b-q4_k_m-gguf"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoGPTQForCausalLM.from_quantized(model_name)

Performance Characteristics

AspectRating
Speed⭐⭐⭐
Quality⭐⭐⭐
Memory⭐⭐⭐

Original Model

This is a quantized version of the original model. For the full-precision version and more details, please refer to the original model repository.

Quantization Details

This model was quantized using llama.cpp's quantization tools. The Q4KM format provides a good balance of model size, inference speed, and output quality for most use cases.

License

This model follows the same license as the original model (Apache 2.0).

Citation

If you use this model, please cite the original model authors and acknowledge the quantization.