Model reference · open weights

Spark-X2.5

LLMs XHToken Text gen 3 builds Open weights 1k dl/mo

Spark-X2.5 is an open-weight language model from XHToken. Spark-X2.5-4B-FP8 (FP8) weighs 4.5 GB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • Spark-X2.5-4B is a 4.1B parameter text-generation model developed by XHToken for general-purpose tasks including conversation, coding, and reasoning.
  • It features a hybrid attention architecture that supports a native context window of 1,048,576 tokens and is trained on approximately 20 trillion tokens.
  • The model is released under the Apache 2.0 license and supports English and Chinese.

Summary of the XHToken/Spark-X2.5-4B model card, 2026-10-01. The estimate below is for another build of the family.

What it is

Released byXHToken
Released2026-08-24
Parameters4.1B
VRAM4.5 GB for the weights

What it runs on

Memory and cards for Spark-X2.5-4B-FP8 (FP8)

4.5 GBweights, file size
37 MBcache per 1K tokens
510 MBwindow cache per request
690 MBruntime overhead, at least
1,048,576 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB
FP8 without its speed-up here
73158K11.6 GB
RTX 4060 Ti 16 GB125258K15.4 GB
RTX 3090 24 GB
FP8 without its speed-up here
2210470K23.4 GB
RTX 4090 24 GB2210468K23.4 GB
RTX 5090 32 GB3115672K31.0 GB
L40S 48 GB47221014K44.0 GB
A100 80 GB
FP8 without its speed-up here
9042all 1024K78.2 GB
H100 80 GB5722all 1024K78.1 GB
RTX PRO 6000 Blackwell 96 GB7027all 1024K93.8 GB
DGX Spark (GB10) 128 GB unified8131all 1024K107 GB
H200 141 GB10641all 1024K138 GB
B200 180 GB13734all 1024K176 GB
2× RTX 3060 12 GB
tensor parallel · FP8 without its speed-up here
2110447K11.6 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
16.0 GB6.9 GB
59.2 GB13.7 GB
811.6 GB18.9 GB
1618.1 GB32.6 GB
3231.1 GB60.1 GB
6457.1 GB115 GB

One card, with vLLM's small-card settings.

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
Spark-X2.5-4B ↗ 4.1BBF16 8.2 GBRTX 3060 12 GB
Spark-X2.5-1.7B ↗ 1.7BBF16 3.4 GBRTX 3060 12 GB
Spark-X2.5-4B-FP8 (above) ↗ 4.1BFP8 4.5 GBRTX 3060 12 GB

From the model card

What XHToken says about Spark-X2.5

Read the model card

[!Note] This repository contains model weights and configuration files for the post-trained model in the Hugging Face Transformers format.

Introduction

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:

  • Efficient Architecture and Native 1M-token Context: The models use a hybrid attention architecture that combines 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: The models are deeply integrated with popular agent harnesses, including Codex, Claude Code, OpenClaw, and Hermes. They deliver 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: The models support a wide range of hardware platforms, including NVIDIA, Huawei, Hygon, HOUMO.AI, etc. It is compatible with leading inference frameworks such as vLLM, SGLang, llama.cpp, MLX, and can be deployed quickly through platforms including Ollama and LM Studio. The models can also be customized using popular fine-tuning frameworks such as LLaMA-Factory. Across multiple hardware platforms, they deliver superior TTFT, TOPT, and overall inference efficiency compared with similarly sized models.
  • Advanced Training Algorithms: The models were trained on Huawei Ascend clusters. Large-scale reinforcement learning and post-training techniques such as MOPD significantly enhance its reasoning, coding, agentic, and instruction-following capabilities.

Model Overview

For agent tasks, balancing performance, inference speed, and cache usage has long been a key bottleneck limiting model performance. Spark-X2.5 systematically integrates and optimizes mature attention technologies, combining sliding-window attention (SWA) with a hybrid full-attention architecture. This approach leverages the strengths of both mechanisms while avoiding the limitations of relying on a single structure, achieving an effective balance among performance, inference efficiency, and KV-cache size—thereby improving its practicality and effectiveness across real-world deployment scenarios.

Training Methods

Spark-X2.5 is pretrained on approximately 20 trillion tokens from a diverse corpus spanning web pages, books, academic publications, code, and encyclopedic materials. Particular attention is paid to data quality, domain coverage, and the sampling weights assigned to different data categories. Extensive data-mixture studies are conducted to determine an effective balance among mathematics, logic, code, and other high-value domains. This enables the models to acquire broad general knowledge while developing stronger capabilities in complex reasoning and code generation. Long-context capability is developed through a dedicated training stage comprising hundreds of billions of tokens, with sequence lengths extending to 1M tokens.

Post-training begins with supervised fine-tuning on a carefully curated corpus. This stage establishes robust instruction following, structured generation, and task-completion, while providing a stable policy initialization for reinforcement learning. We subsequently apply large-scale reinforcement learning across several capability domains, including language understanding, reasoning, programming, tool-augmented agentic behavior, and instruction following. This process yields a set of domain-specialized teacher policies, whose complementary strengths are consolidated into a single deployable model through MOPD.

Benchmarks

We evaluate our models and compare them with leading on-device models of similar size across a broad range of tasks, including agent, code, math, general and knowledge.

  • * 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

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

For NVIDIA GPUs:
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 req

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms