Act 3 · Frontier & Caveats

13. Learned Reasoning: One Law, Two Knobs

Download the GRPO notebook (ipynb, 0.6 MB) ↓

STaR is reinforcement learning in its simplest form: the reward is 1 or 0, and only the 1s are trained on. GRPO keeps that reward but goes further: it learns from every chain, right or wrong. At scale, it teaches the model something new, to think longer on its own.

1. What can a wrong chain teach?

The loop illustrated below is GRPO's (Group Relative Policy Optimization), the recipe DeepSeek used to train R1-Zero.reference 1,reference 2 For every problem, the model writes several chains, and a program scores each answer 1 or 0. Through reinforcement, the model is penalized for chains that scored poorly and rewarded for chains that scored well. Below, the loop is drawn first, so you can watch every chain reach reinforce, and then written out as an algorithm.

×G chains✓ right and ✗ wrong: every chain kept↺ repeatgenerate ×Ga group of chains, one problemrewardeach answer vs. the key: 1 or 0reinforcetoward ✓, away from ✗

Algorithm

M ← M0the same starting point as STaR
loop: for many steps
for (x, y) in problems:
ri, ŷi ← M(x) for i = 1…Ga group of G chains per problem; STaR writes one
si ← 1 if ŷi = y, else 0the same answer key as STaR: a short program, not another model
Ai ← (si − mean(s)) / std(s)each chain against its group's average; a wrong chain gets a negative weight instead of being dropped
M ← update(M, r, A)each ri pushed by its Ai, on the current model, not M0; a pull toward M0 keeps it from drifting too far

GRPO differs from STaR, and some other reinforcement-learning approaches, in what happens to a wrong chain. STaR writes one chain per problem, and drops it when the answer is wrong. GRPO, however, writes several and trains on every one. A wrong chain still teaches the model what not to do, so it is kept. Using this method, we can steer the model toward reasoning that reaches the right answer, and away from reasoning that doesn't. The steering happens at training time, unlike inference-time approaches such as best-of-N with a process reward model.

2. Better answers, longer chainsmeasured · Qwen2.5-1.5B-Instruct · 600 GSM8K problems

To show how GRPO improves a model's reasoning, and with it the answers that reasoning reaches, we ran 400 steps of it on Qwen2.5-1.5B-Instruct, using grade-school maths word problems (GSM8K). This model had already been fine-tuned to follow instructions. Even so, the training raised its accuracy by about 9 points, and taught it to write about 18% more tokens per answer, though nothing in the reward asks for length.

020406080100641282565121024before trainingafter 400 stepstraining: +9.7thinking budget: tokens the one chain may write (log scale)GSM8K accuracy, one chain (%)
74.2%GSM8K accuracy here
+9.7what training did at this budget

Training raises the ceiling. With room to finish (1,024 tokens), the trained model is right more often: 64.5% before training, 71.5% after 50 steps, 74.2% after 400. Most of the gain comes early. But the trained model needs that room. Cut both models off at 128 tokens, and the trained one scores 13.8% against the untrained model's 28.0%, because its longer answers are less likely to finish in time. Past 512 tokens, neither curve moves; on these problems, the chain is already done.

3. At scale, the chains keep growingR1-Zero · AIME 2024 · DeepSeek-AI 2025

The GRPO reward function only steers the model based on whether the reasoning produced a correct answer. It does not reward longer responses or tell the model to double-check its work.

We've already seen how a small model (Qwen2.5-1.5B-Instruct) reacted to this setup: as accuracy climbed, it naturally started using more tokens to work through problems. To see what happens when you scale this up, we can look at DeepSeek's R1-Zero, which used the exact same training method on a much larger base model (the start and end of each curve come from DeepSeek's paper; the climb between them is drawn).reference 1

Move the slider forward in 500-step increments and keep an eye on how both accuracy and response length change over time.

15.6%

AIME 2024 pass@1

≈1,000

avg response tokens

AIME 2024 pass@1 (%)04080avg response (tokens) · test-time compute05k10k02k4k6k8kthe aha appearsno term in the reward mentions lengthnobody is turning this dialRL training step

the trace, as a shape · early in training

≈1,000 tokens

one passanswer

As you can see above, there is a very interesting side effect of RL here. R1-Zero's chains begin to interrupt themselves. In the trace DeepSeek shows, the model stops mid-solution and second-guesses its reasoning. It then goes back to re-derive an earlier step. This was not the goal of RL, nor is it exclusive to RL: on rare occasions, it can actually happen in Qwen2.5 base models.reference 3 However, RL made it significantly more common.

4. Training stacks with inference-time scaling

It is now clear that RL methods such as GRPO and STaR result in longer chains and better accuracy. You may wonder whether we still need inference-time scaling methods at all, or whether we should simply train more. To answer that question, here is a quick overview of how inference-time scaling methods can actually be stacked with reasoning-focused RL.

5. Whose chains did the student read?measured · Qwen2.5-0.5B-Instruct · 300 GSM8K problems

A trained model's chains are new training data, and they can teach other models.

To see how, we distilled our trained Qwen2.5-1.5B-Instruct into Qwen2.5-0.5B-Instruct. The 1.5B answered GSM8K's training questions, a program kept the chains that reached the right answer, and the 0.5B was fine-tuned to reproduce them: the same fine-tuning STaR uses, on another model's chains. To check that the reasoning is what travels, a second 0.5B was trained the same way on chains from the 1.5B before RL.

1.5B before RL · 65.0%after · 72.0%

0.5B trained on 1.5B, after RL · 49.3% on GSM8K · 238 tokens per answer

+7.0 points over the student that read the 1.5B before RL.