Instructions to use XHToken/Spark-X2.5-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use XHToken/Spark-X2.5-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="XHToken/Spark-X2.5-4B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("XHToken/Spark-X2.5-4B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use XHToken/Spark-X2.5-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "XHToken/Spark-X2.5-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "XHToken/Spark-X2.5-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/XHToken/Spark-X2.5-4B
- SGLang
How to use XHToken/Spark-X2.5-4B 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 "XHToken/Spark-X2.5-4B" \ --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": "XHToken/Spark-X2.5-4B", "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 "XHToken/Spark-X2.5-4B" \ --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": "XHToken/Spark-X2.5-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use XHToken/Spark-X2.5-4B with Docker Model Runner:
docker model run hf.co/XHToken/Spark-X2.5-4B
Amazing little model! I got some proposed chat template fixes
👍 6
1
#24 opened 3 days ago
by
peculiar-ragdoll
docker运行方案vllm/vllm-openai:latest根本无法加载,官方真的有测试过吗?
#23 opened 3 days ago
by
zhousp666
How Can We Submit the 1.7B and 4B Models to the AA Leaderboard?
🚀 4
#22 opened 4 days ago
by
Tylerwtzhang3
[HER Hack-Astron #6] 猫娘推理:Spark-X2.5-4B 的 ColdStart SFT 与自生成轨迹 RFT 实验
#20 opened 11 days ago
by
liumindmind
[HER Hack-Astron #6] Spark-X2.5-4B 原生计算器配对评测:63 次工具调用均成功,为什么 pass@1 反而下降?
#19 opened 11 days ago
by
Forrest20231206
[HER Hack-Astron #6] A Hard-Budget Rapid Diagnostic Math Assessment of Spark-X2.5-4B Q4_K_M
#18 opened 12 days ago
by
lostlight520
RTX4060 + DeepSeek Harness + Spark-X2.5-4B = Local Coding
❤️ 2
#17 opened 12 days ago
by
scifiscrivener
Vision version
🔥 1
#16 opened 13 days ago
by
unraidghost
feat(attention): add KV-BSS (Key-Value Binding Softmax Sharpening) and attention haze suppression
🔥 1
#15 opened 15 days ago
by
F-Labs
[Proposal & PoC] KV-BSS (Key-Value Binding Softmax Sharpening) to suppress attention haze & hallucination in Spark-X2.5-4B
#14 opened 15 days ago
by
F-Labs
[HER Hack-Astron #5] 8GB 边缘独显(RX 580 / Vulkan)上的 Spark-X2.5 端侧实测:双模型吞吐、量化算力陷阱与轻型评测
#9 opened 18 days ago
by
Sodapopper-pixel
Excellent model for coding ! Suggest team to build llama.cpp fork for vulkan and CPU at least for quick testing
👍❤️ 3
12
#8 opened 20 days ago
by
iamtanmay
Spark-X2.5 Speed Benchmark
👍 4
#7 opened 20 days ago
by
pengwenzhi
[HER Hack-Astron #5] Spark-X2.5-4B 审查真实 vLLM 兼容修复:定位第二断点并跑通原生工具调用
👍 1
#6 opened 20 days ago
by
Forrest20231206
Generate an SVG image of a cycling pelican in the current directory
🤯👀 2
3
#5 opened 21 days ago
by
maryann088
Does the model support multiplingual?
3
#4 opened 21 days ago
by
Duonglv
[HER Hack-Astron #5] Spark-X2.5-4B Q4_K_M 在无独显 Linux CPU(8核/16G)上的真实编码、吞吐与 OOM 边界
👍 3
#3 opened 22 days ago
by
ljmodel
Benchmark against Nanbeige 4.2 3B and/or Agents A1 4B?
👍 6
8
#2 opened 22 days ago
by
EnderOLED
简单小测评
👍 16
#1 opened 23 days ago
by
concentrate1