Modeltext-generation
sarvamai

sarvamai/sarvam-105b

!image(https://cdn-uploads.huggingface.co/production/uploads/60270a7c32856987162c641a/j1SbA6V6HixP1-6H0N41q.png) Want a smaller model? Download Sarvam-30B(https://huggingface.co/sarvamai/sarvam-30b/)! Index 1. Introduction(introduction) 2. Architectu...

329likes
3.2kdownloads
4views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: doi

#1 Repository of the month

1
TINIX TRENDING·Topic: sarvam_mla

#1 Repository of the month

1
TINIX TRENDING·Topic: kok

#1 Repository of the month

image

Want a smaller model? Download Sarvam-30B!

Index

  1. Introduction
  2. Architecture
  3. Benchmarks
    • Knowledge & Coding
    • Reasoning & Math
    • Agentic
  4. Inference
  5. Footnote
  6. Citation

Introduction

Sarvam-105B is an advanced Mixture-of-Experts (MoE) model with 10.3B active parameters, designed for superior performance across a wide range of complex tasks. It is highly optimized for complex reasoning, with particular strength in agentic tasks, mathematics, and coding.

Sarvam-105B is a top-tier performer, consistently matching or surpassing several major closed-source models and staying within a narrow margin of frontier models across diverse reasoning and agentic benchmarks. It demonstrates exceptional agentic and reasoning capabilities in real-world applications such as web search and technical troubleshooting.

A major focus during training was the Indian context and languages, resulting in state-of-the-art performance across 22 Indian languages for its model size.

Sarvam-105B is open-sourced under the Apache License. For more details, see our blog.

Architecture

The 105B model adopts an MLA-style attention stack with decoupled QK head dimensions (q_head_dim=192 split into RoPE and noPE components, v_head_dim=128) and a large head_dim of 576, enabling higher representational bandwidth per head while keeping the hidden size at 4096. This approach improves attention expressivity and long-context extrapolation (via YaRN scaling with a factor of 40 and 128K context). It has an intermediate_size (16384) and moe_intermediate_size (2048), combined with top-8 routing over 128 experts, which increases per-token active capacity while keeping activation cost manageable. The model has one shared expert, a routed scaling factor of 2.5, and auxiliary-loss-free router balancing.

Benchmarks

Knowledge & Coding
BenchmarkSarvam-105BGLM-4.5-AirGPT-OSS-120BQwen3-Next-80B-A3B-Thinking
Math50098.697.297.098.2
Live Code Bench v671.759.572.368.7
MMLU90.687.390.090.0
MMLU Pro81.781.480.882.7
Writing Bench80.583.886.584.6
Arena Hard v271.068.188.568.2
IF Eval84.883.585.488.9
Reasoning & Math
BenchmarkSarvam-105BGLM-4.5-AirGPT-OSS-120BQwen3-Next-80B-A3B-Thinking
GPQA Diamond78.775.080.177.2
AIME 25 (w/ Tools)88.3 (96.7)83.390.087.8
Beyond AIME69.161.551.068.0
HMMT (Feb 25)85.869.290.073.9
HMMT (Nov 25)85.875.090.080.0
Agentic
BenchmarkSarvam-105BGLM-4.5-AirGPT-OSS-120BQwen3-Next-80B-A3B-Thinking
BrowseComp49.521.3-38.0
SWE Bench Verified (SWE-Agent Harness)45.057.650.660.9
τ² Bench (avg.)68.353.265.855.0

See footnote for evaluation details.

Inference

Huggingface
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig

model_name = "sarvamai/sarvam-105b"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True, device_map="auto")

def generate_text(
    prompt: str,
    max_new_tokens: int = 2048,
    temperature: float = 0.8,
    top_p: float = 0.95,
    repetition_penalty: float = 1.0,
) -> None:
    inputs = tokenizer(prompt, return_tensors="pt").to("cuda:0")

    generation_config = GenerationConfig(
        max_new_tokens=max_new_tokens,
        repetition_penalty=repetition_penalty,
        temperature=temperature,
        top_p=top_p,
        do_sample=True,
    )

    with torch.no_grad():
        output_ids = model.generate(
            input_ids=inputs["input_ids"],
            attention_mask=inputs["attention_mask"],
            generation_config=generation_config,
        )
    return tokenizer.decode(output_ids[0], skip_special_tokens=True)

