Instructions to use chinmaykumar-vyas/sarvam-105b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use chinmaykumar-vyas/sarvam-105b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="chinmaykumar-vyas/sarvam-105b", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("chinmaykumar-vyas/sarvam-105b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use chinmaykumar-vyas/sarvam-105b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "chinmaykumar-vyas/sarvam-105b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chinmaykumar-vyas/sarvam-105b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/chinmaykumar-vyas/sarvam-105b
- SGLang
How to use chinmaykumar-vyas/sarvam-105b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "chinmaykumar-vyas/sarvam-105b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chinmaykumar-vyas/sarvam-105b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "chinmaykumar-vyas/sarvam-105b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chinmaykumar-vyas/sarvam-105b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use chinmaykumar-vyas/sarvam-105b with Docker Model Runner:
docker model run hf.co/chinmaykumar-vyas/sarvam-105b
Download config.json from chinmaykumar-vyas/sarvam-105b: direct link, hf CLI and curl.
- Browser
- Download file 1.47 kB
-
https://huggingface.co/chinmaykumar-vyas/sarvam-105b/resolve/main/config.json
- Command line
-
hf download hf://chinmaykumar-vyas/sarvam-105b/config.json
-
curl -L -o config.json https://huggingface.co/chinmaykumar-vyas/sarvam-105b/resolve/main/config.json
1.47 kB
| { | |
| "architectures": [ | |
| "SarvamMLAForCausalLM" | |
| ], | |
| "attention_dropout": 0.0, | |
| "attn_implementation": null, | |
| "auto_map": { | |
| "AutoConfig": "configuration_sarvam_moe.SarvamMLAConfig", | |
| "AutoModel": "modeling_sarvam_moe.SarvamMLAModel", | |
| "AutoModelForCausalLM": "modeling_sarvam_moe.SarvamMLAForCausalLM" | |
| }, | |
| "default_theta": 10000.0, | |
| "dtype": "float32", | |
| "embedding_dropout": 0.0, | |
| "eos_token_id": 1, | |
| "first_k_dense_replace": 1, | |
| "head_dim": 576, | |
| "hidden_act": "silu", | |
| "hidden_size": 4096, | |
| "initializer_range": 0.006, | |
| "intermediate_size": 16384, | |
| "kv_lora_rank": 512, | |
| "max_position_embeddings": 131072, | |
| "model_type": "sarvam_mla", | |
| "moe_intermediate_size": 2048, | |
| "moe_router_enable_expert_bias": true, | |
| "num_attention_heads": 64, | |
| "num_experts": 128, | |
| "num_experts_per_tok": 8, | |
| "num_hidden_layers": 32, | |
| "num_shared_experts": 1, | |
| "output_dropout": 0.0, | |
| "output_router_logits": false, | |
| "pad_token_id": 0, | |
| "q_head_dim": 192, | |
| "qk_nope_head_dim": 128, | |
| "qk_rope_head_dim": 64, | |
| "rms_norm_eps": 1e-06, | |
| "rope_scaling": { | |
| "beta_fast": 32, | |
| "beta_slow": 1, | |
| "factor": 40, | |
| "mscale": 1.0, | |
| "mscale_all_dim": 1.0, | |
| "original_max_position_embeddings": 4096, | |
| "type": "deepseek_yarn" | |
| }, | |
| "rope_theta": 10000.0, | |
| "routed_scaling_factor": 2.5, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "4.57.2", | |
| "use_cache": true, | |
| "use_qk_norm": true, | |
| "v_head_dim": 128, | |
| "vocab_size": 262144 | |
| } | |