Views
No views yet
<think>...</think> blocks, as the base model and the
SFT data both do. It was trained as the starting checkpoint for research on compressing
chain-of-thought traces into short sequences of abstract-token embeddings, but nothing
about the checkpoint is specific to that use — it is an ordinary reasoning SFT of Qwen3-4B.1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model_id = "sagisch/Qwen3-4B-Dolci-Think-SFT-7B"
5tokenizer = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForCausalLM.from_pretrained(model_id, dtype="auto", device_map="auto")
7
8messages = [{"role": "user", "content": "How many r's are in strawberry?"}]
9inputs = tokenizer.apply_chat_template(
10 messages, add_generation_prompt=True, return_tensors="pt"
11).to(model.device)
12
13out = model.generate(inputs, max_new_tokens=2048, temperature=0.6, top_p=0.95, top_k=20)
14print(tokenizer.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))max_position_embeddings), inherited from the
base model.| Base model | Qwen/Qwen3-4B (4B params, 36 layers) |
| Data | allenai/Dolci-Think-SFT-7B, deterministic 600k-example train subset (20k held out for eval) |
| Objective | Cross-entropy on assistant tokens only (prompt and template tokens masked) |
| Steps | 4,518 (1 epoch), ~6.0B tokens seen |
| Global batch | 128 sequences, token-budget batching at 32,768 tokens/micro-batch |
| Max sequence length | 32,768 (2,716 of 600k rows dropped as longer) |
| Optimizer | AdamW, lr 1e-5, cosine schedule, 3% warmup, β=(0.9, 0.95), wd 0.1, grad clip 1.0 |
| Precision | fp32 master weights, bf16 autocast, SDPA attention, gradient checkpointing |
| Hardware | 4× H100, DDP |
| Seed | 1337 |
| Step | 10 | 3200 | 3600 | 4000 | 4400 | 4518 |
|---|---|---|---|---|---|---|
| eval loss | — | 0.8462 | 0.8450 | 0.8444 | 0.8442 | 0.8442 |
best checkpoint by held-out loss, cast to bf16. Optimizer
state is not included — this checkpoint is for inference and further fine-tuning from
scratch-initialized optimizer state, not for resuming the original run.Qwen/Qwen3-4B is currently unsupported.