Views
No views yet
Qwen/Qwen2.5-1.5B-Instruct on GSM8K.<thinking> token (id 151665) is added to the vocabulary and inserted into the training
sequences at positions chosen by the model's own token confidence, so the model learns to spend
latent computation there before emitting an answer.Qwen2ForCausalLM — the run used thinking_use_mlp: false, so the checkpoint
contains no modules beyond the base architecture.1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_id = "robinzixuan/LT-Tuning-Qwen2.5-1.5B-Instruct-GSM8K"
4tok = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForCausalLM.from_pretrained(model_id, dtype="bfloat16", device_map="auto")
6
7messages = [{"role": "user", "content": "Natalia sold clips to 48 friends in April, "
8 "and then she sold half as many clips in May. "
9 "How many clips did she sell altogether?"}]
10inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
11print(tok.decode(model.generate(inputs, max_new_tokens=512)[0], skip_special_tokens=True))| Stage | Name | Mode | Thinking insertion prob |
|---|---|---|---|
| 0 | stage0-cot | common | 0.0 |
| 1 | stage1-hidden-state | hidden_state | 0.85 |
| 2 | stage2-soft-fusion | soft_fusion | 0.95 |
thinking_strategy: confidence) to pick where the <thinking> tokens go.| Hardware | 8× H100 80GB |
| Precision | bf16, FlashAttention-2 |
| Global batch | 32 (4 per device × 8 GPUs × 1 grad accum) |
| Steps | 702 (234 per stage) |
| LR | 5e-5, warmup ratio 0.05, weight decay 0.01 |
| Grad clipping | 1.0 |
| Wall clock | 4h08m |
| Train data | GSM8K socratic, 7473 train / 1319 val |
stage2-soft-fusion loss settled around 0.36 (grad_norm ~1.7, stable throughout).train_loss of 1.297 is the mean across all three stages and is not a meaningful
convergence figure — the stages optimize different objectives, so their losses are not comparable
to each other.Qwen2.5-1.5B-Instruct base model.