Views
No views yet
| Eval Setting | GSM8K Accuracy | Notes |
|---|---|---|
| Baseline 8-shot CoT | 53.5% | Pre-trained, no fine-tuning |
| Baseline zero-shot | 52.1% | Pre-trained, no fine-tuning |
| GRPO zero-shot | 58.0% (+5.9pp) | Best result — model reasons autonomously |
| GRPO 8-shot (plain format) | 50.4% (-3.1pp) | Few-shot examples conflict with learned policy |
GRPO 8-shot (<think> aligned) | 34.1% (-19.4pp) | Format-aligned examples hurt even more |
<think> tags<think> tags in examples caused the model to confuse context with its own generation, dropping to 34.1%<think> tags<think> tag format before RL exploration<think> tags, 0.2 for #### answer)1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "zosmaai/Qwen3.5-0.8B-GRPO-Math"
4tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
5model = AutoModelForCausalLM.from_pretrained(
6 model_name,
7 torch_dtype="auto",
8 device_map="auto",
9 trust_remote_code=True,
10)
11
12# Best used in zero-shot — the model has its own reasoning policy
13messages = [
14 {"role": "system", "content": "You are a helpful assistant that thinks step by step. Show your reasoning inside <think> tags before giving your final answer. End math answers with: #### <number>"},
15 {"role": "user", "content": "If a train travels at 60 mph for 2.5 hours, how far does it go?"},
16]
17
18text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
19inputs = tokenizer(text, return_tensors="pt").to(model.device)
20outputs = model.generate(**inputs, max_new_tokens=512, do_sample=False)
21print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))Note: This model performs best in zero-shot mode. Do not use few-shot examples — they conflict with the model's learned reasoning policy and reduce accuracy.