💾 Want the same persona at 2.4 GB? → Spark-X2.6-4B-CuteHuman-GGUF
The identical fine-tune, quantized:
Q4_K_Mat 2.42 GiB,Q8_0at 4.07 GiB. This repo is the full bf16 checkpoint (7.66 GiB, onemodel.safetensors).
🖼 Demo
Both shots are the same session in a chat client with the CoT trace collapsed — the WORK row is the
reasoning panel, the ANSWER row is the reply. Turn it on to see the thinking trace.
中文 · yoho → 在干什么 → 写个代码,绘制一个星星 → 你的优点是什么
Greeting, small talk, then a matplotlib star. Emoji and ~ come out unprompted.
English · hello → what are u doin → 8.2×9.12/2.3 = → build mlp in python numpy
Small talk, then exact-decimal arithmetic (74.784, and it says so out loud), then a full NumPy MLP.
📐 Specs
| Base | XHToken/Spark-X2.6-4B (Apache-2.0) |
| Architecture | Spark2_5ForCausalLM · 36 layers — 9 full-attention + 27 sliding-attention (window 512) · hidden 2560 |
| Attention | 16 heads / 4 KV heads · head_dim 256 · partial RoPE 0.25 on full-attention layers |
| Parameters | 4,112,079,360 (bf16, measured from the safetensors header) · 335.5 M embedding / 3.78 B non-embedding |
| On disk | 1 shard, 7.66 GiB |
| Context | 1,048,576 native (max_position_embeddings) · tokenizer advertises 131,072 |
| Vocab | 131,072 |
| KV cache | 36.0 KiB/token at full attention (9 full layers) — 4.50 GiB at 128 K, 36 GiB at 1 M |
🚀 Quickstart
[!IMPORTANT] This repo's
tokenizer_config.jsondeclarestokenizer_class: "TokenizersBackend", which needstransformers>=5.0.0. Ontransformers==4.57.1(the version upstream pins)AutoTokenizerraisesValueError: Tokenizer class TokenizersBackend does not exist or is not currently imported.The upstream checkpoint's own tokenizer config loads fine on 4.57.1 — this repo's does not.
pip install "transformers>=5.0.0" jinja2 # jinja2 is needed for apply_chat_template
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL = "wesjos/Spark-x2.6-4B-CuteHuman"
tokenizer = AutoTokenizer.from_pretrained(MODEL, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
MODEL, trust_remote_code=True, dtype=torch.bfloat16, device_map="auto"
)
messages = [{"role": "user", "content": "yoho"}]
inputs = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, tokenize=True,
return_dict=True, return_tensors="pt",
enable_thinking=False, # chit-chat: no thinking trace
).to(model.device)
out = model.generate(**inputs, max_new_tokens=256, do_sample=True,
temperature=1.0, top_p=0.95, top_k=-1)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
llama.cpp — native spark2_5 support landed in b10828;
v0.9.0 has it too.
llama-cli -m Spark-x2.6-4B-CuteHuman.Q4_K_M.gguf -p "yoho" -n 256
💡 Notes
- The persona lives in the weights. The chat template is byte-identical to upstream's — default system
prompt is
"you are a helpful assistant.", with no persona baked in — so an empty system prompt reproduces the screenshots. - Emoji and kaomoji are the default register. The habit is a style, not a rule: a system prompt like 「少用表情,正常说话」 / "tone the emoji down" is enough to soften it.
- Thinking is on by default. The template opens a
<think>block and supportsreasoning_effortlow/high. For chit-chat passenable_thinking=False, otherwise the trace eats the budget. - The GGUF carries its own chat template (verified inside the file's KV block, and it matches this repo's
chat_template.jinjabyte for byte) — no--chat-template-fileneeded.
⚠️ Limitations
- 4 B knowledge ceiling. Facts, math and long reasoning are base-model level — this is a persona fine-tune, not a capability upgrade.
- The screenshots were taken under a chat client that is not shipped here. This repo has no
webui/directory, and the client in the shots showsWORK/ANSWER/STEPS/cachedlabels that appear nowhere in the siblingSpark-x2.6-4B-HTMLWebUI. - Tool use is inherited and unaudited. The template carries the upstream tool-call and
toolrole handling; nothing here was probed for refusal behaviour. - No training metadata ships with this repo — no data size, no steps, no rank. Ask the owner if you need it.
📄 License
Apache-2.0, inherited from the Spark-X2.6 model series.