Spark-X2.5 README

The project's README from github.com/XHToken/Spark-X2.5. As one markdown file: README.md.

Spark-X2.5

Slack Discord YouTube dev.to Bluesky X Zhihu WeChat

Welcome to the GitHub repository of Spark-X2.5 open model series. You can find official information about Spark-X2.5, and post your questions here(Issues).

Introduction

Today, we are introducing Spark-X2.5-4B and Spark-X2.5-1.7B, two compact, general-purpose language models designed to make capable AI more practical, efficient, and accessible. The models deliver strong performance across a broad range of everyday tasks—including conversation, writing, translation, reasoning, coding, tool use, and agentic workflows—achieving leading results among open-source models of comparable size. Spark-X2.5 combines an efficiency-oriented architecture with native context windows of up to 1M tokens, and support for more than 200 languages.

Technical Highlights:

Release

Model Downloads

The Spark-X2.5-4B and Spark-X2.5-1.7B are available on the following platforms. Choose the most suitable download source for your region and environment:

Platform Download Description
Hugging Face Spark-X2.5 in Huggingface Official Hugging Face model collection for Spark-X2.5
ModelScope Spark-X2.5 in ModelScope Recommended download source for users in China
Modelers Spark-X2.5 in Modelers Recommended download source for users with Ascend chips
Ollama Spark-X2.5 in Ollama Download and run the model locally with Ollama
SCNet Spark-X2.5 in SCNet Recommended download source for users with Hygon chips
AtomGit Spark-X2.5 in AtomGit Recommended download source for users in China

If Hugging Face is slow or unavailable in your region, try ModelScope, Modelers, SCNet or AtomGit instead.

Benchmarks

Benchmark Spark‑X2.5‑4B Spark‑X2.5‑1.7B Qwen3.5‑9B Qwen3.5‑4B Qwen3.5‑2B Gemma4‑12B Gemma4‑E4B Gemma4‑E2B
Agent
BFCL‑V465.146.966.1*50.3*43.6*37.436.930.2
τ²‑bench75.165.379.1*79.9*48.8*69.0*42.2*24.5*
τ³‑bench30.420.19.36.74.113.310.18.8
MCP‑Atlas54.623.447.4*40.8*14.830.5*15.0*12.6
MCP‑Mark14.22.313.412.5––––
Workspace Bench31.218.925.521.37.7–––
VitaBench2.025.28.315.618.25.212.44.84.4
BrowseComp40.929.78.314.33.110.08.33.7
Code
SWE‑Bench Pro44.410.433.8*29.4*1.921.9*4.0*–
SWE‑Bench Verified41.628.353.1*38.8*6.844.2*14.0*–
SWE‑Bench Multilingual53.323.343.327.75.032.5*––
SciCode34.718.232.7*24.06.039.827.520.5
Math
Gaokao 2026133.4114.8135.5130.394.0130.6102.481.8
AIME 202690.769.488.283.030.882.1*42.5*37.5*
HMMT Feb 202681.248.470.869.721.565.634.220.5
IMO‑AnswerBench74.245.469.868.5–57.226.922.6
General & Knowledge
IFEval93.089.591.5*89.8*78.6*94.845.334.8
IFBench75.066.364.559.241.3*73.5*44.0*22.7
AA‑LCR56.324.363.0*57.0*25.6*55.3*34.718.3
HLE12.36.314.38.62.113.13.92.5
GPQA67.443.877.267.244.672.854.543.8
  • * denotes reported results from publicly‑released model cards / papers and - denotes scores not yet available.
  • All evaluations are conducted in thinking mode. The recommended sampling parameters for Spark-X2.5 are temperature=1.0, top_p=0.95, and top_k=-1.
  • Gaokao 2026 consists of the five 2026 Chinese GAOKAO examinations (National I,National II, Beijing, Shanghai, Tianjin), each graded out of 150 points.

Quickstart

The examples below serve a local Spark-X2.5-4B checkpoint. Set MODEL_PATH to its absolute path before starting a container:

export MODEL_PATH=/absolute/path/to/Spark-X2.5-4B

SGLang

Install SGLang

For NVIDIA GPUs:

Use the pre-built image that tracks the Spark-X2.5 runtime:

docker pull lmsysorg/sglang:nightly-dev-cu13-20260827-20621aa1
For Ascend NPUs:
# A3 daily build
export SGLANG_IMAGE=quay.io/ascend/sglang:main-cann9.0.0-a3

