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
Spark-X2.5-4B-W4A16-AutoRound
Quantização em W4A16 (INT4) de alta precisão do modelo XHToken/Spark-X2.5-4B usando Intel AutoRound.
Detalhes Técnicos
- Formato:
auto_gptq(compatível com kernel Marlin, vLLM e SGLang) - Precisão: W4A16 (Pesos em INT4, Ativações em 16-bit / BF16)
- Group Size: 128
- Simetria: Simétrica (otimizada para vLLM Marlin kernel)
- Iterações por bloco (
iters): 200 - Amostras de Calibração (
nsamples): 128 - Comprimento de Contexto (
seqlen): 2048 - Otimizações:
enable_minmax_tuning=True,enable_norm_bias_tuning=True - Camadas Críticas:
lm_heade embeddings preservados em BF16
Como Utilizar
Com vLLM (Marlin kernel):
from vllm import LLM, SamplingParams
llm = LLM(
model="quant-mind/Spark-X2.5-4B-W4A16-AutoRound",
quantization="gptq_marlin",
trust_remote_code=True,
max_model_len=4096
)
prompts = ["Olá! Como você pode me ajudar hoje?"]
params = SamplingParams(temperature=0.7, max_tokens=200)
outputs = llm.generate(prompts, params)
print(outputs[0].outputs[0].text)
Quantizado por quant-mind.
- Downloads last month
- 138