Spark-X2.6-1.7B
a compact language model with a controllable thinking budget
2 min readupdated
Built by the XHToken team, this model is designed to run efficiently on local hardware and mobile devices. It builds on the Spark-X2.5-1.7B architecture and boosts generation quality through post-training. The release delivers strong performance across coding, complex multi-step tasks, and long-context workflows. Its standout feature is configurable thinking levels, letting you balance response speed against resource usage.
Key features
- Upgraded coding and agents: more accurate execution of complex instructions, software engineering tasks, and advanced tool use.
- Fast on-device speeds: high token generation throughput among open models of a similar size.
- Controllable thinking budget: three operating levels (none, low, high) to trade off reasoning depth against latency.
- Long context: efficient processing of large amounts of information in real-world scenarios.
What you can do
- Local assistant: run the model locally via SGLang, vLLM, or llama.cpp for privacy-sensitive tasks.
- IDE integration: plug its agentic capabilities and code generation directly into your local dev tools.
- On-hardware inference: deploy the language model on consumer GPUs or local servers with hardware acceleration.
Example
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "XHToken/Spark-X2.6-1.7B"
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?"}]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
enable_thinking=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=131072, do_sample=True)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
Read more
DetailsArchitecture: 1.71 billion parameters (1.7B).
Training details: keeps the Spark-X2.5-1.7B architecture while improving capabilities via post-training.
Mode flexibility: switching from high to low reduces average output length by 37.3%.
Integration: supports Transformers, SGLang, vLLM, MLX, llama.cpp, and Ollama.










Comments