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
Download quantization_config.json from quant-mind/Spark-X2.5-4B-W4A16-AutoRound: direct link, hf CLI and curl.
- Browser
- Download file 2.64 kB
-
https://huggingface.co/quant-mind/Spark-X2.5-4B-W4A16-AutoRound/resolve/main/quantization_config.json
- Command line
-
hf download hf://quant-mind/Spark-X2.5-4B-W4A16-AutoRound/quantization_config.json
-
curl -L -o quantization_config.json https://huggingface.co/quant-mind/Spark-X2.5-4B-W4A16-AutoRound/resolve/main/quantization_config.json
2.64 kB
| { | |
| "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" | |
| ] | |
| ] | |
| } |