{"_id":"69a6d9cc9df592b383a79ee9","id":"sarvamai/sarvam-30b","private":false,"pipeline_tag":"text-generation","library_name":"transformers","tags":["transformers","safetensors","sarvam_moe","text-generation","conversational","custom_code","en","hi","bn","ta","te","mr","gu","kn","ml","pa","or","as","ur","sa","ne","sd","kok","mai","doi","mni","sat","ks","bo","license:apache-2.0","deploy:azure","region:us"],"downloads":4677,"likes":235,"modelId":"sarvamai/sarvam-30b","author":"sarvamai","sha":"071ae95e933605ca1104a6b4524a36a98488efa4","lastModified":"2026-03-23T12:38:52.000Z","gated":false,"disabled":false,"widgetData":[{"text":"Hi, what can you help me with?"},{"text":"What is 84 * 3 / 2?"},{"text":"Tell me an interesting fact about the universe!"},{"text":"Explain quantum computing in simple terms."}],"model-index":null,"config":{"architectures":["SarvamMoEForCausalLM"],"auto_map":{"AutoConfig":"configuration_sarvam_moe.SarvamMoEConfig","AutoModel":"modeling_sarvam_moe.SarvamMoEModel","AutoModelForCausalLM":"modeling_sarvam_moe.SarvamMoEForCausalLM"},"model_type":"sarvam_moe","num_experts":128,"num_experts_per_tok":6,"tokenizer_config":{"bos_token":"[@BOS@]","eos_token":"<|end_of_turn|>","pad_token":"<pad>","unk_token":"<unk>","use_default_system_prompt":false},"chat_template_jinja":"{{- '[@BOS@]\\n' }}\n{%- if tools -%}\n<|start_of_turn|><|tool_declare|>\n<tools>\n{% for tool in tools %}\n{{ tool | tojson(ensure_ascii=False) }}\n{% endfor %}\n</tools>\n{{- '<|end_of_turn|>\\n' }}{%- endif -%}\n{%- macro visible_text(content) -%}\n    {%- if content is string -%}\n        {{- content }}\n    {%- elif content is iterable and content is not mapping -%}\n        {%- for item in content -%}\n            {%- if item is mapping and item.type == 'text' -%}\n                {{- item.text }}\n            {%- elif item is string -%}\n                {{- item }}\n            {%- endif -%}\n        {%- endfor -%}\n    {%- elif content is none -%}\n        {{- '' }}\n    {%- else -%}\n        {{- content }}\n    {%- endif -%}\n{%- endmacro -%}\n{%- set ns = namespace(last_user_index=-1) %}\n{%- for m in messages %}\n    {%- if m.role == 'user' %}\n        {% set ns.last_user_index = loop.index0 -%}\n    {%- endif %}\n{%- endfor %}\n{% for m in messages %}\n{%- if m.role == 'user' -%}<|start_of_turn|><|user|>\n{{ visible_text(m.content) }}\n{{- '<|nothink|>' if (enable_thinking is defined and not enable_thinking and not visible_text(m.content).endswith(\"<|nothink|>\")) else '' -}}\n{{- '<|end_of_turn|>\\n' }}\n{%- elif m.role == 'assistant' -%}\n{{- '<|start_of_turn|><|assistant|>\\n' }}\n{%- set reasoning_content = '' %}\n{%- set content = visible_text(m.content) %}\n{%- if m.reasoning_content is string %}\n    {%- set reasoning_content = m.reasoning_content %}\n{%- else %}\n    {%- if '</think>' in content %}\n        {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n        {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n    {%- endif %}\n{%- endif %}\n{%- if loop.index0 > ns.last_user_index and reasoning_content -%}\n{{ '<think>' + reasoning_content.strip() +  '</think>'}}\n{%- else -%}\n{{ '<think></think>' }}\n{%- endif -%}\n{%- if content.strip() -%}\n{{ '\\n' + content.strip() }}\n{%- endif -%}\n{% if m.tool_calls %}\n{% for tc in m.tool_calls %}\n{%- if tc.function %}\n    {%- set tc = tc.function %}\n{%- endif %}\n{{ '\\n<tool_call>' + tc.name }}\n{% set _args = tc.arguments %}\n{% for k, v in _args.items() %}\n<arg_key>{{ k }}</arg_key>\n<arg_value>{{ v | tojson(ensure_ascii=False) if v is not string else v }}</arg_value>\n{% endfor %}\n</tool_call>{% endfor %}\n{% endif %}\n{{- '<|end_of_turn|>\\n' }}\n{%- elif m.role == 'tool' -%}\n{%- if m.content is string -%}\n{%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n    {{- '<|start_of_turn|><|observation|>' }}\n{%- endif %}\n{{- '\\n<tool_response>\\n' }}\n{{- m.content }}\n{{- '\\n</tool_response>' }}\n{%- else -%}\n<|start_of_turn|><|observation|>{% for tr in m.content %}\n\n<tool_response>\n{{ tr.output if tr.output is defined else tr }}\n</tool_response>{% endfor -%}\n{% endif -%}\n{%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n{{- '<|end_of_turn|>\\n' }}{%- endif -%}\n{%- elif m.role == 'system' -%}\n<|start_of_turn|><|system|>\n{{ visible_text(m.content) }}\n{{- '<|end_of_turn|>\\n' }}\n{%- endif -%}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n    {{- '<|start_of_turn|><|assistant|>\\n' }}\n{%- endif -%}"},"cardData":{"language":["en","hi","bn","ta","te","mr","gu","kn","ml","pa","or","as","ur","sa","ne","sd","kok","mai","doi","mni","sat","ks","bo"],"library_name":"transformers","license":"apache-2.0","pipeline_tag":"text-generation"},"transformersInfo":{"auto_model":"AutoModelForCausalLM","custom_class":"modeling_sarvam_moe.SarvamMoEForCausalLM","pipeline_tag":"text-generation"},"siblings":[{"rfilename":".gitattributes"},{"rfilename":"README.md"},{"rfilename":"chat_template.jinja"},{"rfilename":"config.json"},{"rfilename":"configuration_sarvam_moe.py"},{"rfilename":"generation_config.json"},{"rfilename":"hotpatch_vllm.py"},{"rfilename":"model-00001-of-00026.safetensors"},{"rfilename":"model-00002-of-00026.safetensors"},{"rfilename":"model-00003-of-00026.safetensors"},{"rfilename":"model-00004-of-00026.safetensors"},{"rfilename":"model-00005-of-00026.safetensors"},{"rfilename":"model-00006-of-00026.safetensors"},{"rfilename":"model-00007-of-00026.safetensors"},{"rfilename":"model-00008-of-00026.safetensors"},{"rfilename":"model-00009-of-00026.safetensors"},{"rfilename":"model-00010-of-00026.safetensors"},{"rfilename":"model-00011-of-00026.safetensors"},{"rfilename":"model-00012-of-00026.safetensors"},{"rfilename":"model-00013-of-00026.safetensors"},{"rfilename":"model-00014-of-00026.safetensors"},{"rfilename":"model-00015-of-00026.safetensors"},{"rfilename":"model-00016-of-00026.safetensors"},{"rfilename":"model-00017-of-00026.safetensors"},{"rfilename":"model-00018-of-00026.safetensors"},{"rfilename":"model-00019-of-00026.safetensors"},{"rfilename":"model-00020-of-00026.safetensors"},{"rfilename":"model-00021-of-00026.safetensors"},{"rfilename":"model-00022-of-00026.safetensors"},{"rfilename":"model-00023-of-00026.safetensors"},{"rfilename":"model-00024-of-00026.safetensors"},{"rfilename":"model-00025-of-00026.safetensors"},{"rfilename":"model-00026-of-00026.safetensors"},{"rfilename":"model.safetensors.index.json"},{"rfilename":"modeling_sarvam_moe.py"},{"rfilename":"sarvam.py"},{"rfilename":"special_tokens_map.json"},{"rfilename":"tokenizer.json"},{"rfilename":"tokenizer_config.json"}],"spaces":["AryavA/SiteVam","rohanv52/sarvamai30btest","kazutab/mindmap-studio","satanrayshe/indic-tokenizer-tax","TorkeHub/torki-2-benchmarks"],"createdAt":"2026-03-03T12:53:32.000Z","safetensors":{"parameters":{"F32":32152650368},"total":32152650368},"usedStorage":128645108067}