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)# pip install -U transformers accelerate # 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
How Can We Submit the 1.7B and 4B Models to the AA Leaderboard?
Hi everyone,
We’d like to have our 1.7B and 4B models evaluated for the AA leaderboard. We’ve already reached out to the AA team but are still waiting to hear back.
If anyone knows a more direct way to contact them, we’d really appreciate your help.
Thanks!
Hi @Tylerwtzhang3 , a few things that might help, based on AA's contact page and the models they've added recently.
Contact channels (all listed on https://artificialanalysis.ai/contact)
- Contact form (pick the model benchmarking topic and use an official work email), or hello@artificialanalysis.ai
- Discord: https://discord.gg/Mk298GPZ7V
- X: tag/DM @ArtificialAnlys with the HF links. They also run a Rednote account (linked on the same page), which is probably the easiest route from China.
What recent additions have in common
- No API endpoint needed: K2 Horizon 3.7B and MiniCPM5-2B (both released Sept 2026), G9v3-3B and Nanbeige4.1-3B are on the Tiny (≤4B) leaderboard with no API provider listed, so AA ran them from the Hugging Face weights. Apache-2.0 weights on HF, like Spark-X2.5, are enough to qualify.
- Reasoning and non-reasoning modes are listed as separate entries (e.g. MiniCPM5-1B, Qwen3.5 2B). Since Spark-X2.5 has an
enable_thinkingswitch, it's worth asking for both modes and stating the recommended sampling parameters for each. - Intelligence Index v4.3.2 is now mostly agentic (AA-Briefcase, GDPval-AA, AutomationBench-AA, Terminal-Bench) plus long context (AA-LCR), so tool calling needs to work out of the box.
Suggestion for the request
Since AA will self-host, the main friction is serving: vLLM needs --trust-remote-code, and SGLang needs a specific nightly plus --tool-call-parser spark25 --reasoning-parser qwen3. Sending a pinned, copy-paste recipe (image/version, launch command, sampling params for both modes, a quick tool-call check) along with the request should make it much easier for them to pick up.