A little over a month has passed since Spark-X2.5. In the rapidly evolving world of AI agents, that is enough time to rethink, refine, and move the frontier forward. Building on the Spark-X2.5-4B, we introduce Spark-X2.6-4B, the latest generation of our compact, general-purpose language models for on-device deployment.
Spark-X2.6-4B retains exactly the same architecture as Spark-X2.5-4B, achieving its capability gains through improved post-training. It delivers substantial improvements in coding, agent, long-context, multilingual, reasoning, etc. These advances enable more capable and practical on-device AI for developers and users tackling real-world tasks.
Technical Highlights:
Stronger Coding, Agentic, and Long-Context Capabilities: The models deliver substantial improvements in agentic workflows involving complex tool use, multi-step planning, and software engineering. They achieve state-of-the-art performance among similarly sized open-source models, matching or even surpassing models with approximately 9B parameters.
Controllable Thinking Budget: The models provide three configurable thinking levels—none, low, high—allowing applications to balance reasoning quality, latency, and inference cost dynamically.
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. Spark-X2.6-4B achieves best-in-class performance among models of comparable size, while matching or exceeding the performance of larger 9B models on several benchmarks.
Spark-X2.6-4B delivers inference efficiency on par with or better than comparable on-device models, including Qwen3.5-4B and Gemma-E4B. It combines this efficiency with stronger capabilities, making it a practical choice for responsive, resource-conscious on-device AI.
We compare high and low reasoning effort across agent, code, math, long-context, and general knowledge tasks. When switching from high to low, Spark-X2.6-1.7B average score decreases by 4.0 points, while its average output length drops by 37.3%. For Spark-X2.6-4B, the average score decreases by 1.7 points, while average output length drops by 22.0%. This flexibility allows developers to balance task performance and generation efficiency according to their application needs.
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.
Thinking is enabled by default by both the chat template and the Qwen3 reasoning parser, default reasoning_effort set to "high". You can configure thinking behavior for each request through chat_template_kwargs: set reasoning_effort to "low" or "high", such as "chat_template_kwargs": {"reasoning_effort": "low"}, or set "chat_template_kwargs": {"enable_thinking": false} to disable thinking.
Spark-MLX-LLM runs the original Spark-X2.6 Hugging Face checkpoints locally. It supports Apple silicon GPU, Linux CPU, and NVIDIA CUDA on Linux. No GGUF conversion is required.
Note. This community implementation uses the official Spark-X2.6-4B-INT4 weights and requires no local installation. Tested by the contributor on Windows with an NVIDIA GPU.
If you find our work helpful, feel free to give us a cite.
@misc{sparkx2.6,
title = {Spark-X2.6-4B&1.7B: Advancing the Frontier of On-Device Agents for Real-World Tasks},
author = {SparkLLM Team},
year = {2026}
}
Files
25 files · 8.24 GBWeights 8.22 GB (safetensors). Sizes and sha256 from the signed manifest.
import os
os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com"
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("XHToken/Spark-X2.6-4B", revision="64ca8f2a295b8ceb2757b9d4749a6558c4759e5b")
model = AutoModelForCausalLM.from_pretrained("XHToken/Spark-X2.6-4B", revision="64ca8f2a295b8ceb2757b9d4749a6558c4759e5b", device_map="auto")