Spark-X2.5-4B

SparkLLM (XHToken)

Parameters

4.0B

Architecture

Hybrid attention transformer: 1 full-attention layer combined with 3 sliding-window attention (SWA) layers, natively supporting up to 1M-token context

Released

01.09.2026

License

Apache License 2.0

Open Weights Commercial Use Multimodal BF16 Spark-X2.5 en zh multilingual (200+ languages)

Input Modalities

text

Output Modalities

text

Context (native)

1,048,576 tokens

Context (extended)

1,048,576 tokens

Openness Index Score 100.0/100

About

Spark-X2.5-4B is a compact, general-purpose text language model from SparkLLM (XHToken), open-sourced under Apache 2.0 with a native context window of up to 1M tokens.

Technical Highlights

  • Efficient Architecture and Native 1M-token Context: A hybrid attention architecture combining one full-attention layer with three sliding-window attention layers. This design substantially reduces the computational overhead typically associated with long-context models while natively supporting a context window of up to 1M tokens.
  • Strong Coding and Agent Capabilities: Deeply integrated with popular agent harnesses including Codex, Claude Code, OpenClaw, and Hermes. State-of-the-art performance among models of comparable size across everyday coding, agentic workflows, reasoning, and instruction-following tasks.
  • Broad Hardware and Software Compatibility: Supports NVIDIA, Huawei, Hygon, HOUMO.AI, and other hardware platforms. Compatible with vLLM, SGLang, llama.cpp, and MLX; deployable via Ollama and LM Studio. Customizable with LLaMA-Factory. Delivers superior TTFT, TOPT, and overall inference efficiency compared with similarly sized models.
  • Advanced Training Algorithms: Trained on Huawei Ascend clusters. Large-scale reinforcement learning and post-training techniques such as MOPD significantly enhance reasoning, coding, agentic, and instruction-following capabilities.

Trained on ~20T tokens with large-scale reinforcement learning and MOPD consolidation, it supports 200+ languages and posts leading results among similarly sized open models on agentic, coding, math, and instruction-following benchmarks. Aimed at agentic workflows, coding, reasoning, and long-context tasks, it is built for practical, efficient on-device deployment.

Training Data Pretrained on ~20 trillion tokens (web pages, books, academic publications, code, encyclopedic materials) with dedicated long-context training up to 1M sequence length; post-training: supervised fine-tuning, large-scale reinforcement learning across capability domains, and MOPD consolidation of domain-specialized teacher policies. Trained on Huawei Ascend clusters. Supports 200+ languages.

Benchmark Scores

Benchmark Score Date Standing
TAU3-Bench
general_agent
43.13%
—
#9/21
better than 60%
VITA-Bench
general_agent
53.89%
—
#8/16
better than 53%
SWE-bench Verified
coding_agent
47.25%
—
#50/60
better than 17%
SWE-bench Multilingual
coding_agent
57.16%
—
#38/48
better than 21%
AIME 26
stem_reasoning
89.16%
—
#29/45
better than 36%
HMMT Feb 26
stem_reasoning
78.63%
—
#27/44
better than 40%
IMOAnswerBench
stem_reasoning
73.30%
—
#23/30
better than 24%
Humanity's Last Exam
stem_reasoning
19.32%
—
#57/71
better than 20%
Workspace Bench
100.00%
—
#1/5
better than 100%
SciCode
54.67%
—
#14/27
better than 50%

Architecture

Decoder Block ×36 input Embedding vocab 131K · d 2560 Sliding Window Attn Hybrid 16:4 · dₕ 256 · win 512 ×27 Full Attention Hybrid 16:4 · dₕ 256 · win 512 ×9 Dense FFN gelu · d 10K Final Norm LM Head tied with embedding output
Attention
Hybrid Attention (16:4)
Layers
36
Hidden size
2560
Context
1M tokens
Parameters
4000M

Source: Hugging Face config.json · Spark2_5ForCausalLM · exact layer pattern · model repo

Type: hybrid attention transformer (full attention + sliding-window attention)
Attention: hybrid: one full-attention layer interleaved with three sliding-window attention (SWA) layers

Training Pipeline

  1. 1
    pretraining

    Pretraining (~20T tokens)

    Pretrained on approximately 20 trillion tokens from web pages, books, academic publications, code, and encyclopedic materials, with data-mixture studies balancing mathematics, logic, and code; long-context capability developed in a dedicated stage with sequence lengths up to 1M tokens.

  2. 2
    sft

    Supervised fine-tuning

    Supervised fine-tuning on a carefully curated corpus establishing instruction following, structured generation, and task completion, providing a stable policy initialization for reinforcement learning.

  3. 3
    rl

    Large-scale reinforcement learning

    Large-scale RL across capability domains including language understanding, reasoning, programming, tool-augmented agentic behavior, and instruction following, yielding domain-specialized teacher policies.

  4. 4
    other

    MOPD policy consolidation

    MOPD consolidates the complementary strengths of the domain-specialized teacher policies into a single deployable model.

Training & Evaluation Datasets

NameRoleSizeModalitiesCollection
~20T token pre-training corpus (web, books, academic, code, encyclopedic) pretraining — —
SFT + large-scale RL + MOPD consolidation corpora rl — —

Comments (0)

No comments yet

Be the first to share your thoughts!

What now?

You have read the full card for Spark-X2.5-4B — here is where to go next.