From: sarvamai <huggingface.co/sarvamai>Newsgroups: alt.freeweights.textSubject:

sarvam-m

Date: 2026-11-15Commit: 01534a5Signed: 2DC28CC7B26A283B ✓

Text generation model with 23.6B parameters. Safetensors weights, 47.2 GB in all. Published by sarvamai under Apache-2.0.

23.6B params47.2GBsarvam-msafetensorspermissive
FactsParams23.6BSize47.2 GBFormatssafetensorsTasktext generationLicenseApache-2.0From sourcepermissive
$ fw get sarvamai/sarvam-m
# manifest sha256 56ceea75cdee… · 47.2 GB · 19 files
$ fw verify ./sarvam-m sarvamai/sarvam-m
From sourceHosted (signed)sarvamai/sarvam-mLast check: 2026-11-15 02:50 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Fine-tune of Mistral-Small-3.1-24B-Base-2503.

Works with

Overview

Size
47.2 GB
Weights
47.1 GB (safetensors)
Parameters
23.6B
Formats
safetensors
Task
text generation
License
Apache-2.0 (permissive)
Files
19, each with a sha256
Publisher
sarvamai
Added
2026-11-15
Section
alt.freeweights.text
Lineage

Original release from the publisher.

Base model: mistralai/Mistral-Small-3.1-24B-Base-2503

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 02:50 UTCpassed

Model card

From the publisher at commit 01534a5. Shown as plain text with links; images open at the publisher.

Sarvam-M#

Chat on Sarvam Playground

Model Information#

sarvam-m is a multilingual, hybrid-reasoning, text-only language model built on Mistral-Small. This post-trained version delivers exceptional improvements over the base model:

  • +20% average improvement on Indian language benchmarks
  • +21.6% enhancement on math benchmarks
  • +17.6% boost on programming benchmarks

Performance gains are even more impressive at the intersection of Indian languages and mathematics, with an outstanding +86% improvement in romanized Indian language GSM-8K benchmarks.

Learn more about sarvam-m in our detailed blog post.

Key Features#

  • Hybrid Thinking Mode: A single versatile model supporting both "think" and "non-think" modes. Use the think mode for complex logical reasoning, mathematical problems, and coding tasks, or switch to non-think mode for efficient, general-purpose conversation.
  • Advanced Indic Skills: Specifically post-trained on Indian languages alongside English, embodying a character that authentically reflects and emphasizes Indian cultural values.
  • Superior Reasoning Capabilities: Outperforms most similarly-sized models on coding and math benchmarks, demonstrating exceptional reasoning abilities.
  • Seamless Chatting Experience: Full support for both Indic scripts and romanized versions of Indian languages, providing a smooth and accessible multilingual conversation experience.

Quickstart#

The following code snippet demonstrates how to use sarvam-m using Transformers.

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "sarvamai/sarvam-m"

# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name, torch_dtype="auto", device_map="auto"
)

# prepare the model input
prompt = "Who are you and what is your purpose on this planet?"

messages = [{"role": "user", "content": prompt}]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    enable_thinking=True,  # Switches between thinking and non-thinking modes. Default is True.
)

model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

# conduct text completion
generated_ids = model.generate(**model_inputs, max_new_tokens=8192)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]) :].tolist()
output_text = tokenizer.decode(output_ids)

if "</think>" in output_text:
    reasoning_content = output_text.split("</think>")[0].rstrip("\n")
    content = output_text.split("</think>")[-1].lstrip("\n").rstrip("</s>")
else:
    reasoning_content = ""
    content = output_text.rstrip("</s>")

print("reasoning content:", reasoning_content)
print("content:", content)

Note. For thinking mode, we recommend temperature=0.5; for no-think mode, temperature=0.2.

With Sarvam APIs#

from openai import OpenAI

base_url = "https://api.sarvam.ai/v1"
model_name = "sarvam-m"
api_key = "Your-API-Key"  # get it from https://dashboard.sarvam.ai/