prompts = [
    "Which country won the FIFA World Cup in 2012?",
]

for prompt in prompts:
    templated_prompt = tokenizer.apply_chat_template(
      [{"role": "user", "content": prompt}],
      tokenize=False,
      add_generation_prompt=True,
      enable_thinking=True
    )
    output = generate_text(templated_prompt, max_new_tokens=512)
    print("Prompt: ", prompt)
    print("Generated text: ", output)
    print("=" * 100)
SGLang

Install latest SGLang from source

git clone https://github.com/sgl-project/sglang.git
cd sglang
pip install -e "python[all]"

Instantiate model and Run

import sglang as sgl
from transformers import AutoTokenizer

model_path = "sarvamai/sarvam-105b"
engine = sgl.Engine(
    model_path=model_path,
    tp_size=4,
    mem_fraction_static=0.70,
    trust_remote_code=True,
    dtype="bfloat16",
    moe_runner_backend="flashinfer_cutedsl",
    prefill_attention_backend="fa3",
    decode_attention_backend="flashmla",
    disable_radix_cache=False,
)

sampling_params = {
    "temperature": 0.8,
    "max_new_tokens": 2048,
    "repetition_penalty": 1.0,
}

prompts = [
    "Which band released the album Dark Side of the Moon in 1973?",
]

outputs = engine.generate([
    tokenizer.apply_chat_template([
        {"role": "user", "content": prompt}],
        tokenize=False,
        add_generation_prompt=True,
        enable_thinking=True)
        for prompt in prompts], 
    sampling_params)
for p, o in zip(prompts, outputs):
    print("Prompt: ", p)
    print("Generated text: ", o['text'])
    print("=" * 100)
vLLM

Note: currently a PR is open for native support for the Sarvam models in vLLM (link). Therefore, we have 2 options here.

Option 1: install from source (hard)

  • Use the custom fork here: link
  • Follow the instructions here to install from source: link

Option 2: hot-patch (easy)

  • Run hotpatch_vllm.py
  • This will do the following:
    • install vllm=0.15.0
    • add 2 model entries to registry.py
    • download the model executors for sarvam-105b and sarvam-30b

Once this is done, you can run vLLM as usual

from vllm import LLM, SamplingParams
from transformers import AutoTokenizer

model_path = "sarvamai/sarvam-105b"
tokenizer = AutoTokenizer.from_pretrained(model_path)
llm = LLM(model=model_path, 
            trust_remote_code=True, 
            max_model_len=2048, 
            tensor_parallel_size=8, 
            max_num_seqs=16,
        )
sampling_params = SamplingParams(
                    temperature=0.8, 
                    max_tokens=2048, 
                    repetition_penalty=1.0,
                    spaces_between_special_tokens=True
                )

prompts = [
    "Which artist painted The Persistence of Memory (the melting clocks)?",
]

outputs = llm.generate([
    tokenizer.apply_chat_template([
        {"role": "user", "content": prompt}],
        tokenize=False,
        add_generation_prompt=True,
        enable_thinking=True)
        for prompt in prompts], 
    sampling_params)
for p, o in zip(prompts, outputs):
    print("Prompt: ", p)
    print("Generated text: ", o.outputs[0].text)
    print("=" * 100)

Footnote

  • General settings: All benchmarks are evaluated with a maximum context length of 65,536 tokens.
  • Reasoning & Math benchmarks (Math500, MMLU, MMLU Pro, GPQA Diamond, AIME 25, Beyond AIME, HMMT): Evaluated with temperature=1.0, top_p=1.0, max_new_tokens=65536.
  • Coding & Knowledge benchmarks (Live Code Bench v6, Arena Hard v2, IF Eval): Evaluated with temperature=1.0, top_p=1.0, max_new_tokens=65536.
  • Writing Bench: Responses generated using official Writing-Bench parameters: temperature=0.7, top_p=0.8, top_k=20, max_length=16000. Scoring performed using the official Writing-Bench critic model with: temperature=1.0, top_p=0.95, max_length=2048.
  • Agentic benchmarks (BrowseComp, SWE Bench Verified, τ² Bench): Evaluated with temperature=0.5, top_p=1.0, max_new_tokens=32768.

