The mechanism
export writes one JSON object per line, in the shape trainers read,
and refuses a broken row. The training itself is a recipe, not a call in
this course, because it needs a GPU: the
GRPO recipe
runs on Modal on one A10G in under fifteen minutes, on your Modal account.
The proof is a paired comparison. Every held-out task is run by both
models, the difference is taken task by task, and the interval on the
average difference has to exclude zero. Paired, because the same hard
task is hard for both models, and pairing cancels that out. The library
also refuses to compare two runs that were not on the same tasks.
Run it
There is no trained model in this course, so the two arms below are two stand-in agents: one that plants a mistake on half its rows, and one that plants it on a tenth. Everything else is exactly what you run after a real training job.tasks=before pins the second run to the first run’s
tasks, and model_version names the arms.
+0.05 [-0.03..+0.13], the verdict would be no difference, and the
honest sentence is “training did not move it”.
One PASS is one PASS. The report’s own verdict for this run is
“moved, unreplicated”: it moved once. Run it again with a different seed
before you tell anyone. A result you can repeat is the only kind this
library is built to produce.
Then it starts again
The model you served is now the agent. Its traffic is the next set of rows. Lesson 2 to lesson 7, again, on what it still gets wrong. That is the loop, and the reason the agent gets better while it works.Where to go now
- Quickstart: the same program, with your own agent and your own judge.
- Your model and your key: name the model as a string, keep the key in the provider’s own variable.
- Evals: the measurement half on its own, for a team that is not ready to train.
- Train on your own GPU: GRPO and DPO recipes on Modal, with the paired delta at the end.
- Papers, reproduced: one recent post-training paper per recipe, each with its verdict.
Where it comes from
- Miller, E. Adding Error Bars to Evals. arXiv:2411.00640, 2024. The paired difference, and why it is the right test for before and after.
- Rafailov, R. et al. Direct Preference Optimization: Your Language Model is Secretly a Reward Model. NeurIPS, 2023. arXiv:2305.18290. The DPO recipe above.
- Shao, Z. et al. DeepSeekMath. arXiv:2402.03300, 2024. The GRPO recipe above.
- Lambert, N. Reinforcement Learning from Human Feedback. arXiv:2504.12501, 2025. Chapters Direct-Alignment Algorithms and Evaluation.