Mindket

Spark-X2.6-4B

Newversion 1 · updated

Overview

A 4.1B language model for coding, agent work and long context in English and Chinese, with three thinking levels. For developers building agents that run on their own devices.

Spark-X2.6-4B is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.

At a glance

You need
  • Python and pip
  • Transformers at version 4.57.1
  • About 8.2 GB of disk for the BF16 weights, or about 2.1 GB for a 4-bit estimate
Runs in
  • Python with the transformers library, pinned to version 4.57.1
  • Laptops, desktops and other local machines, as the card targets on-device deployment
  • Windows, macOS or Linux
Start with
pip install transformers==4.57.1

Platform

WindowsOperating system
macOSOperating system
LinuxOperating system

About

What it is

Spark-X2.6-4B is a compact general-purpose language model with 4.1B parameters, made for on-device use. It keeps the architecture of Spark-X2.5-4B and gains its improvements from better post-training. It works in English and Chinese, and it has three thinking levels: none, low and high.

Who it suits

It suits developers who want a small model for local agents, coding help and long documents, without sending data to a server.

IndustryWho uses itHow they use itExample
SoftwareDevelopersRun a local coding and agent assistantA helper that plans steps and calls tools on a laptop
Product teamsApp makersShip an on-device assistantA chat feature that works without a cloud model
Global teamsContent staffWork in English and Chinese with one modelDraft and check text in both languages
AI researchResearchersStudy the cost of thinking at different levelsCompare scores and output length at high and low effort

If you need a huge model for the hardest tasks, you can skip it.

Where to use it

  • Python with the transformers library, pinned to version 4.57.1
  • Laptops, desktops and other local machines, as the card targets on-device deployment
  • Windows, macOS or Linux
Use caseWhoWhat they get back
Coding helpDevelopersCode and explanations at the thinking level you choose
Agent tasksAgent buildersTool-use and multi-step planning from a small model
Long-context readingAnalystsAnswers drawn from long inputs

How to set it up

You need these first:

  • Python and pip
  • Transformers at version 4.57.1
  • About 8.2 GB of disk for the BF16 weights, or about 2.1 GB for a 4-bit estimate
  1. Install the exact transformers version the card names.
  2. Download the model files, or let transformers fetch them on first load.
  3. Load the tokenizer and model with the Python code below.
pip install transformers==4.57.1
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "XHToken/Spark-X2.6-4B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    torch_dtype="auto",
    device_map="auto",
)
messages = [{"role": "user", "content": "What is the capital of Anhui Province?"}]

How to use it

Put your question into a list of messages, pass it through the tokenizer's chat template, and generate. The card's example turns thinking on in the template. Choose none, low or high thinking to trade answer quality against speed and cost.

ToolWhat it does
enable_thinking=TrueTurns thinking on in the chat template example
Thinking levelsNone, low or high, so you balance quality, latency and cost
trust_remote_code=TrueLets the code that ships with the model run when it loads
device_map="auto"Places the model on the devices you have

Example

You ask, "Write a function that checks whether a string is a palindrome." With thinking on, the model reasons first and then returns the function. With thinking at none, it answers faster with less reasoning.

For newcomers and experts

This is a small model that you can run on your own machine. A good first step is the short Python example above, with thinking on, and then the same question with thinking off.

The authors say the gains come from post-training alone, with the architecture unchanged from the earlier release. They report that it matches or beats some models of about 9B parameters, and that its inference speed is on par with Qwen3.5-4B and Gemma-E4B.

  1. You write messages for the model
  2. The chat template adds the thinking setting
  3. The model reasons, then answers
  4. You read the text it returns

Good to know

Lower thinking effort costs a little accuracy and saves output length, by the card's numbers.

Average score drop from high to low effort
Spark-X2.6-4B1.7 points
Spark-X2.6-1.7B4.0 points
  • Output length: switching from high to low effort shortens average output by 22.0% for the 4B model and 37.3% for the 1.7B model
  • Claims: the comparisons with other models are the authors' own, shown as charts on the card
  • Other versions: 63 quantized and 23 fine-tuned versions made by other people are listed
  • License: Apache 2.0
  • Cost to run: none named, you supply the hardware
  • Data it reaches: the prompts you give it

