An 8-bit GGUF of Sarvam-105B for llama.cpp, converted from Sarvam's official FP32 weights. Q8_0 normally stays very close to the original weights. It is the source of our 2-bit and 1-bit versions, Aaravomega/sarvam-105b-GGUF-IQ2_M-IQ1_M (37.3 GB and 27.1 GB). For the smaller Sarvam-30B, see Aaravomega/sarvam-30b-GGUF-IQ2_M-IQ1_M.
| File | Size | Bits per weight |
|---|---|---|
Q8_0/ (3 parts) |
112.7 GB | 8.5 |
You need a recent llama.cpp build (tested with release b11731) and about 120 GB of free memory, in RAM or split between GPU and RAM.
hf download Aaravomega/sarvam-105b-GGUF-Q8_0 --include "Q8_0/*" --local-dir .
llama-server -m Q8_0/sarvam-105b-Q8_0-00001-of-00003.gguf -c 16384 --jinja
Point llama.cpp at the first part; it loads the other two itself. Sarvam-105B is a reasoning model that thinks before it answers, so allow plenty of output tokens: Sarvam's own benchmarks allow up to 65,536.
sarvamai/sarvam-105b-ggufSarvam-105B uses the same architecture as DeepSeek-V3 (multi-head latent attention, 128 experts with 8 active plus 1 shared), and llama.cpp runs it as deepseek2. Its config names some settings differently from DeepSeek's, and two of them are lost when it is converted with llama.cpp's DeepSeek path, as in Sarvam's own GGUF. This conversion sets them explicitly:
| Setting | What Sarvam-105B's own code does | sarvamai/sarvam-105b-gguf |
This repo |
|---|---|---|---|
| Expert routing | Sigmoid scores plus a per-expert bias, top 8 renormalised, times 2.5 (MoEGate in modeling_sarvam_moe.py) |
No expert_gating_func key, so llama.cpp falls back to softmax for deepseek2 |
expert_gating_func = sigmoid |
| Position encoding | DeepSeek-V3's YaRN (deepseek_yarn): factor 40 from 4,096 positions, with attention scaled by (0.1 · ln 40 + 1)² ≈ 1.87 |
No rope.scaling keys (llama.cpp's converter skips the unknown type name), so plain RoPE and unscaled attention |
rope.scaling.type = yarn, factor 40, original context 4,096 |
The tokenizer is also stored differently: Sarvam's file uses llama.cpp's SentencePiece-style llama tokenizer, while this one uses BPE with the sarvam-moe pre-tokenizer, as llama.cpp does for Sarvam-30B, whose tokenizer files are identical. Both tokenize our test text exactly as Sarvam's Hugging Face tokenizer does, so this difference does not seem to matter.
Perplexity on 8 passages of 512 tokens each (lower is better):
| File | English (wikitext-2) | Hindi (Wikipedia) |
|---|---|---|
sarvamai/sarvam-105b-gguf (Q4_K_M), as published |
8.93 | 14.82 |
| The same file, with the two settings corrected | 4.50 | 10.70 |
| This file (Q8_0) | 4.40 | 10.34 |
Run as published, Sarvam's GGUF has nearly twice the perplexity in English and 38% more in Hindi than it does with the right settings.
It shows in answers too. On 100 random MMLU test questions, asked the way Sarvam benchmarks (thinking on, temperature 1.0, here with up to 16,384 tokens per answer):
| File | MMLU | Empty or gibberish answers |
|---|---|---|
sarvamai/sarvam-105b-gguf (Q4_K_M), as published |
42% | 30 of 100 |
| The same file, with the two settings corrected | 88% | 0 |
| Our 2-bit IQ2_M, made from this file | 89% | 0 |
| Sarvam's published score for the full model | 90.6 |
As published, the model's thinking often dissolves into word salad and never reaches an answer. If you use Sarvam's file, you can correct it at load time by adding this option to llama-server or llama-cli (one --override-kv with comma-separated values; recent llama.cpp warns that repeating the option is deprecated):
--override-kv deepseek2.expert_gating_func=int:2,deepseek2.rope.scaling.type=str:yarn,deepseek2.rope.scaling.factor=float:40,deepseek2.rope.scaling.original_context_length=int:4096
YaRN matters most. On this file, turning off only YaRN raises perplexity by 72% in English and 19% in Hindi; switching only the router to softmax raises it by 4% and 6%. Each figure has a margin of error of about ±5%, but every run scores the same text, so differences this large are not noise.
convert_hf_to_gguf.py from llama.cpp, with a small addition that registers SarvamMLAForCausalLM as a DeepSeek-V2-family model: it maps Sarvam's config names (num_experts, num_shared_experts), sets the sigmoid router and YaRN, types the byte tokens, and leaves the start token to the chat template. Weights were written straight to Q8_0 from FP32. No training or fine-tuning.
Sarvam-105B is by Sarvam AI, released under Apache 2.0, which also covers these files.
Q8_0/sarvam-105b-Q8_0-00002-of-00003.gguf 42 GiBQ8_0/sarvam-105b-Q8_0-00001-of-00003.gguf 41 GiBQ8_0/sarvam-105b-Q8_0-00003-of-00003.gguf 22 GiB