Instructions to use XHToken/Spark-X2.6-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use XHToken/Spark-X2.6-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="XHToken/Spark-X2.6-4B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("XHToken/Spark-X2.6-4B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use XHToken/Spark-X2.6-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.6-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.6-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/XHToken/Spark-X2.6-4B
- SGLang
How to use XHToken/Spark-X2.6-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.6-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.6-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.6-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.6-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use XHToken/Spark-X2.6-4B with Docker Model Runner:
docker model run hf.co/XHToken/Spark-X2.6-4B
Spark-X2.6-4B and for the detailed answer on τ³-Banking in discussion #4. It made that number reproducible.
Hi SparkLLM team, thanks for releasing Spark-X2.6-4B and for the detailed answer on τ³-Banking in discussion #4. It made that number reproducible.
I'm trying to reproduce the SWE-bench results (Pro 54.3, Verified 62.8, Multilingual 64.7) locally with the official bf16 weights on vLLM + Spark-plugin, thinking=high, temperature=1.0, top_p=0.95, top_k=-1. Could you share the setup you used?
Agent scaffold and version (OpenHands, mini-swe-agent, SWE-agent, Claude Code, an in-house harness…)
Context window used during evaluation (128K, 256K, 1M?) and max output tokens per turn
Max steps / turns and any wall-clock timeout per task
Task set: the full public SWE-bench Pro set (731 tasks), Verified (500), Multilingual (300), or a subset?
Number of runs per task (pass@1 single run, or avg@k?)
Anti-hacking measures (network disabled, git history removed…)
For the starred Qwen3.5 numbers (SWE Verified 53.1 / 38.8, SWE Pro 33.8 / 29.4): which card or paper are they taken from? I couldn't find them on the Qwen3.5-9B / 4B model cards.
Thanks a lot!
Hi @devzhr , thanks for your interest in reproducing our results! Below are the evaluation details for each benchmark.
SWE-bench Pro — 54.3
- Agent scaffold: Claude Code v2.1.197
- Context window: 1M
- Maximum turns: 250
- Evaluation metric: pass@1
- Task count: Full 731 tasks Pro set
- Per-task timeout: None configured
- Anti-hacking measures: Git history removed; network blocklist covering GitHub-related domains.
SWE-bench Verified — 62.8
- Agent scaffold: Claude Code v2.1.227
- Context window: 256K
- Maximum turns: 250
- Evaluation metric: pass@1
- Task count: Full 500-task Verified set
- Anti-hacking measures: Git history removed; network allowlist; tool and package blocklists.
SWE-bench Multilingual — 64.7
- Agent scaffold: Claude Code v2.1.227
- Context window: 256K
- Maximum turns: 250
- Evaluation metric: pass@1
- Task count: Full 300-task Multilingual set
- Anti-hacking measures: Git history removed.
Source of the Qwen3.5 results
The starred Qwen3.5-9B / 4B results were taken from the Nanbeige4.2-3B report and are also listed in its model card.