client = OpenAI(
    base_url=base_url,
    api_key=api_key,
).with_options(max_retries=1)

messages = [
    {"role": "system", "content": "You're a helpful AI assistant"},
    {"role": "user", "content": "Explain quantum computing in simple terms"},
]

response1 = client.chat.completions.create(
    model=model_name,
    messages=messages,
    reasoning_effort="medium",  # Enable thinking mode. `None` for disable.
    max_completion_tokens=4096,
)
print("First response:", response1.choices[0].message.content)

# Building messages for the second turn (using previous response as context)
messages.extend(
    [
        {
            "role": "assistant",
            "content": response1.choices[0].message.content,
        },
        {"role": "user", "content": "Can you give an analogy for superposition?"},
    ]
)

response2 = client.chat.completions.create(
    model=model_name,
    messages=messages,
    reasoning_effort="medium",
    max_completion_tokens=8192,
)
print("Follow-up response:", response2.choices[0].message.content)

Refer to API docs here: sarvam Chat Completions API docs

reasoning_effort can take three possible values: low, medium, and high to be consistent with the OpenAI API spec. Setting any of the three values just enables the thinking mode of sarvam-m.

VLLM Deployment#

For easy deployment, we can use vllm>=0.8.5 and create an OpenAI-compatible API endpoint with vllm serve sarvamai/sarvam-m.

If you want to use vLLM with python, you can do the following.

from openai import OpenAI

# Modify OpenAI's API key and API base to use vLLM's API server.
openai_api_key = "EMPTY"
openai_api_base = "http://localhost:8000/v1"

client = OpenAI(
    api_key=openai_api_key,
    base_url=openai_api_base,
)

models = client.models.list()
model = models.data[0].id

messages = [{"role": "user", "content": "Why is 42 the best number?"}]

# By default, thinking mode is enabled.
# If you want to disable thinking, add:
# extra_body={"chat_template_kwargs": {"enable_thinking": False}}
response = client.chat.completions.create(model=model, messages=messages)
output_text = response.choices[0].message.content

if "</think>" in output_text:
    reasoning_content = output_text.split("</think>")[0].rstrip("\n")
    content = output_text.split("</think>")[-1].lstrip("\n")
else:
    reasoning_content = ""
    content = output_text

print("reasoning content:", reasoning_content)
print("content:", content)

# For the next round, add the model's response directly as assistant turn.
messages.append(
    {"role": "assistant", "content": output_text}
)

Files

19 files · 47.2 GBWeights 47.1 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 19 files with their sha256
FileSizesha256
.gitattributes1.68 KBa60aad1ed90e8c5ae5e199496d12f4beb7236d7f2dbc9357a14a01b9b827b1c7
LICENSE.txt10.2 KB0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9
README.md6.24 KBb05f985c708c4ef07dccfd0faf600232f8579c092e78076dae0c185de2daca6c
config.json641 B095802097ec18f1892c8ac43d28a1314b6e46bb3ae43bd39f52f694cfd603754
generation_config.json155 B5e46c0d69126d36a5f515e48078d4cbcdc1bdf3b87b620432c9f17d3beceafa5
model-00001-of-00010.safetensors4.78 GBc34bbfcb6ab60f38187fbd604f98674aff8ec3b08d72a691dd025ab99db72653
model-00002-of-00010.safetensors4.78 GBb211b82ee00b760bc481d9fa138d7eeaaf5b3069b6cab59e14bbf2d88d1a63e2
model-00003-of-00010.safetensors4.78 GB148cbdbfa1c8a07ff257671d80909048893487100041856025ece16521677153
model-00004-of-00010.safetensors4.89 GB2cd3d2366859d52f5b491c3f44ee44ae87bd1e7a026ef650889bd4309b2f29e1
model-00005-of-00010.safetensors4.78 GB8a1471e38ad93dd7ad2f3562f26968eac5ba3399c7339abd9b27810bd1730e1b
model-00006-of-00010.safetensors4.78 GB469116996fcf9fd612f2e6d1f9dff824d58667ffec3e93013b9ff6ae80a9af3b
model-00007-of-00010.safetensors4.89 GBcbe4bbc16dfa5e680ce95513efe89cc31a2825ecb461955fca523a06d24b8f05
model-00008-of-00010.safetensors4.78 GB1e77ad1e398d8a018892667f8bc7df52a774aeece8c76d37a29793e7ecf63055
model-00009-of-00010.safetensors4.78 GB5f504e49e563e0ebcd57e2757ef8cd23414454ec534b0d6f0967eaa0e81a823b
model-00010-of-00010.safetensors3.90 GB663533c8a69781f86c2079151ac26090c083c88dce1a8bf0bcc3593e3412a1a3
model.safetensors.index.json29.9 KB549a19b2c46434730f1702db9c51710a9b29cdec823017f1a2e1523552e39092
special_tokens_map.json21.3 KB5bc5d1c106bf86895473568ef5211f3fde8415e6fdee039223d6db8ca52cbe01
tokenizer.json17.1 MB86150969e5647911369bbf28086fdad5fa5134f887e1a03a4e94030ad8e5468a
tokenizer_config.json201 KBc80afdafa09bdf9b28291452b2c303092741ed6085b1ff84fc5ba5e44dba9553
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
01534a53c4 pinned now2026-11-15 02:50 UTC19 files · 47.2 GB

