Text Generation
Safetensors
spark2_5
auto-round
intel
w4a16
int4
gptq
vllm
marlin
conversational
custom_code
4-bit precision
Instructions to use quant-mind/Spark-X2.5-4B-W4A16-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- vLLM
How to use quant-mind/Spark-X2.5-4B-W4A16-AutoRound with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "quant-mind/Spark-X2.5-4B-W4A16-AutoRound" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "quant-mind/Spark-X2.5-4B-W4A16-AutoRound", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/quant-mind/Spark-X2.5-4B-W4A16-AutoRound
- SGLang
How to use quant-mind/Spark-X2.5-4B-W4A16-AutoRound 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 "quant-mind/Spark-X2.5-4B-W4A16-AutoRound" \ --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": "quant-mind/Spark-X2.5-4B-W4A16-AutoRound", "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 "quant-mind/Spark-X2.5-4B-W4A16-AutoRound" \ --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": "quant-mind/Spark-X2.5-4B-W4A16-AutoRound", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use quant-mind/Spark-X2.5-4B-W4A16-AutoRound with Docker Model Runner:
docker model run hf.co/quant-mind/Spark-X2.5-4B-W4A16-AutoRound
File size: 2,643 Bytes
4a9d6c1 | 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 | {
"bits": 4,
"data_type": "int",
"group_size": 128,
"sym": true,
"enable_norm_bias_tuning": true,
"static_attention_granularity": "tensor",
"static_kv_granularity": "tensor",
"autoround_version": "0.15.0",
"dynamic": {
"-:.*model\\.layers\\.0\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.1\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.2\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.3\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.4\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.5\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.6\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.7\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.8\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.9\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.10\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.11\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.12\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.13\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.14\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.15\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.16\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.17\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.18\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.19\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.20\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.21\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.22\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.23\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.24\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.25\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.26\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.27\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.28\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.29\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.30\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.31\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.32\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.33\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.34\\.self_attn\\.g_proj.*": {},
"-:.*model\\.layers\\.35\\.self_attn\\.g_proj.*": {}
},
"lm_head": false,
"provider": "auto-round",
"quant_method": "gptq",
"desc_act": false,
"true_sequential": false,
"damp_percent": 0.01,
"modules_in_block_to_quantize": [
[
"mlp.down_proj",
"mlp.gate_proj",
"mlp.up_proj",
"self_attn.out_proj",
"self_attn.q_k_v_proj"
]
]
} |