Instructions to use Sumitc13/sarvam-30b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Sumitc13/sarvam-30b-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Sumitc13/sarvam-30b-GGUF", filename="sarvam-30B-Q4_K_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use Sumitc13/sarvam-30b-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Sumitc13/sarvam-30b-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Sumitc13/sarvam-30b-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Sumitc13/sarvam-30b-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Sumitc13/sarvam-30b-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Sumitc13/sarvam-30b-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Sumitc13/sarvam-30b-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Sumitc13/sarvam-30b-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Sumitc13/sarvam-30b-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Sumitc13/sarvam-30b-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Sumitc13/sarvam-30b-GGUF with Ollama:
ollama run hf.co/Sumitc13/sarvam-30b-GGUF:Q4_K_M
- Unsloth Studio new
How to use Sumitc13/sarvam-30b-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Sumitc13/sarvam-30b-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Sumitc13/sarvam-30b-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Sumitc13/sarvam-30b-GGUF to start chatting
- Pi new
How to use Sumitc13/sarvam-30b-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Sumitc13/sarvam-30b-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Sumitc13/sarvam-30b-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Sumitc13/sarvam-30b-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Sumitc13/sarvam-30b-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Sumitc13/sarvam-30b-GGUF:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use Sumitc13/sarvam-30b-GGUF with Docker Model Runner:
docker model run hf.co/Sumitc13/sarvam-30b-GGUF:Q4_K_M
- Lemonade
How to use Sumitc13/sarvam-30b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Sumitc13/sarvam-30b-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.sarvam-30b-GGUF-Q4_K_M
List all available models
lemonade list
llm.create_chat_completion(
messages = "No input example has been defined for this model task."
)sarvam-30b-GGUF
GGUF quantizations of sarvamai/sarvam-30b for use with llama.cpp.
Compatibility: These GGUFs use the
bailingmoe2architecture. Make sure you're on a recent version of llama.cpp (or any tool that bundles llama.cpp like LM Studio / Ollama / koboldcpp) for full tokenizer support across English + 22 Indian languages.
Available Quantizations
| File | Quant | Size | BPW | Description |
|---|---|---|---|---|
sarvam-30B-full-BF16.gguf |
BF16 | ~64 GB | 16.00 | Full precision, no quantization |
sarvam-30B-Q8_0.gguf |
Q8_0 | ~34 GB | 8.50 | Highest quality quantization |
sarvam-30B-Q6_K.gguf |
Q6_K | ~26 GB | 6.57 | Great quality, fits in 32GB VRAM |
sarvam-30B-Q4_K_M.gguf |
Q4_K_M | ~19 GB | 4.87 | Good balance of quality and size |
Model Details
- Architecture:
SarvamMoEForCausalLMโ converted asbailingmoe2(the architectures are equivalent; Sarvam uses full rotary and zero-mean normalized expert bias, handled at conversion time) - Parameters: ~30B total
- Layers: 19 (1 dense FFN + 18 MoE)
- Experts: 128 routed (top-6 routing) + 1 shared expert
- Gating: Sigmoid with zero-mean normalized expert bias,
routed_scaling_factor=2.5 - Attention: GQA with 64 heads, 4 KV heads, head_dim=64, combined QKV with QK RMSNorm
- Activation: SwiGLU
- Normalization: RMSNorm (eps=1e-6)
- Vocab size: 262,144
- Context length: up to 131,072 (model trained context); chat templates use 16,384 by default
- RoPE theta: 8,000,000
- Tokenizer: SentencePiece-style BPE, supports English + 22 Indian languages with byte fallback
Tokenizer parity
Verified 50/50 probes match Hugging Face reference tokenizer exactly across: English, Hindi, Bengali, Tamil, Telugu, Marathi, Gujarati, Kannada, Malayalam, Punjabi, Odia, Assamese, Urdu, Sindhi, Nepali, Sanskrit, Maithili, Konkani, Manipuri, Bodo, Santali, Kashmiri, Dogri, plus mixed-script and edge-case probes.
Usage
# Interactive chat
llama-cli -m sarvam-30B-Q6_K.gguf -p "Hello, how are you?" -n 512 -ngl 99
# Server mode (use --jinja for the embedded chat template)
llama-server -m sarvam-30B-Q6_K.gguf -ngl 99 -c 16384 --jinja
Thinking mode
The model supports enable_thinking via the chat template. When using llama-server --jinja:
curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{
"messages": [{"role": "user", "content": "What is 25 * 37?"}],
"max_tokens": 1024,
"chat_template_kwargs": {"enable_thinking": true}
}'
Note:
enable_thinking=falseadds the<|nothink|>token but the base model may still emit<think>...</think>(upstream model issue, see sarvamai/sarvam-30b#11).reasoning_effortis not in the public chat template and is silently ignored.
VRAM Requirements
| Quant | Full GPU Offload | Partial Offload (24GB) |
|---|---|---|
| Q4_K_M | ~19 GB | All layers on GPU |
| Q6_K | ~26 GB | All layers on GPU (32GB cards) |
| Q8_0 | ~34 GB | ~70% layers on GPU (32GB cards) |
| BF16 | ~64 GB | ~50% layers on GPU (32GB cards) |
Tested On
- NVIDIA RTX 5090 (32GB VRAM), CUDA 13.0
- All quantizations produce coherent output across English and Indian languages
- Q6_K runs at ~305 tokens/sec generation speed
Credits
- Downloads last month
- 1,561
4-bit
6-bit
8-bit
16-bit
Model tree for Sumitc13/sarvam-30b-GGUF
Base model
sarvamai/sarvam-30b
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Sumitc13/sarvam-30b-GGUF", filename="", )