Use it

$ fw get sarvamai/sarvam-m
# manifest sha256 56ceea75cdee… · 47.2 GB · 19 files
$ fw verify ./sarvam-m sarvamai/sarvam-m
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/sarvamai/sarvam-m.json --dir ./sarvam-m $ python3 fw.py verify ./sarvam-m ./sarvamai__sarvam-m.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download sarvamai/sarvam-m --revision 01534a53c46f2788e392dbb3d994e0fa8f04d3fd --local-dir ./sarvam-m
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModelForCausalLM, AutoTokenizer tok = AutoTokenizer.from_pretrained("sarvamai/sarvam-m", revision="01534a53c46f2788e392dbb3d994e0fa8f04d3fd") model = AutoModelForCausalLM.from_pretrained("sarvamai/sarvam-m", revision="01534a53c46f2788e392dbb3d994e0fa8f04d3fd", device_map="auto")
vLLMServe an OpenAI-compatible API.
$ HF_ENDPOINT=https://freeweights.allternit.com vllm serve sarvamai/sarvam-m --revision 01534a53c46f2788e392dbb3d994e0fa8f04d3fd

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
LICENSE.txt
Text sha256
0cec06e0e55fbc3dc5cee4fca9b607f66cb8f4e4dbcf3b3c013594dd156732e9
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: sarvamai <huggingface.co/sarvamai>Newsgroups: alt.freeweights.textSubject: sarvam-mDate: 2026-11-15Commit: 01534a5Signed: 2DC28CC7B26A283B ✓
Upstream
sarvamai/sarvam-m
Pinned commit
01534a53c46f2788e392dbb3d994e0fa8f04d3fd
Manifest
sarvam-m.json · .minisig
Manifest sha256
56ceea75cdee7ec2b3bbb4975a6484b790abaabc2ed620b661e47cebb507bdb9
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 02:50 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/sarvamai/sarvam-m.json $ curl -O https://freeweights.allternit.com/manifests/sarvamai/sarvam-m.json.minisig $ minisign -Vm sarvam-m.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

mistralai/Mistral-Small-3.1-24B-Base-2503 · this model is a finetune of it

1 model in the catalog name this one as their parent.

Quantizations
1
Quantizations 1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download sarvamai/sarvam-m
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. sarvam-m.json. Provenance. Takedown history: none.

Variants

1 quantized or adapter build of sarvam-m. Each has its own license check and page.

From: laion <huggingface.co/laion>Subject: a2-rl-e2egit_large-50-32B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-large-15-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-v2-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_pymethods2test-large-80-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_unitsyn-python-large-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_mix_h2_language_proportional-65-8B