The scripts are in the repository, not in the installed package. Clone it,
then
cd recipes/papers/reinforce-ada before running the commands below. Browse this recipe on GitHub.Recipe
- Base:
Qwen/Qwen2.5-1.5B-Instruct. Data: GSM8K, 512 train prompts from the train split, 120 held out from the test split. - Reward, both arms: the binary outcome,
MathEqualagainst the GSM8K gold number. A program, not a judge. - Baseline: TRL GRPO + LoRA r=32, 40 steps, 12 prompts x 4 rollouts per step, lr 1e-4, on-policy (one update per batch), no KL, advantage = reward minus the group mean with no std division (the reference script’s
norm_adv_by_std_in_grpo=False). - Recipe: the same trainer and the same 12 x 4 update, with the generation step replaced by Reinforce-Ada-Seq, balanced exit, at the authors’ own defaults (
round_repeat=8,max_rounds=4,positive_threshold=0.7,global_stat_est=True, read fromRLHFlow/Reinforce-Ada). A prompt that never splits in 32 draws keeps 4 of what it has, at zero advantage, as it would under GRPO. - Eval: pass@1 on the 120 held-out tasks, 4 samples per task. Two training seeds per arm (17 and 18), so the verdict can resolve. Paired delta with a 95% interval (
wai.compare,train_runs=).
Run
Result
Recipe vs baseline: +0.042 [-0.008, +0.085] on the seed-17 pair over 120 paired tasks; +0.047 [-0.047, +0.140] across both training seeds. Verdict: flat. Both recipe seeds beat both baseline seeds (0.70 and 0.68 against 0.66 and 0.63), and the direction matches the paper’s +1.5 to +3.2 points over GRPO at 4 rollouts on MATH500, but two seeds and 120 tasks cannot tell a four-point gain from zero.
holdout_size puts the bar at about 320 tasks for a gain this size.
The sampler did what the paper says it does, and less of it than the paper needs:
GSM8K is easy for this model: three draws in four are right. The prompts that stay flat are mostly the ones the model always gets right, which need a wrong answer that 32 draws at 0.9 temperature do not produce. That is where the extra generation goes, and why the recipe costs 2.5 times the GPU minutes for half as many flat groups.
Checks
Nothing in this table is ticked by hand: every cell is written byrecipe.py into results.json.
Climb
Learned
- The generation step swaps in without touching TRL’s loss. The override calls TRL’s own
_generate_and_score_completionsonce per round on the prompts still active, keeps 4 rollouts per prompt, re-pads them, and hands back a batch the same shape TRL asked for. On-policy and without KL is a requirement, not a choice: the rebuilt batch carries no old or reference log-probs. - Half the flat groups came back. The half that did not are the easy prompts, and on GSM8K at this model size the easy prompts are most of them. The paper trains on competition math where the model is right far less often; the recipe should move more on a harder set, or with the positive-focused exit, which stops at one right answer and leaves the always-right prompts alone.
- Next: a harder train set (MATH level 3 to 5) where the base pass rate is near 0.3, and 320 held-out tasks so a four-point gain can resolve. Same two seeds.
References
- Shao, Z. et al. DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models. arXiv:2402.03300, 2024.
- Lambert, N. Reinforcement Learning from Human Feedback. arXiv:2504.12501, 2025. Chapter Reinforcement Learning.
- Yu, Q. et al. DAPO: An Open-Source LLM Reinforcement Learning System at Scale. arXiv:2503.14476, 2025.
- Lambert, N. Reinforcement Learning from Human Feedback. arXiv:2504.12501, 2025. Chapter Evaluation.
- Lambert, N. et al. Tülu 3: Pushing Frontiers in Open Language Model Post-Training. arXiv:2411.15124, 2024.
- Gao, L., Schulman, J., Hilton, J. Scaling Laws for Reward Model Overoptimization. ICML 2023. arXiv:2210.10760.