README and files

README

Spark-X2.6-4B

A 4.1B language model for coding, agent work and long context in English and Chinese, with three thinking levels. For developers building agents that run on their own devices.

Made by XHToken on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.

About

What it is: Spark-X2.6-4B is a compact general-purpose language model with 4.1B parameters, made for on-device use. It keeps the architecture of Spark-X2.5-4B and gains its improvements from better post-training. It works in English and Chinese, and it has three thinking levels: none, low and high.

Who it suits: It suits developers who want a small model for local agents, coding help and long documents, without sending data to a server.

Industry | Who uses it | How they use it | Example
Software | Developers | Run a local coding and agent assistant | A helper that plans steps and calls tools on a laptop
Product teams | App makers | Ship an on-device assistant | A chat feature that works without a cloud model
Global teams | Content staff | Work in English and Chinese with one model | Draft and check text in both languages
AI research | Researchers | Study the cost of thinking at different levels | Compare scores and output length at high and low effort

If you need a huge model for the hardest tasks, you can skip it.

Where to use it:

  • Python with the transformers library, pinned to version 4.57.1
  • Laptops, desktops and other local machines, as the card targets on-device deployment
  • Windows, macOS or Linux
Use case | Who | What they get back
Coding help | Developers | Code and explanations at the thinking level you choose
Agent tasks | Agent builders | Tool-use and multi-step planning from a small model
Long-context reading | Analysts | Answers drawn from long inputs

How to set it up: You need these first:

  • Python and pip
  • Transformers at version 4.57.1
  • About 8.2 GB of disk for the BF16 weights, or about 2.1 GB for a 4-bit estimate
  1. Install the exact transformers version the card names.
  2. Download the model files, or let transformers fetch them on first load.
  3. Load the tokenizer and model with the Python code below.
pip install transformers==4.57.1
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "XHToken/Spark-X2.6-4B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    torch_dtype="auto",
    device_map="auto",
)
messages = [{"role": "user", "content": "What is the capital of Anhui Province?"}]

How to use it: Put your question into a list of messages, pass it through the tokenizer's chat template, and generate. The card's example turns thinking on in the template. Choose none, low or high thinking to trade answer quality against speed and cost.

Tool | What it does
enable_thinking=True | Turns thinking on in the chat template example
Thinking levels | None, low or high, so you balance quality, latency and cost
trust_remote_code=True | Lets the code that ships with the model run when it loads
device_map="auto" | Places the model on the devices you have

Example: You ask, "Write a function that checks whether a string is a palindrome." With thinking on, the model reasons first and then returns the function. With thinking at none, it answers faster with less reasoning.

For newcomers and experts: This is a small model that you can run on your own machine. A good first step is the short Python example above, with thinking on, and then the same question with thinking off.

The authors say the gains come from post-training alone, with the architecture unchanged from the earlier release. They report that it matches or beats some models of about 9B parameters, and that its inference speed is on par with Qwen3.5-4B and Gemma-E4B.

You write messages for the model
The chat template adds the thinking setting
The model reasons, then answers
You read the text it returns

Good to know: Lower thinking effort costs a little accuracy and saves output length, by the card's numbers.

Title: Average score drop from high to low effort
Spark-X2.6-4B: 1.7 points
Spark-X2.6-1.7B: 4.0 points
  • Output length: switching from high to low effort shortens average output by 22.0% for the 4B model and 37.3% for the 1.7B model
  • Claims: the comparisons with other models are the authors' own, shown as charts on the card
  • Other versions: 63 quantized and 23 fine-tuned versions made by other people are listed
  • License: Apache 2.0
  • Cost to run: none named, you supply the hardware
  • Data it reaches: the prompts you give it

On Hugging Face, 13 November 2026

  • Task: text generation
  • Library: transformers
  • Parameters: 4.1B
  • Weights: about 8.2 GB in BF16; about 2.1 GB at 4-bit (estimate)
  • Formats: Safetensors
  • Downloads in the last 30 days: 28,117
  • Likes: 1,041
  • License: apache-2.0
  • Languages: en, zh
  • Based on: XHToken/Spark-X2.6-4B-Base
  • Quantized versions: 66
  • Fine-tunes: 23
  • Tags: transformers, safetensors, spark2_5, text-generation, sparkx2_5, conversational