# A2 daily build (use this instead on A2 hardware)
export SGLANG_IMAGE=quay.io/ascend/sglang:main-cann9.0.0-910b

docker pull "$SGLANG_IMAGE"

Run Inference

The following commands start an OpenAI-compatible API server configured for a maximum context length of 1,048,576 tokens. This setting requires sufficient device memory; reduce --context-length when necessary.

Server

docker run --rm -it \
  --gpus '"device=0"' \
  --ipc=host \
  -p 30000:30000 \
  -v "$MODEL_PATH":/root/Spark-X2.5-4B:ro \
  lmsysorg/sglang:nightly-dev-cu13-20260827-20621aa1 \
  python -m sglang.launch_server \
    --model-path /root/Spark-X2.5-4B \
    --served-model-name spark2.5 \
    --tool-call-parser spark25 \
    --reasoning-parser qwen3 \
    --tp-size 1 \
    --mem-fraction-static 0.8 \
    --context-length 1048576 \
    --chat-template /root/Spark-X2.5-4B/chat_template.jinja \
    --host 0.0.0.0 \
    --port 30000
Ascend NPU:
docker run -it --rm -e ASCEND_USE_FIA=1 --network=host --ipc=host --shm-size=16g \
    --device=/dev/davinci0 --device=/dev/davinci1 --device=/dev/davinci2 --device=/dev/davinci3 \
    --device=/dev/davinci4 --device=/dev/davinci5 --device=/dev/davinci6 --device=/dev/davinci7 \
    --device=/dev/davinci8 --device=/dev/davinci9 --device=/dev/davinci10 --device=/dev/davinci11 \
    --device=/dev/davinci12 --device=/dev/davinci13 --device=/dev/davinci14 --device=/dev/davinci15 \
    --device=/dev/davinci_manager \
    --device=/dev/devmm_svm \
    --device=/dev/hisi_hdc \
    --volume /usr/local/sbin:/usr/local/sbin \
    --volume /usr/local/Ascend/driver:/usr/local/Ascend/driver \
    --volume /usr/local/Ascend/firmware:/usr/local/Ascend/firmware \
    --volume /etc/ascend_install.info:/etc/ascend_install.info \
    --volume /var/queue_schedule:/var/queue_schedule \
    --volume ~/.cache/:/root/.cache/ \
    --volume "$MODEL_PATH:/root/Spark-X2.5-4B:ro" \
    --entrypoint=python \
    "$SGLANG_IMAGE" \
    -m sglang.launch_server \
      --model-path /root/Spark-X2.5-4B \
      --served-model-name spark2.5 \
      --tool-call-parser spark25 \
      --reasoning-parser qwen3 \
      --tp-size 1 \
      --mem-fraction-static 0.8 \
      --context-length 1048576 \
      --chat-template /root/Spark-X2.5-4B/chat_template.jinja \
      --host 0.0.0.0 \
      --port 30000

Client

Thinking is enabled by default by both the chat template and the Qwen3 reasoning parser. To disable thinking for a specific request, set "chat_template_kwargs": {"enable_thinking": false}.

curl -s http://localhost:30000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "spark2.5",
    "messages": [
      {
        "role": "user",
        "content": "安徽的省会在哪里?"
      }
    ],
    "max_tokens": 131072,
    "temperature": 1,
    "top_k": -1,
    "top_p": 0.95,
    "repetition_penalty": 1,
    "presence_penalty": 0,
    "frequency_penalty": 0
  }'

vLLM

Deploy vLLM

vLLM provides an official Docker image for NVIDIA GPU deployment:

docker run --rm --gpus all \
  --ipc=host \
  -p 30000:30000 \
  -v "$MODEL_PATH:/models/Spark-X2.5-4B:ro" \
  vllm/vllm-openai:latest \
  --model /models/Spark-X2.5-4B \
  --port 30000 \
  --trust-remote-code \
  --served-model-name spark25 \
  --tensor-parallel-size 1 \
  --gpu-memory-utilization 0.7 \
  --enable-prefix-caching \
  --chat-template /models/Spark-X2.5-4B/chat_template.jinja

For Ascend NPUs, choose an official image for the fastest setup.

Ascend A2:
export IMAGE=quay.io/ascend/vllm-ascend:nightly-main
docker pull "$IMAGE"

