Views
No views yet
Qwen3-0.6B-Base --SFT (cold start)--> unified <think>/<answer> format --GRPO--> this checkpoint<answer> tag, normalize, compare to ground truth. No reward model.global_step_116 of grpo_qwen3_0.6b (best result in the sweep).| Method | GSM8K pass@1 | GSM8K pass@8 | MATH pass@1 | MATH pass@8 |
|---|---|---|---|---|
| Base (no post-training) | 4.8 | 30.6 | 3.7 | 24.8 |
| SFT only | 38.9 | 78.4 | 29.0 | 66.4 |
| SFT + GRPO (this model) | 67.7 | 85.0 | 48.8 | 79.2 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_id = "Linyuana/qwen3-0.6b-grpo-math-reasoning"
4tokenizer = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
6
7prompt = "Natalia sold clips to 48 of her friends in April, and then she sold half as many clips in May. How many clips did Natalia sell altogether in April and May?"
8messages = [{"role": "user", "content": prompt}]
9inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
10output = model.generate(inputs, max_new_tokens=512, temperature=0.8, top_p=0.95, do_sample=True)
11print(tokenizer.decode(output[0], skip_special_tokens=True))<think>...</think><answer>...</answer> format; extract the final answer from within the <answer> tag.strict_format_rate (exact <think>/<answer> tag closure) is lower than expected across all training stages despite has_answer_rate >94%; this is a known open issue in the format-matching regex, not a correctness issue — see Open Question in the repo.