Links

Get the model

Download its files with Hugging Face's command line:

pip install -U huggingface_hub
hf download XHToken/Spark-X2.6-4B

Then follow the usage in its model card. Nothing in this kit runs by itself.

Files
README.md  5 KB

1 file, 5 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Compare with similar

Listed Hugging Face models in the same category that share the most tags with this one.

ProductDownloads, last 30 daysLikesParametersLicenseLast change
Spark-X2.6-4B This page28,1171,0414.1Bapache-2.0
Spark-X2.5-4BShares sparkx2_5 · spark2_5 · text-generation8,6971,4424.1Bapache-2.0
Spark-X2.6-1.7BShares sparkx2_5 · spark2_5 · text-generation5,095841.7Bapache-2.0
Spark-X2.6-4B-BaseShares sparkx2_5 · spark2_5 · text-generation2,331474.1Bapache-2.0
Spark-X2.6-4B-FP8Shares sparkx2_5 · spark2_5 · text-generation2,048394.1Bapache-2.0
Spark-X2.6-1.7B-BaseShares sparkx2_5 · spark2_5 · text-generation1,272151.7Bapache-2.0
Numbers as Mindket last read them, from 2026-11-12 to 2026-11-13.

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.

gmaysXHToken/Spark-X2.6-4B3 pointsDavid MetcalfNot sure if Qwen4 (imminent) will release smaller than 27B, but until then, Spark-X2.6-4B, FrogNano-4B, & Ornith-1.5-9B are interesting against Qwen3.5-9B for agent local coding too. Latest Spark reviews and benches are pretty good: huggingface.co/XHToken/Spar... huggingface.co/XHToken/Spar...2 likes · 1 replySciheraldSpark-X2.6-4B: 4B On-Device AI Model With Controllable Thinking XHToken released Spark-X2.6-4B, a 4.1B parameter open-source AI for on-device use. It features a 'controllable thinking budget' and improved coding and agent… #science #AI #MachineLearning #OpenSource3 likesSparkLLMDSpark for Spark-X2.6-4B is here! ✨ Average BF16 speedup: 2.14x RTX 4090 / 2.50x M5 Pro. ❤️ Like & download! ModelScope: https://modelscope.cn/models/XHToken/Spark-X2.6-4B-DSpark-GGUF https://huggingface.co/XHToken/Spark-X2.6-4B-DSpark-GGUF1 likeSparkLLMSame A40, same Spark file. infosave's CUDA path reports 111.5 vs 80.2 tok/s after 4k tokens. Explore the original charts, memory costs and quality trade-offs. Author tests, not our rerun. https://huggingface.co/XHToken/Spark-X2.6-4B/discussions/34@fenju.bsky.socialA model card names a Transformers version, but no minimum VRAM. Should an extractor guess? In this Scrapling + Spark test, it returned the install command with a source quote—and left VRAM unknown. https://huggingface.co/XHToken/Spark-X2.6-4BSparkLLMSpark-X2.6-4B in two live web assistants: English questions, real replies, selectable thinking levels. Share your demo in the replies! Full case and GIFs: https://huggingface.co/XHToken/Spark-X2.6-4B/discussions/29デイリーHuggingFaceトレンド今日のHuggingFaceトレンド XHToken/Spark-X2.6-4B デバイス上で動作する小型汎用言語モデルSpark-X2.6-4Bのモデルウェイトと設定ファイルを提供しています。 ポストトレーニングの改善により、コーディング、エージェント機能、長文コンテキスト、多言語対応、推論能力を向上させ、実世界でのタスクを遂行するオンデバイスエージェントの実現を目的としています。Steven | SelfHostedSIPublisher's own table: huggingface.co/XHToken/Spa...

Searched

More from Mindket

See all from Mindket

anaksor-ocr

Sokheng · Kit

Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…

New

Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…

New

ACE-Step 1.5 XL SFT

ACE-Step · Kit

Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…

New

Similar in Developer

See all in Developer

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

buzz

block · Kit

Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…

New37.3k

plannotator

backnotprop · Kit

Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.

New10.5k