export DEVICE=/dev/davinci0
export MODEL_CACHE="${HOME}/.cache"

mkdir -p "$MODEL_CACHE"

docker run --rm \
    --name vllm-ascend \
    --shm-size=1g \
    --device "$DEVICE" \
    --device /dev/davinci_manager \
    --device /dev/devmm_svm \
    --device /dev/hisi_hdc \
    -v /usr/local/dcmi:/usr/local/dcmi \
    -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
    -v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
    -v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
    -v /etc/ascend_install.info:/etc/ascend_install.info \
    -v "$MODEL_CACHE:/root/.cache" \
    -p 8000:8000 \
    -it "$IMAGE" bash
Ascend A3:
export IMAGE=quay.io/ascend/vllm-ascend:nightly-main-a3
docker pull "$IMAGE"

export DEVICE0=/dev/davinci0
export DEVICE1=/dev/davinci1
export MODEL_CACHE="${HOME}/.cache"

mkdir -p "$MODEL_CACHE"

docker run --rm \
    --name vllm-ascend \
    --shm-size=1g \
    --device "$DEVICE0" \
    --device "$DEVICE1" \
    --device /dev/davinci_manager \
    --device /dev/devmm_svm \
    --device /dev/hisi_hdc \
    -v /usr/local/dcmi:/usr/local/dcmi \
    -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
    -v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
    -v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
    -v /etc/ascend_install.info:/etc/ascend_install.info \
    -v "$MODEL_CACHE:/root/.cache" \
    -p 8000:8000 \
    -it "$IMAGE" bash
Ascend 950DT:
export IMAGE=quay.io/ascend/vllm-ascend:nightly-main-a5
docker pull "$IMAGE"

export MODEL_CACHE="${HOME}/.cache"

mkdir -p "$MODEL_CACHE"

docker run --rm \
    --name vllm-ascend \
    --net=host \
    --shm-size=1g \
    --device 

Spark-X2.5 (XHToken/Spark-X2.5)

Searching Database…

这是什么?Spark-X2.5 是一系列两个开源语言模型(4B 和 1.7B 参数),面向日常对话、写作、翻译、编码、推理和代理式工具使用任务,力求在小体量下实现强大性能。
这是聊天应用,还是只是原始模型权重?是原始模型权重,不是应用。你从 Hugging Face、ModelScope、Ollama 等平台下载检查点,然后自己用推理引擎运行。
怎么下载并运行这些模型?从 Hugging Face、ModelScope、Modelers、Ollama、SCNet 或 AtomGit 获取检查点,然后用官方的 SGLang 或 vLLM Docker 镜像部署服务,或通过 Ollama 或 LM Studio 在本地运行。
它兼容哪些推理框架?服务部署方面兼容 vLLM、SGLang、llama.cpp 和 MLX,可通过 Ollama 或 LM Studio 部署,并可用 LLaMA-Factory 等框架微调。
1M token 上下文在任何机器上都能开箱即用吗?不能。完整提供 1,048,576 token 上下文需要足够的设备内存,README 提示如果你的硬件扛不住,要调低 --context-length。
运行它需要 NVIDIA GPU 吗?NVIDIA 是主要目标平台,但这些模型也兼容华为昇腾、海光和 HOUMO.AI 芯片,每种都有专门的 Docker 镜像。
在同体量模型中 Spark-X2.5 的突出之处是什么?在已公布的基准测试中,它在 τ3-bench、MCP-Atlas 和 BrowseComp 等多项代理和推理任务上胜过同体量的 Qwen3.5 和 Gemma4 模型,同时原生支持 1M token 上下文和 200 多种语言。
它能在 Claude Code 这类编码代理工具中使用吗?可以。这些模型为 Codex、Claude Code、OpenClaw 和 Hermes 等代理框架构建和调优,在 BFCL-V4 和 SWE-Bench 等代理基准上得分很高。
有面向轻量硬件的量化版本吗?有。4B 和 1.7B 两个模型的 FP8 和 INT8 量化版本已于 2026/09/04 发布。
这些模型是怎么训练的?它们在华为昇腾集群上训练,采用大规模强化学习和 MOPD 等后训练技术来提升推理、编码和代理性能。
Creator
XHToken
Size
<0.1 MB
Stars
814
Updated
CommitSep 20
Age
1mo
Commits · 90 Days