Instructions to use pavanperi/sarvam-30b-awq-w4a16-broad-5120 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pavanperi/sarvam-30b-awq-w4a16-broad-5120 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pavanperi/sarvam-30b-awq-w4a16-broad-5120", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("pavanperi/sarvam-30b-awq-w4a16-broad-5120", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use pavanperi/sarvam-30b-awq-w4a16-broad-5120 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pavanperi/sarvam-30b-awq-w4a16-broad-5120" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pavanperi/sarvam-30b-awq-w4a16-broad-5120", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/pavanperi/sarvam-30b-awq-w4a16-broad-5120
- SGLang
How to use pavanperi/sarvam-30b-awq-w4a16-broad-5120 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 "pavanperi/sarvam-30b-awq-w4a16-broad-5120" \ --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": "pavanperi/sarvam-30b-awq-w4a16-broad-5120", "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 "pavanperi/sarvam-30b-awq-w4a16-broad-5120" \ --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": "pavanperi/sarvam-30b-awq-w4a16-broad-5120", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use pavanperi/sarvam-30b-awq-w4a16-broad-5120 with Docker Model Runner:
docker model run hf.co/pavanperi/sarvam-30b-awq-w4a16-broad-5120
File size: 2,363 Bytes
37f197f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | {
"architectures": [
"SarvamMoEForCausalLM"
],
"attention_dropout": 0.0,
"attn_implementation": null,
"auto_map": {
"AutoConfig": "configuration_sarvam_moe.SarvamMoEConfig",
"AutoModel": "modeling_sarvam_moe.SarvamMoEModel",
"AutoModelForCausalLM": "modeling_sarvam_moe.SarvamMoEForCausalLM"
},
"dtype": "float16",
"embedding_dropout": 0.0,
"eos_token_id": 1,
"first_k_dense_replace": 1,
"head_dim": 64,
"hidden_act": "silu",
"hidden_size": 4096,
"initializer_range": 0.006,
"intermediate_size": 8192,
"max_position_embeddings": 131072,
"max_window_layers": 19,
"model_type": "sarvam_moe",
"moe_intermediate_size": 1024,
"moe_router_enable_expert_bias": true,
"moe_shared_expert_intermediate_size": 1024,
"n_group": 1,
"norm_topk_prob": true,
"num_attention_heads": 64,
"num_experts": 128,
"num_experts_per_tok": 6,
"num_hidden_layers": 19,
"num_key_value_heads": 4,
"num_shared_experts": 1,
"output_dropout": 0.0,
"output_router_logits": false,
"pad_token_id": 0,
"quantization_config": {
"config_groups": {
"group_0": {
"format": "pack-quantized",
"input_activations": null,
"output_activations": null,
"targets": [
"Linear"
],
"weights": {
"actorder": null,
"block_structure": null,
"dynamic": false,
"group_size": 128,
"num_bits": 4,
"observer": "minmax",
"observer_kwargs": {},
"scale_dtype": null,
"strategy": "group",
"symmetric": true,
"type": "int",
"zp_dtype": null
}
}
},
"format": "pack-quantized",
"global_compression_ratio": null,
"ignore": [
"lm_head"
],
"kv_cache_scheme": null,
"quant_method": "compressed-tensors",
"quantization_status": "compressed",
"sparsity_config": {},
"transform_config": {},
"version": "0.13.0"
},
"rms_norm_eps": 1e-06,
"rope_scaling": null,
"rope_theta": 8000000,
"routed_scaling_factor": 2.5,
"router_dtype": "fp32",
"score_function": "sigmoid",
"tie_word_embeddings": false,
"topk_group": 1,
"transformers_version": "4.57.3",
"use_bias": false,
"use_cache": true,
"use_qk_norm": true,
"use_qkv_bias": false,
"use_rmsnorm": true,
"vocab_size": 262144
} |