Views
No views yet
<think> / </think> reasoning traces before
producing a final answer.| Field | Value |
|---|---|
| Base model | Qwen/Qwen3-0.6B |
| Fine-tuning type | Chain-of-Thought SFT (full fine-tune) |
| Training dataset | PursuitOfDataScience/MiniMax-M2.1-Mixture-of-Thoughts |
| Hardware | 1 × NVIDIA H100 (Hopper) |
| Precision | bfloat16 |
| Attention | PyTorch SDPA (attn_implementation="sdpa") |
| Context length | 4096 tokens |
| Epochs | 1 |
| Effective batch size | 128 (batch_size × gradient_accumulation) |
| Learning rate | 2e-5 (cosine decay, 100 warm-up steps) |
| Optimizer | AdamW (fused) |
| Weight decay | 0.01 |
| Max grad norm | 1.0 |
| Gradient checkpointing | ✓ (use_reentrant=False) |
| torch.compile | ✓ (Hopper optimisation) |
<think>…</think> tags.user: <your question here>
assistant: <think>
<step-by-step reasoning>
</think>
<final answer>1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model_id = "PursuitOfDataScience/Qwen3-0.6b-thinking"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id)
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 torch_dtype=torch.bfloat16,
10 device_map="auto",
11)
12
13question = "If a train travels 120 miles in 2 hours, how fast is it going in mph?"
14
15# Build the prompt exactly as used during training
16prompt = f"user: {question}\nassistant: <think>\n"
17
18inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
19
20with torch.no_grad():
21 outputs = model.generate(
22 **inputs,
23 max_new_tokens=2048,
24 temperature=0.7,
25 top_p=0.9,
26 do_sample=True,
27 )
28
29response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
30print(response)<think>…</think> tags and then produce the
final answer. For GSM8K-style problems the final answer is typically marked with
#### <number>.assistant:) is included in the
loss computation. The user turn and system context are masked (-100) so the
model learns to generate responses, not to predict the input.user: {question}\nassistant: <think>\n#### XThe answer is X / Answer: X / Final answer: X\boxed{X}| Steps (checkpoint) | Correct | Total | Accuracy |
|---|---|---|---|
| 0 (base model — Qwen/Qwen3-0.6B) | 379 | 1319 | 28.73% |
| 500 | 478 | 1319 | 36.24% |
| 1000 | 528 | 1319 | 40.03% |
| 1500 | 524 | 1319 | 39.73% |
| 2000 | 579 | 1319 | 43.90% |
| 2500 | 548 | 1319 | 41.55% |
| Final model | 562 | 1319 | 42.61% |
1@misc{qwen3-0.6b-thinking,
2 author = {PursuitOfDataScience},
3 title = {Qwen3-0.6b-thinking: Chain-of-Thought SFT on Qwen3-0.6B},
4 year = {2026},
5 howpublished = {\url{https://huggingface.co/PursuitOfDataScience/Qwen3-0.6b-thinking}},
6 note = {Fine-tuned from Qwen/Qwen3-0.6B on PursuitOfDataScience/MiniMax-M2.1-Mixture-of-Thoughts}
7}