Citation

@misc{sarvam_sovereign_models,
  title        = {Introducing Sarvam's Sovereign Models},
  author       = {{Sarvam Foundation Models Team}},
  year         = {2026},
  howpublished = {\url{https://www.sarvam.ai/blogs/sarvam-30b-105b}},
  note         = {Accessed: 2026-03-03}
}

Similar Projects

Discover other similar projects and AI models.

Modeltext-generation
bigscience/bloom

BigScience Large Open-science Open-access Multilingual Language Model Version 1.3 / 6 July 2022 Current Checkpoint: Training Iteration 95000 Link to paper: here(https://arxiv.org/abs/2211.05100) Total seen tokens: 366B --- Model Details BLOOM is an...

♥0
7.1k
Jul 29, 2026
Modelautomatic-speech-recognition
openai/whisper-large-v3

Whisper Whisper is a state-of-the-art model for automatic speech recognition (ASR) and speech translation, proposed in the paper Robust Speech Recognition via Large-Scale Weak Supervision(https://huggingface.co/papers/2212.04356) by Alec Radford et...

♥0
3.0M
Aug 12, 2024
Modelautomatic-speech-recognition
openai/whisper-large-v3-turbo

Whisper Whisper is a state-of-the-art model for automatic speech recognition (ASR) and speech translation, proposed in the paper Robust Speech Recognition via Large-Scale Weak Supervision(https://huggingface.co/papers/2212.04356) by Alec Radford et...

♥0
4.3M
Oct 4, 2024
Modeltext-to-speech
k2-fsa/OmniVoice

OmniVoice 🌍           OmniVoice is a massively multilingual zero-shot text-to-speech (TTS) model supporting over 600 languages. Built on a novel diffusion language model-style architecture, it delivers high-quality speech w...

♥0
4.3M
Nov 20, 2026
Modelfeature-extraction
intfloat/multilingual-e5-large

Multilingual-E5-large Multilingual E5 Text Embeddings: A Technical Report(https://arxiv.org/pdf/2402.05672). Liang Wang, Nan Yang, Xiaolong Huang, Linjun Yang, Rangan Majumder, Furu Wei, arXiv 2024 This model has 24 layers and the embedding size is...

♥0
7.9M
Apr 2, 2026
Modelfeature-extraction
jinaai/jina-embeddings-v3

The embedding model trained by Jina AI. jina-embeddings-v3: Multilingual Embeddings With Task LoRA Quick Start Blog(https://jina.ai/news/jina-embeddings-v3-a-frontier-multilingual-embedding-model/parameter-dimensions) | Azure(https://azuremarketplac...

♥0
1.1M
Apr 8, 2026
Modelsentence-similarity
intfloat/multilingual-e5-small

Multilingual-E5-small Multilingual E5 Text Embeddings: A Technical Report(https://arxiv.org/pdf/2402.05672). Liang Wang, Nan Yang, Xiaolong Huang, Linjun Yang, Rangan Majumder, Furu Wei, arXiv 2024 This model has 12 layers and the embedding size is...

♥0
10.2M
Apr 2, 2026
Modelfill-mask
FacebookAI/xlm-roberta-base

XLM-RoBERTa (base-sized model) XLM-RoBERTa model pre-trained on 2.5TB of filtered CommonCrawl data containing 100 languages. It was introduced in the paper Unsupervised Cross-lingual Representation Learning at Scale(https://arxiv.org/abs/1911.02116)...

♥0
7.5M
Feb 19, 2024
Modelautomatic-speech-recognition
openai/whisper-large-v2

Whisper Whisper is a pre-trained model for automatic speech recognition (ASR) and speech translation. Trained on 680k hours of labelled data, Whisper models demonstrate a strong ability to generalise to many datasets and domains without the need for...

♥0
99.1k
Feb 29, 2024