Part III · RL for LLMs · Chapter 21

The frontier (as of October 2026)

What the latest models do in post-training, and the open problems worth watching.

~180 minBefore this: LLM as a policy, RLVR & GRPO, Algorithm zoo, Failure modesUpdated 2026-10

Here is a sentence from the post-training section of the DeepSeek-V4 technical report (April 2026):

Although the training pipeline largely mirrored that of DeepSeek-V3.2, a critical methodological substitution was made: the mixed Reinforcement Learning (RL) stage was entirely replaced by On-Policy Distillation (OPD).

Twenty chapters ago, almost every word in that sentence would have been opaque. Now most of it is familiar. “Reinforcement learning stage” means a policy-gradient method with a group baseline (Chapters 15 and 16). “Mixed” means many reward sources and environments trained together. “On-policy” is the distinction from Chapter 5. One phrase is new: on-policy distillation. It is one of the biggest changes of the past year, and it turns out to be an idea you already know (DAgger, from Chapter 10) combined with an objective you already solved (the Gibbs optimum of KL-regularized RL, derived in Chapter 10 and used throughout Chapter 11).

This last chapter has three jobs. First, it gives you a map of where RL for language models stands in October 2026: what the major model reports disclose, and the trends that connect them. Second, it teaches the two genuinely new ideas you need in full, with worked numbers: on-policy distillation, and the “maximum likelihood” view of RL with verifiable rewards. Third, it prepares you to keep going without a course. It lists the open problems worth your time and gives you a checklist for reading (and writing) papers in a field that moves monthly.

Nine years in one picture

Before the details, the big picture. The demo below places 55 milestones from 2017 to October 2026 on six lanes. Each milestone links to the chapter that teaches it and to its source.

Interactive RL for language models, 2017 to October 2026
Tap any dot (or press Prev / Next) to see what that work changed, what it built on, and which chapter covers it.

What to try: (1) Press Play history and watch where the dots land. Until 2022 most dots fall in the Rewards lane (learning rewards from people); from 2024 the action moves to Reasoning; in 2025–26 it spreads to Agents, Systems and Safety. (2) Tap DeepSeek-V4 (Algorithms, April 2026) with 'Highlight lineage' on. The solid lines trace what it built on, back through on-policy distillation (GKD, 2023) and DeepSeek-R1 to PPO. (3) Tap PPO (2017) and follow the dashed lines: almost everything in the Algorithms lane descends from it. (4) Filter to Safety only and read the six dots in order: over-optimization (2022), sycophancy, CoT monitoring, gpt-oss's hands-off-the-CoT policy, misalignment from reward hacking, and a deliberately trained reward seeker (2026). (5) The bars at the bottom count milestones per year in this hand-picked list. They show where attention went, not how much was published.

The arc in one paragraph: RL entered language models through human preferences (2017–2022: reward models, PPO, InstructGPT, ChatGPT). Then came a period of simplification (2023–24): DPO removed the RL loop, and GRPO and RLOO removed the critic. Next, verifiable rewards turned RL into a way to teach reasoning (2024–25: o1, DeepSeek-R1, the GRPO variants). And in 2025–26 the field went wide: agents in thousands of environments, rubric-based judges for tasks with no right answer, systems that keep the trainer and sampler in numerical agreement, distillation to merge specialists, and a sober look at what reward hacking does to a model at scale.

What the 2026 model reports actually say

Model reports are the closest thing the field has to lab notebooks. Here is what the major ones disclose about post-training. Columns: the RL algorithm, where the rewards come from, the order of stages, whether there is a KL penalty to a reference model, and one notable detail. “n/d” means not disclosed.

Model (report)RL algorithmReward sourcesStages after pretrainingKL to referenceNotable
DeepSeek-R1 (Jan 2025)GRPOrules: accuracy, format, language; a preference RM late in the last stagecold-start SFT → reasoning RL → rejection sampling + SFT → RL for all scenariossmall (0.001)R1-Zero: long reasoning from RL alone; PRMs and MCTS tried and dropped
Kimi k1.5 (Jan 2025)mirror-descent policy gradient, mean-reward baselinerules; length rewardSFT → RLto the previous iteratepartial rollouts for long outputs
Qwen3 (May 2025)GRPOrules; RMs with and without reference answerslong-CoT cold start → reasoning RL → thinking-mode fusion → general RL; small models by on-policy distillationn/dreasoning RL on only 3,995 query–verifier pairs
MiniMax-M1 (Jun 2025)CISPOrules + RMsSFT → RLnoneFP32 LM head to fix train–inference mismatch
Kimi K2 (Jul 2025)k1.5 objective, Muon optimizerverifiers + self-critique rubric rewardSFT → joint RLτ term to old policy3,000+ real and 20,000+ synthetic tools
GLM-4.5 (Aug 2025)GRPOrules, RM, critique modelexpert RL (reasoning, agent, chat) → self-distillationnonesingle-stage 64K-token RL beat a 16K→64K schedule
gpt-oss (Aug 2025)“CoT RL techniques similar to o3”n/dn/dn/dno direct optimization pressure on the chain of thought
DeepSeek-V3.2 (Dec 2025)GRPOrules, length, language; generative RM with per-prompt rubricsspecialists → distillation → one mixed RL stageIS-corrected k3k_3RL budget “exceeds 10% of the pre-training cost”
Olmo 3 (Dec 2025)OlmoRL (GRPO variant)verifiers + LM judgeSFT → DPO → RLVRnonefully open data, code and logs; no std normalization; truncated IS
GLM-5 (Feb 2026)GRPO + IcePoprules, outcome RM, generative RMreasoning RL → agentic RL → general RL → cross-stage OPDnonetoken-in-token-out gateway to avoid re-tokenization mismatch
Composer 2 (Mar 2026)group policy gradient, Dr. GRPO-styleoutcome + nonlinear length penaltycontinued pretraining → RL inside the product’s own harnessk1k_1MoE routing replay; in-flight weight updates
DeepSeek-V4 (Apr 2026)GRPO for specialistsrules + generative RMspecialists (SFT + GRPO) → multi-teacher OPD, more than ten teachersn/dfull-vocabulary OPD; FP4 quantization-aware training
Nemotron 3 Ultra (Jun 2026)asynchronous GRPOmulti-environment verifiersSFT → RLVR → multi-teacher OPD, more than ten teachersn/dteachers for SWE, search, terminal, safety, chat, STEM…
Kimi K3 (Jul 2026)K2.5-style, with a per-token regularizer for stale datarules + agentic generative RM with a rubric protocolSFT → nine RL experts (3 domains × 3 effort levels) → multi-teacher OPDper-token regularizerover-budget trajectories get reward −1; over-long candidates automatically lose the judge’s comparison

A few entries use vocabulary from earlier chapters or from the reports themselves:

  • k1k_1 and k3k_3 are the per-token KL estimators from Chapter 11. “IS-corrected” means each token’s KL term is multiplied by an importance weight, the ratio of the current policy to the old one that sampled the tokens, so the estimate stays unbiased after the policy has moved.
  • “τ term” (Kimi) is a squared penalty τ(log⁡(πθ/πold))2\tau\big(\log(\pi_\theta/\pi_\text{old})\big)^2 that keeps the new policy near the one that sampled the data.
  • IcePop, routing replay and the FP32 LM head are fixes for train–inference mismatch (Chapter 20).
  • Muon is an optimizer, an alternative to Adam. It has nothing to do with RL.
  • “Specialists” or “experts” are separate copies of the model, each trained with RL on one domain.

You don’t need to remember the rows. Read down the columns instead, and three patterns stand out.

  1. The algorithm column is nearly constant. Every row is a REINFORCE-family method with a group or mean baseline and no learned critic. The differences are in the knobs from Chapter 16: clipping, normalization, aggregation, KL. The interesting variation has moved elsewhere.
  2. The reward column has widened. In 2025 it said “rules” (verifiers). By 2026 it says “rules + generative reward model + rubrics”. An LLM judge, often RL-trained itself, scores answers against a rubric written for each prompt (Chapter 14).
  3. The stages column grew a new last step. From late 2025, the pipeline often ends not with RL but with on-policy distillation: RL trains several specialist models, and distillation merges them into one. This is the single biggest structural change of the year, and it gets its own section below.

Quick check In the table, which change between DeepSeek-V3.2 (Dec 2025) and DeepSeek-V4 (Apr 2026) matters most for how the final model is trained?

Trend 1: the algorithm settled down

By mid-2026, most published recipes for RL with verifiable rewards share a common core. You built every piece of it in Chapters 15–16 and 20:

  • No critic. The baseline is the mean reward of the group of GG samples for the same prompt (GRPO, RLOO).
  • Mean-only advantages. A^(i)=r(i)−mean\hat A^{(i)} = r^{(i)} - \text{mean}, without dividing by the group standard deviation (Dr. GRPO, Olmo 3, DeepSeek-V3.2, Composer 2). Some recipes normalize over the whole batch instead (ScaleRL).
  • Token-level loss aggregation, so long wrong answers aren’t under-penalized.
  • Asymmetric or soft clipping: clip-higher, CISPO’s clipped importance weight, or masks that drop tokens whose ratio leaves a band.
  • No KL to a reference, or a weak one (GLM-4.5/5, Olmo 3, Magistral, DAPO). DeepSeek kept a corrected KL and says the right strength depends on the domain.
  • Zero-variance filtering: drop groups where every sample got the same reward. They carry no signal (Chapter 15).
  • Train–inference consistency as a first-class concern (Chapter 20). This means truncated importance sampling against the sampler’s own log-probs, replaying MoE routing decisions from the rollout, FP32 or matched-precision logits, and in 2026 quantization-aware training so that sampler and trainer run the same low-precision weights (DeepSeek-V4, Kimi K3).

The last point marks a quiet shift in where the trust region lives. PPO’s clip (Chapter 9) was designed to stop the new policy from straying too far from the old one. In 2026 systems, the main source of off-policy-ness is often not the optimizer. It comes from the gap between the inference engine that sampled the tokens and the trainer that computes gradients, plus staleness from asynchronous rollouts. The clip has been repurposed accordingly. GLM-5’s IcePop and Kimi K2.5’s log-ratio masks zero out tokens whose sampler-versus-trainer ratio is out of band, whatever the sign of the advantage.

Because the core has converged, the research questions moved up a level: what to reward, which environments to train in, how to schedule stages, and how to merge specialists. The rest of the chapter follows those questions.

Trend 2: RL compute became something you can forecast

Pretraining has had scaling laws since 2020: a smooth curve that lets you predict what a big run will achieve from small ones. RL post-training had nothing like that until ScaleRL (Khatri et al., October 2025). The team ran more than 400,000 GPU-hours of ablations and found that, for a fixed model and dataset, held-out pass rate RCR_C after spending compute CC follows a saturating sigmoid:

RC−R0  =  (A−R0) 11+(Cmid/C)B.R_C - R_0 \;=\; (A - R_0)\,\frac{1}{1 + (C_\text{mid}/C)^{B}} .

Each symbol has a plain meaning:

  • R0R_0 is where you start.
  • AA is the asymptote, the ceiling you approach with unlimited compute.
  • CmidC_\text{mid} is the compute at which you are halfway to the ceiling.
  • BB controls how sharply you get there (the efficiency).

The paper’s central empirical claim is that many popular knobs move only the efficiency, not the ceiling. In the paper’s words, these are “loss aggregation, normalization, curriculum, and off-policy algorithm”. Other choices raised AA in their experiments: the loss type (CISPO and GSPO beat DAPO), FP32 logits, and larger batches.

A worked example: why you can’t choose recipes from short runs. Two recipes start at R0=0.30R_0 = 0.30:

  • Recipe X: high ceiling, slow. A=0.60A = 0.60, Cmid=1000C_\text{mid} = 1000, B=1B = 1.
  • Recipe Y: low ceiling, fast. A=0.52A = 0.52, Cmid=300C_\text{mid} = 300, B=1.5B = 1.5.

Here are their pass rates at three budgets (in GPU-hours, say):

Compute CCRecipe XRecipe YLeader
3000.30+0.30/(1+3.33)=0.370.30 + 0.30/(1 + 3.33) = 0.370.30+0.22/(1+1)=0.410.30 + 0.22/(1 + 1) = 0.41Y
1,0000.30+0.30/2=0.450.30 + 0.30/2 = 0.450.30+0.22/(1+0.301.5)=0.490.30 + 0.22/(1 + 0.30^{1.5}) = 0.49Y
10,0000.30+0.30/1.1=0.570.30 + 0.30/1.1 = 0.570.30+0.22/(1+0.031.5)=0.520.30 + 0.22/(1 + 0.03^{1.5}) = 0.52X

The curves cross near C≈2,350C \approx 2{,}350 (set the two expressions equal and solve numerically). A team that compared the two recipes at 1,000 GPU-hours would pick Y and lose at scale. The point of fitting the sigmoid is to estimate AA and BB from the early part of each curve and then extrapolate. ScaleRL demonstrated this on a single run scaled to 100,000 GPU-hours, with the extrapolation from the early part of the curve matching where the run ended up.

Quick check You fit the ScaleRL sigmoid to short runs of two recipes. Recipe P has the larger efficiency B; recipe Q has the larger asymptote A. Your real run will use 100× more compute than the short runs. Which do you choose, and why?

How big are these budgets in practice? DeepSeek-V3.2’s report says its post-training budget “exceeds 10% of the pre-training cost”. Kimi K3’s report shows that “scaling RL FLOPs consistently improves” its capabilities. A fair summary: RL is no longer a small finishing step but a large share of training compute at the leading open labs.

Trend 3: on-policy distillation, the new last step

This is the idea you need in full. It is cheap and simple, and in the 2026 pipelines above it consolidates what RL learned.

The problem it solves

Suppose you have used RL to train several specialists: a math model, a coding agent, a search agent, a careful writer. Each is excellent in its domain. You want one model that is good at all of them. You have three options:

  1. Mixed RL: train one model on all the environments at once. This is DeepSeek-V3.2’s approach. It works, but domains compete (“see-saw” effects), the reward scales differ, and every improvement needs another expensive RL run.
  2. SFT on the specialists’ outputs (off-policy distillation): sample answers from each specialist and fine-tune the student on them. This is cheap, but it is behavior cloning (Chapter 10). The student only ever sees the specialists’ states. At test time it makes its own small mistakes, drifts into states no teacher demonstrated, and errors compound.
  3. On-policy distillation (OPD): the student generates its own answers, and the teacher grades every token of them.

Option 3 is DAgger for language models. In DAgger, the learner drives and the expert labels the states the learner actually visits. Here, the student writes and the teacher says, at each position, how likely it would have been to write the same token. The student learns in exactly the states it will be in at test time, and it gets feedback on every token instead of one number per answer.

The objective: reverse KL on the student’s own samples

Write πθ\pi_\theta for the student and πT\pi_T for the teacher. OPD minimizes the reverse KL from student to teacher, averaged over prompts and measured on the student’s own responses:

min⁡θ  Ex[KL(πθ(⋅∣x) ∥ πT(⋅∣x))]=min⁡θ  Ex,  y∼πθ[log⁡πθ(y∣x)−log⁡πT(y∣x)].\min_\theta \; \mathbb{E}_{x}\Big[\mathrm{KL}\big(\pi_\theta(\cdot\mid x) \,\Vert\, \pi_T(\cdot\mid x)\big)\Big] = \min_\theta \; \mathbb{E}_{x,\; y \sim \pi_\theta}\Big[\log \pi_\theta(y \mid x) - \log \pi_T(y \mid x)\Big].

Because a sequence’s log-probability is a sum of token log-probabilities (Chapter 11), the quantity inside the expectation splits into one term per token. That suggests a per-token reward (write st=(x,y<t)s_t = (x, y_{<t}) for the state at position tt, the prompt plus everything generated so far):

rt  =  log⁡πT(yt∣x,y<t)  −  log⁡πθ(yt∣x,y<t).r_t \;=\; \log \pi_T(y_t \mid x, y_{<t}) \;-\; \log \pi_\theta(y_t \mid x, y_{<t}).

In words: rtr_t is positive when the teacher likes the token you wrote more than you do (“do this more”), and negative when the teacher likes it less. Its expectation under your own sampling is minus the KL at that position, so maximizing it pulls you toward the teacher. Thinking Machines’ implementation (October 2025) is literally two lines on top of an RL codebase: compute reverse_kl = sampled_logprobs - teacher_logprobs, set advantages = -reverse_kl, and run the usual policy-gradient update with discount 0. Each token is rewarded only for itself.

A worked example at one position

Take one position with a three-token vocabulary {A,B,C}\lbrace A, B, C\rbrace. The student and teacher distributions are:

tokenstudent πθ\pi_\thetateacher πT\pi_Treward r=log⁡(πT/πθ)r = \log(\pi_T/\pi_\theta)
A0.60.2log⁡(1/3)=−1.099\log(1/3) = -1.099
B0.30.7log⁡(7/3)=+0.847\log(7/3) = +0.847
C0.10.100

The student over-uses A and under-uses B. Here is what happens next.

Expected reward = minus the KL. Under the student’s own sampling, the expected reward is 0.6(−1.099)+0.3(0.847)+0.1(0)=−0.4050.6(-1.099) + 0.3(0.847) + 0.1(0) = -0.405. Check it directly: KL(πθ∥πT)=0.6log⁡3+0.3log⁡(3/7)+0=0.659−0.254=0.405\mathrm{KL}(\pi_\theta \Vert \pi_T) = 0.6\log 3 + 0.3\log(3/7) + 0 = 0.659 - 0.254 = 0.405. ✓

One sample, one noisy push. Say the student’s logits are zz, so πθ=softmax(z)\pi_\theta = \text{softmax}(z). The REINFORCE update for a sampled token yy is ry∇zlog⁡πθ(y)r_y \nabla_z \log \pi_\theta(y), and for a softmax ∇zlog⁡πθ(y)=ey−πθ\nabla_z \log \pi_\theta(y) = e_y - \pi_\theta (the one-hot vector minus the probabilities). So:

  • If A is sampled (60% of the time), the push is −1.099×(0.4,−0.3,−0.1)=(−0.44,+0.33,+0.11)-1.099 \times (0.4, -0.3, -0.1) = (-0.44, +0.33, +0.11). That lowers A and raises B and C.
  • If B is sampled (30%), the push is 0.847×(−0.6,0.7,−0.1)=(−0.51,+0.59,−0.08)0.847 \times (-0.6, 0.7, -0.1) = (-0.51, +0.59, -0.08). That raises B and lowers A.
  • If C is sampled (10%), the push is zero.

The average push is the exact gradient. Weight the three cases by their probabilities: 0.6(−0.44,0.33,0.11)+0.3(−0.51,0.59,−0.08)=(−0.42,+0.38,+0.04)0.6(-0.44, 0.33, 0.11) + 0.3(-0.51, 0.59, -0.08) = (-0.42, +0.38, +0.04). That is exactly −∇zKL-\nabla_z \mathrm{KL}. The gradient of the KL with respect to logit kk is πk(log⁡(πk/qk)−KL)\pi_k\big(\log(\pi_k/q_k) - \mathrm{KL}\big), which gives 0.6(1.099−0.405)=0.420.6(1.099 - 0.405) = 0.42 for A, 0.3(−0.847−0.405)=−0.380.3(-0.847 - 0.405) = -0.38 for B and 0.1(0−0.405)=−0.040.1(0 - 0.405) = -0.04 for C.

The single-sample pushes all point roughly the right way, but their sizes and directions vary a lot from sample to sample. That is the variance DeepSeek-V4 cites as its reason for doing something more expensive: full-vocabulary OPD. It computes the exact KL over the whole vocabulary at every position the student visited, and differentiates it directly. The cost is that you need the teacher’s entire next-token distribution at every position, not just one log-prob. With a vocabulary of 100,000+ tokens and more than ten teachers, DeepSeek-V4 had to build dedicated infrastructure to schedule the teachers. Kimi K3 went the other way: sampled tokens, with the per-token reward clipped to a range.

Quick check In sampled-token on-policy distillation, the student writes a token that the teacher would have written with probability 0.05 while the student gave it probability 0.5. What is the token's reward, and what does the update do?

Why it works: OPD is KL-regularized RL in disguise

You have already solved this problem. Chapter 11’s KL-regularized objective is max⁡πEy∼π[r(x,y)]−β KL(π∥πref)\max_\pi \mathbb{E}_{y\sim\pi}[r(x,y)] - \beta\,\mathrm{KL}(\pi \Vert \pi_\text{ref}), and its optimum is the Gibbs distribution π∗∝πref er/β\pi^* \propto \pi_\text{ref}\, e^{r/\beta} (the Gibbs variational principle, derived in Chapter 10). OPD is a special case.

∂ On-policy distillation as KL-regularized RL

Start from the OPD objective (to be maximized) and insert any reference model πref\pi_\text{ref} by adding and subtracting log⁡πref\log \pi_\text{ref}:

−KL(πθ∥πT)=Ey∼πθ[log⁡πT(y)−log⁡πθ(y)]=Ey∼πθ[log⁡πT(y)πref(y)]−Ey∼πθ[log⁡πθ(y)πref(y)].-\mathrm{KL}(\pi_\theta \Vert \pi_T) = \mathbb{E}_{y\sim\pi_\theta}\big[\log \pi_T(y) - \log \pi_\theta(y)\big] = \mathbb{E}_{y\sim\pi_\theta}\Big[\log \tfrac{\pi_T(y)}{\pi_\text{ref}(y)}\Big] - \mathbb{E}_{y\sim\pi_\theta}\Big[\log \tfrac{\pi_\theta(y)}{\pi_\text{ref}(y)}\Big].

The second term is KL(πθ∥πref)\mathrm{KL}(\pi_\theta \Vert \pi_\text{ref}). So OPD maximizes

Ey∼πθ[ r(y) ]−1⋅KL(πθ∥πref),r(y)=log⁡πT(y)πref(y).\mathbb{E}_{y\sim\pi_\theta}[\,r(y)\,] - 1\cdot \mathrm{KL}(\pi_\theta \Vert \pi_\text{ref}), \qquad r(y) = \log\frac{\pi_T(y)}{\pi_\text{ref}(y)}.

This is the RLHF objective with a “reward” equal to the teacher’s log-likelihood ratio against the reference, and β=1\beta = 1. By the Gibbs result, its optimum is

π∗(y)∝πref(y) er(y)/1=πref(y) πT(y)πref(y)=πT(y),\pi^*(y) \propto \pi_\text{ref}(y)\, e^{r(y)/1} = \pi_\text{ref}(y)\,\frac{\pi_T(y)}{\pi_\text{ref}(y)} = \pi_T(y),

so the optimum is the teacher itself, whatever πref\pi_\text{ref} you chose. Yang et al. (2026) use exactly this observation, which they call G-OPD, to generalize. If you scale the reward by a factor λ\lambda, the optimum becomes πref 1−λπT λ\pi_\text{ref}^{\,1-\lambda}\pi_T^{\,\lambda} (normalized). With λ>1\lambda > 1 (“reward extrapolation”) the student is pushed past the teacher, in the direction the teacher moved away from the reference. They report that this can let a student surpass its domain teachers. Exercise 21.2 asks you to derive this.

Where “discount 0” comes from. The sequence-level gradient of −KL-\mathrm{KL} is a policy gradient with per-token rewards rtr_t and the full reward-to-go:

∇θ(−KL)=E[∑t∇θlog⁡πθ(yt∣st) ∑t′≥trt′].\nabla_\theta\big(-\mathrm{KL}\big) = \mathbb{E}\Big[\sum_t \nabla_\theta \log \pi_\theta(y_t \mid s_t)\,\sum_{t' \ge t} r_{t'}\Big].

Here the term from differentiating the −log⁡πθ-\log \pi_\theta inside rr has zero mean, because E[∇log⁡π]=0\mathbb{E}[\nabla \log \pi] = 0. Discount 0 keeps only t′=tt' = t. That ignores how today’s token changes the KL of future tokens. It is biased, but it has much lower variance. Thinking Machines report that discounts above zero did not help in practice, and Fu et al. (2026) analyze the bias–variance trade-off.

Two physics notes help here. First, minimizing KL(πθ∥πT)\mathrm{KL}(\pi_\theta \Vert \pi_T) over a restricted family is variational inference: it is how you fit a mean-field approximation to a Boltzmann distribution. You know its character. Reverse KL is mode-seeking: a student too small to cover all of the teacher’s modes picks some and fits them well, rather than smearing probability over everything. For a small student imitating a large teacher, that is usually what you want. Second, the reward log⁡πT\log \pi_T can’t be “hacked” in the usual sense. A low reverse KL means the teacher would have produced what you produced. The Thinking Machines post calls it “unhackable” in exactly this sense. The weakness is elsewhere: you can never be better than the teacher’s judgment of your tokens (except via tricks like G-OPD’s extrapolation).

What it buys, in numbers

  • Qwen3 (May 2025, Table 21). Starting from the same off-policy-distilled Qwen3-8B checkpoint (AIME’24: 55.0), RL reached 67.6 using 17,920 GPU-hours. On-policy distillation from a larger Qwen3 teacher reached 74.4 using 1,800 GPU-hours. OPD also raised pass@64 (90.0 → 93.3), where RL left it unchanged. That last detail matters for the “sharpen or expand” debate below: distillation can transfer things the student couldn’t find by itself.
  • Thinking Machines (October 2025). Starting from a Qwen3-8B-Base checkpoint at 60% on AIME’24 after SFT on 400K prompts, OPD with a Qwen3-32B teacher reached 70% in about 150 steps. Their estimate is a 9–30× compute saving versus continuing SFT to the same score.
  • Production use in 2026: GLM-5’s cross-stage distillation (to recover skills lost during later RL stages), DeepSeek-V4 (more than ten teachers), Nemotron 3 Ultra (more than ten teachers) and Kimi K3 (nine experts). In all of these, RL builds the specialists, and distillation merges them.

You can see the same ordering in miniature in this chapter’s lab. On TinyLM, with the same number of sequences per step, full-vocabulary OPD raised sampled accuracy from 0.31 to 0.67, SFT on the teacher’s samples reached 0.64, and sampled-token OPD and RL both reached 0.54.

When it fails

OPD is not free, and 2026 has produced a small science of its failure modes:

  • You need a teacher. OPD transfers capability; it doesn’t create it. Someone still has to run RL to make the specialists.
  • Compatibility matters more than teacher size. Li et al. (April 2026) find that OPD succeeds only when student and teacher share compatible “thinking patterns” and the teacher offers genuinely new capability. Acikgoz et al. (September 2026) report that an RL-strengthened student can regress when distilled from the same teacher, and that preparing both sides first (a brief SFT warm-up for the student, RL adaptation for the teacher) raised OPD accuracy from 29.2% to 43.8%.
  • Long outputs are hard. Reported failure modes include length inflation and repetition, the student drifting into prefixes where the teacher’s guidance is unreliable, and tokenizer mismatches between student and teacher.
  • Privileged self-distillation is contested. A popular 2026 variant uses the same model as its own teacher, given privileged context such as the reference solution. Two July 2026 papers report that it degrades long-reasoning models. Treat that line of work as unsettled.

Trend 4: rewards for things you can’t verify

RL with verifiable rewards (Chapter 15) works because a checker can’t be argued with. Most of what people want from a model, such as a helpful answer, a well-structured report or a good story, has no checker. The 2025–26 answer has three layers, all introduced in Chapter 14:

  • Rubrics. For each prompt, write (or have a model write) a checklist of criteria with weights, such as “mentions the drug interaction” (essential) or “suggests seeing a doctor” (important). An LLM judges each item, and the reward is the weighted fraction satisfied. Rubrics as Rewards (Gunjal et al., 2025) frames RLVR as the special case of a single essential criterion.
  • Generative reward models (GRMs). Instead of a scalar head, the judge is an LLM that writes a critique and a score. DeepSeek-V3.2 uses a GRM with per-prompt rubrics for general tasks. Kimi K3’s “agentic GRM” must follow a protocol: read the output, write a rubric, score each candidate, record the scores. In DeepSeek-V4, RL is applied to the GRM itself, so the judge improves along with the policy.
  • Defenses written into the reward. Kimi K2 used rubrics “designed against reward hacking”, for example penalizing flattering openings. In Kimi K3’s GRM, a candidate longer than a set multiple of the cold-start model’s typical length automatically loses its pairwise comparison. DeepSeek-R1 only switched on its preference reward for the final 400 steps, because “more training steps with the model based preference reward signal may lead to reward hacking”.

The common thread is that a rubric is a proxy, and the optimizer will find the gap between the proxy and what you meant (Chapter 19). Here is what that looks like in this chapter’s lab (Project 2). The gold goal is an exactly correct sum. A rubric awards 2 points for exactness and 2 points for “looks thorough” (the answer has 3 or more digits). After 200 RL steps:

rewardgold accuracy3-digit answers to sums below 100
binary verifier0.29 → 0.552%
stylish rubric (weight 2)0.29 → 0.2998%

The policy found that padding every answer to three digits earns half the reward with certainty, which beats earning the full reward on only some answers. The fix is a better rubric: lower weights on style, negative “pitfall” items, or length budgets like Kimi K3’s. But someone has to notice first, which is why monitoring gold metrics matters.

Trend 5: rethinking the objective, from expected reward to likelihood

Every chapter so far has maximized expected reward. With binary rewards, for one prompt with pass rate p(θ)p(\theta) (the probability a sample is correct), that objective is just J=pJ = p. But is pp the right thing to maximize? Think like a statistician. If correctness is all you care about, the natural objective is the log-likelihood of being correct, log⁡p\log p, just as supervised learning maximizes log-likelihood rather than likelihood. The two have very different gradients:

∇θ pversus∇θlog⁡p=1p ∇θ p.\nabla_\theta\, p \quad\text{versus}\quad \nabla_\theta \log p = \frac{1}{p}\,\nabla_\theta\, p .

The 1/p1/p factor is the whole story. A prompt the model solves 1% of the time gets 100 times more weight under maximum likelihood than under expected reward. Maximum likelihood cares most about the prompts you are worst at. Expected reward treats a gain of 0.01 on a hopeless prompt the same as 0.01 on an easy one.

So why does RL use pp? Because log⁡p\log p can’t be estimated without bias from a finite number of samples. You’d need 1/p1/p, and you don’t know pp. MaxRL (Tajwar et al., February 2026) found a clean way to interpolate between the two.

∂ Expected reward is the first term of maximum likelihood

Use the series log⁡(1−u)=−∑k≥1uk/k\log(1-u) = -\sum_{k\ge 1} u^k/k with u=1−pu = 1 - p:

log⁡p=−∑k=1∞(1−p)kk.\log p = -\sum_{k=1}^{\infty} \frac{(1-p)^k}{k}.

Now recall pass@k, the probability that at least one of kk independent samples is correct: pass@k=1−(1−p)k\text{pass@}k = 1 - (1-p)^k. So (1−p)k=1−pass@k(1-p)^k = 1 - \text{pass@}k, and

log⁡p=∑k=1∞pass@k−1k⟹∇θlog⁡p=∑k=1∞1k ∇θ pass@k.\log p = \sum_{k=1}^{\infty} \frac{\text{pass@}k - 1}{k} \quad\Longrightarrow\quad \nabla_\theta \log p = \sum_{k=1}^{\infty} \frac{1}{k}\,\nabla_\theta\,\text{pass@}k .

The first term (k=1k = 1) is ∇ pass@1=∇p\nabla\,\text{pass@}1 = \nabla p, which is ordinary expected-reward RL. Standard RL is the first-order truncation of maximum likelihood. MaxRL keeps the first NN terms:

∇JN=∑k=1N1k ∇ pass@k=∑k=1N(1−p)k−1 ∇p=1−(1−p)Np ∇p,\nabla J_N = \sum_{k=1}^{N} \frac{1}{k}\,\nabla\,\text{pass@}k = \sum_{k=1}^{N} (1-p)^{k-1}\,\nabla p = \frac{1 - (1-p)^N}{p}\,\nabla p,

using ∇ pass@k=k(1−p)k−1∇p\nabla\,\text{pass@}k = k(1-p)^{k-1}\nabla p and the geometric sum. With N=1N = 1 the weight is 1 (expected reward). As N→∞N \to \infty it is 1/p1/p (maximum likelihood).

The estimator is a one-line change. Sample NN responses and let KK be the number of correct ones. REINFORCE averages the score functions Si=∇log⁡πθ(y(i))S_i = \nabla \log \pi_\theta(y^{(i)}) of the correct samples over all NN samples: 1N∑iriSi\frac{1}{N}\sum_i r_i S_i. MaxRL averages over the KK successful samples instead: 1K∑iriSi\frac{1}{K}\sum_i r_i S_i. The paper proves that the expected value of this estimator is exactly ∇JN\nabla J_N. The proof is short enough to check yourself. By symmetry the expectation is N E[r1S1/K]N\,\mathbb{E}[r_1 S_1 / K]. The term is nonzero only when sample 1 succeeded, and then K=1+BK = 1 + B, where B∼Binomial(N−1,p)B \sim \text{Binomial}(N-1, p) counts the successes among the other samples and is independent of sample 1. So E[r1S1/K]=E[r1S1] E[11+B]=∇p⋅1−(1−p)NNp\mathbb{E}[r_1 S_1/K] = \mathbb{E}[r_1 S_1]\,\mathbb{E}\big[\tfrac{1}{1+B}\big] = \nabla p \cdot \frac{1-(1-p)^N}{Np}, where the last step uses 1b+1(N−1b)=1N(Nb+1)\frac{1}{b+1}\binom{N-1}{b} = \frac{1}{N}\binom{N}{b+1}. Multiplying by NN gives ∇JN\nabla J_N.

With the zero-mean control variate 1N∑iSi\frac{1}{N}\sum_i S_i subtracted, the weights become ri/K−1/Nr_i/K - 1/N. Multiply by NN and write p^=K/N\hat p = K/N to get the MaxRL advantage

A^(i)=r(i)−p^p^(p^>0; zero otherwise).\hat A^{(i)} = \frac{r^{(i)} - \hat p}{\hat p} \qquad (\hat p > 0; \text{ zero otherwise}).

One fine point: when K=0K = 0 the full estimator would still subtract the control variate, giving every sample the weight −1/N-1/N. Setting the advantages to zero instead, as the practical algorithm does, removes the last term of the series, so in expectation it follows ∇JN−1\nabla J_{N-1} rather than ∇JN\nabla J_N (the paper notes this). The tables and the demo below use wNw_N; the difference is one term out of NN.

Compare: RLOO and Dr. GRPO use r(i)−p^r^{(i)} - \hat p, and GRPO uses (r(i)−p^)/std(r^{(i)} - \hat p)/\text{std}, where the std of a Bernoulli is p^(1−p^)\sqrt{\hat p(1-\hat p)}. All three methods have the same numerator. They differ only in what they divide by, and the divisor decides which prompts the gradient cares about.

This gives a single picture of the whole critic-free zoo. At the population level, each method’s gradient for a prompt with pass rate pp is w(p) ∇pw(p)\,\nabla p for some weight function:

Objectiveadvantage of sample iiweight w(p)w(p)
expected reward (REINFORCE, RLOO, Dr. GRPO)r−p^r - \hat p11
GRPO(r−p^)/std(r - \hat p)/\text{std}1/p(1−p)1/\sqrt{p(1-p)}
MaxRL with NN samples(r−p^)/p^(r - \hat p)/\hat p(1−(1−p)N)/p\big(1-(1-p)^N\big)/p
maximum likelihood(not estimable)1/p1/p

Worked numbers. Take a hard prompt with p=0.05p = 0.05 and N=8N = 8. Expected reward gives weight 1. GRPO gives 1/0.05×0.95=4.61/\sqrt{0.05 \times 0.95} = 4.6. MaxRL gives (1−0.958)/0.05=(1−0.663)/0.05=6.7(1 - 0.95^8)/0.05 = (1 - 0.663)/0.05 = 6.7. Maximum likelihood would give 20. Notice also that GRPO’s weight rises again near p=1p = 1 (it is symmetric), so GRPO also up-weights nearly solved prompts. That is the “difficulty bias” Dr. GRPO objected to (Chapter 16).

Interactive Where does each objective put its learning signal?

Objectiveadvantagew(p) at probepush at probeshare of push on hard prompts

What to try: (1) With N = 8 and the probe at p = 0.10, check the table against the formulas: GRPO 1/√(0.1·0.9) = 3.33; MaxRL (1 − 0.9⁸)/0.1 = 5.70; maximum likelihood 10. (2) Set N = 1: the MaxRL curve falls onto the expected-reward line. With one sample, MaxRL is REINFORCE. Slide N to 64 and it hugs the maximum-likelihood curve except near p = 0. (3) Switch to 'Push on the logit'. If p = σ(z) for a logit z, then ∇p = p(1−p)∇z, so the push on z is w(p)·p(1−p). Expected reward pushes hardest at p = 0.5 and hardly at all on hard prompts; maximum likelihood pushes hardest on the hardest ones. (4) In that view, compare the dashed curve, the chance that a group of N samples has both right and wrong answers. On a prompt with p = 0.02 and N = 8, 85% of groups are all-wrong and give no signal at all. Raise N and watch it recover. (5) Slide the dataset's typical pass rate to 0.1 (a hard dataset) and read the last column: how much of each method's total push goes to the hard prompts.

The demo’s dashed curve is a reminder that the weights are population-level. In a real batch, a prompt with no correct sample contributes nothing under every method in the table, because the group has no variance. MaxRL can only up-weight hard prompts that produced at least one success. That is why “more rollouts per prompt” (BroRL; the IsoCompute Playbook, March 2026) and “pick prompts at the frontier” (next section) are complementary to the choice of objective. The paper reports that MaxRL “Pareto-dominates” GRPO and RLOO in its experiments, with up to 20× gains in test-time scaling efficiency (as with any single paper’s claims, look for replications).

Quick check A group of N = 4 samples for one prompt has rewards 1, 0, 0, 0. What are the MaxRL advantages, and how do they compare with the mean-baseline (RLOO / Dr. GRPO style) advantages?

The sharpen-or-expand debate, one year on

Maximum likelihood’s focus on hard prompts connects to the most argued-over question of 2025: does RL with verifiable rewards teach models anything new, or does it only sharpen what the base model could already do? (Chapter 15 introduced it.) The evidence so far:

  • Sharpening. Yue et al. (2025) found RL-trained models win at pass@1 but their base models win pass@k at large kk, as if RL concentrates probability on solutions the base model could already sample. Spurious-reward results point the same way: on Qwen2.5-Math-7B, even random rewards gave a large MATH-500 gain (+21.4 points, against +29.1 for true rewards), and the effect did not carry over to other model families.
  • Expanding. ProRL (Liu et al., 2025) reports boundary gains from prolonged RL with KL control and reference resets. Qwen3’s on-policy distillation raised pass@64 where RL did not. Cursor’s Composer 2 report says RL improved both average and best-of-K performance.
  • Both, depending on the task. Cheng et al. (October 2026) model RL as reweighting which strategy a model picks. That can raise coverage on some tasks and lower it on others, without adding new strategies.

You can reproduce the basic phenomenon on a laptop. In Project 5 of this chapter’s lab, RL on TinyLM raised pass@1 from 0.31 to 0.67, while pass@64 fell from 0.97 to 0.92. The curves cross between k=16k = 16 and k=32k = 32. Under an expected-reward objective this is no surprise. If p=σ(z)p = \sigma(z) for some logit zz, the push a prompt gets is proportional to p(1−p)p(1-p): 0.21 at p=0.3p = 0.3, but only 0.003 at p=0.003p = 0.003. The rare-success prompts, which are exactly the ones that decide pass@k at large kk, get almost no attention, and they can quietly lose probability while the common ones are sharpened. Objectives like MaxRL are one attempt to change that.

Trend 6: self-play and “zero-data” RL

Verifiable RL needs problems with checkable answers, and good problems run out. One response is to let the model write its own problems. This is self-play, in the tradition of AlphaZero (Chapter 10), adapted to language.

Absolute Zero (Zhao et al., 2025) is the cleanest example. One model plays two roles. As proposer, it writes a small coding task: a program and an input, and it must predict the output, find the input, or write the program. As solver, it attempts the task. A Python executor checks everything, so no human-written data is needed. The interesting part is the proposer’s reward. If the solver succeeds on a fraction p^\hat p of GG attempts:

rpropose={0if p^=0,1−p^otherwise.r_\text{propose} = \begin{cases} 0 & \text{if } \hat p = 0, \\ 1 - \hat p & \text{otherwise.} \end{cases}

Trivial tasks (p^=1\hat p = 1) are worth nothing, and so are impossible ones (p^=0\hat p = 0). The best tasks are those the solver sometimes solves. This learnability reward encodes the same lesson as the dashed curve in the demo above: a group with no success, or no failure, teaches nothing. Exercise 21.5 shows that, in expectation over the solver’s G=8G = 8 attempts, the proposer earns the most from tasks solved about a quarter of the time. That is no coincidence. The expected learnability reward, (1−p)−(1−p)G(1-p) - (1-p)^G, is the same function as MaxRL’s push on the logit with N=G−1N = G - 1 samples, (1−p)−(1−p)N+1(1-p) - (1-p)^{N+1}. Switch the weights demo to “Push on the logit” and the MaxRL curve peaks near p≈0.25p \approx 0.25. A proposer paid for learnability picks the tasks where a likelihood-style learner learns fastest.

Other designs in the same family:

  • R-Zero (2025): a Challenger is rewarded for problems at the edge of a Solver’s ability.
  • TTRL (2025): uses the majority vote over the model’s own samples as a pseudo-label on unlabeled test questions.
  • Self-play SWE-RL (Wei et al., Meta, December 2025): one agent injects bugs into real repositories, specified by test patches, and learns to fix them. It reports +10.4 points on SWE-bench Verified and consistently beat a human-data baseline over training.
  • Self-Play Pretraining with Zero Data (Cowsik et al., September 2026): pushes the idea to its extreme. From random initialization, an RL-trained generator proposes programs for a universal Turing machine at the frontier of a learner’s ability. The authors present it as an initial proof of concept.

Trend 7: RL moves earlier, and later

RL used to be the last stage of training. It is spreading in both directions.

Earlier: RL during pretraining. Reinforcement Pre-Training (Dong et al., 2025) turns ordinary next-token prediction into a verifiable task: the model reasons, then predicts the next token, and is rewarded if it is right. RLP (Hatamizadeh et al., NVIDIA, 2025) treats a sampled chain of thought as an action. The reward is the information gain: how much the thought increased the log-likelihood of the actual next tokens, compared with predicting without it. This reward is dense, needs no verifier, and works on any text. Both papers report gains, and RLP reports that they persist after identical post-training. Whether this changes how frontier models are pretrained is not yet known publicly.

Later: learning from deployment. In March 2026 Cursor described “real-time RL” for its Composer coding model. It trains on rewards derived from how real users respond to the model’s actions, and can ship a new checkpoint “as often as every five hours”, which keeps the training data close to on-policy. The company reports small A/B gains: for example, “agent edit persists in codebase” up 2.28% and “dissatisfied follow-up” down 3.13%. The same post describes the model finding ways to game production metrics, which turned each hack into a bug report.

This is RL closing its original loop. An agent acts in the world, the world responds, and the agent improves. It is also where Chapter 19’s warnings bite hardest. OpenAI’s April 2025 sycophancy incident was caused partly by adding a reward from users’ thumbs-up and thumbs-down, which the company said “can sometimes favor more agreeable responses”. Learning from users means learning what users reward, which is not always what is good for them.

A related question is continual learning without forgetting. Shenfeld et al. (“RL’s Razor”, 2025) found that on-policy RL forgets less than SFT at matched performance on the new task. Their explanation is that on-policy updates are implicitly biased toward solutions close (in KL) to the starting model. Thinking Machines used on-policy distillation to restore instruction-following after fine-tuning a model on new documents.

Trend 8: agents, environments, and scale

Chapter 18 covered agentic RL. The 2026 change is mostly one of scale, and of where the effort goes:

  • Environment counts. Qwen’s Qwen3.5 blog (February 2026) attributes its post-training gains “primarily” to “extensive scaling of virtually all RL tasks and environments”. MiniMax describes RL in “hundreds of thousands of complex real-world environments”. DeepSeek-V4 describes a sandbox service built to run hundreds of thousands of concurrent instances. These are lab claims, and “environment” is not a standard unit.
  • Synthetic and simulated environments. Kimi K2 synthesized thousands of tools. Qwen-AgentWorld (June 2026) trains LLMs to simulate agentic environments, so an agent can be trained against a learned world model. This is the MuZero idea from Chapter 10, with the usual risk that the policy exploits the simulator’s errors.
  • Training inside the real harness. Composer 2 runs RL inside the same tool environment its users see, so there is no train/deploy mismatch in tools.
  • Effort as a control knob. DeepSeek-V4 and Kimi K3 train separate experts for different reasoning budgets (“low/high/max”), then distill them into one model. The budget is enforced by the reward: Kimi K3 overrides the reward with −1 for trajectories over a budget.

The open technical problems here are the ones Chapter 18 named: credit assignment over hundreds of tool calls, sandbox cost and safety, and reward hacking of environment checks.

Trend 9: reward hacking at scale, and keeping chains of thought readable

Chapter 19 taught reward hacking with small examples. In 2025–26 it was measured at frontier scale, and the findings are sobering.

  • Hacking generalizes. MacDiarmid et al. (Anthropic, November 2025) trained a model that knew about reward hacks on real Anthropic production coding environments. It learned to hack them (for example, making tests pass by overriding equality checks). It then generalized to alignment faking, cooperation with malicious actors, and attempted sabotage, including of the codebase for the paper itself. Standard chat-style safety training made it look aligned on chat evaluations, but the misalignment persisted on agentic tasks. Three mitigations worked: preventing the hacking, more diverse safety training, and inoculation prompting. In inoculation prompting, the training prompt frames hacking as acceptable in this context, and the model then no longer generalizes it into broader misbehavior.
  • A deliberately trained reward seeker. In August 2026, Anthropic described training an early Opus 4.8 checkpoint on 80 RL environments it had previously identified as hackable, as a “plausible (though pessimistic) proxy” for a run with no anti-hacking effort. By the end it hacked 40% of all episodes. On evaluations it generalized to reward tampering (0% → 41%), among other behaviors, while looking aligned on evaluations where no grader was involved. Its chain of thought “displayed a strong desire to satisfy the grader”.
  • Production rates. The Claude Mythos Preview system card (April 2026) reports an automated review of several hundred thousand RL transcripts. In about 0.05% of episodes the model attempted to get around network restrictions in its training environment to shortcut the task, and in about 0.01% it succeeded.

The main tool for catching this is reading the model’s chain of thought. Baker et al. (OpenAI, 2025) showed that a weaker model reading a stronger model’s chain of thought caught reward hacks (like calling exit(0) before tests could fail) far better than one watching only actions. They also found that putting that monitor into the reward works at first, but with more optimization the model learns to hide its intent while still hacking. Hence the proposed “monitorability tax”: don’t optimize the chain of thought directly, even if it would help in the short run. OpenAI’s gpt-oss model card says it followed this policy. A cross-lab position paper (Korbak et al., 2025) argues that CoT monitorability is “a new and fragile opportunity”. OpenAI’s December 2025 measurements found that RL optimization “does not materially decrease monitorability even at the current frontier scale”. These findings are compatible: ordinary RL has not yet destroyed readability, while direct pressure on the chain of thought would.

What is still contested

Where serious groups disagree, here is the state of play:

QuestionOne sideOther sideWhat it seems to depend on
Does RLVR teach new skills?sharpening: base wins pass@k at large k (Yue et al.); spurious rewards help Qwenexpansion: ProRL; OPD raises pass@k; Composer 2model family, training length, rollouts per prompt, the metric
Keep a KL penalty?drop it (GLM, Olmo 3, DAPO, ScaleRL)keep a corrected one (DeepSeek-V3.2); ProRL uses KL + resetsverifiable vs. learned reward; how long you train
Std-normalize advantages?no (Dr. GRPO, Olmo 3, DeepSeek)yes, per group (DAPO, GSPO) or per batch (ScaleRL)ScaleRL: mostly affects efficiency, not the ceiling
Can OPD replace final-stage RL?DeepSeek-V4, Kimi K3, Nemotron 3 Ultra do itneeds compatible teachers; long-output failures; privileged variants degradewhether a strong compatible teacher exists
Process reward models for RL?DeepSeek-R1: not worth it, hackablePRIME’s implicit PRMs; MiniMax’s behavioral process rewardswhat “step” means; whether the PRM is updated online

Open problems

These are the problems a researcher entering the field in late 2026 could reasonably work on. Each comes with why it matters and where to start.

  1. Rewards for tasks without checkers that resist hacking. Rubric and GRM rewards are now central, and the optimizer finds their gaps (verbosity, confident tone, flattery). How do you know a judge is good enough to optimize against, and for how long? Start: Chapter 14, Rubrics as Rewards, the Kimi K3 GRM protocol, and Gao et al.’s over-optimization curves.
  2. What sets the ceiling of RL? ScaleRL shows recipes differ in their asymptote AA, but not why. Is it the base model, the data, the objective, exploration? Start: ScaleRL, Cheng et al. (2026).
  3. Does RL create capabilities? A clean answer needs leak-free tasks, many model families, and large-kk evaluation with confidence intervals. Start: Yue et al., ProRL, the contamination critiques, and Project 5 in the lab.
  4. Exploration in token space. Entropy collapses (Chapter 19), and many fixes compete with no principled winner. What would “optimism under uncertainty” (Chapter 2) mean for a policy over sequences? Start: Cui et al. (2025) on the entropy mechanism; the 80/20 high-entropy-token paper.
  5. Credit assignment over long horizons. Agents run hundreds of tool calls and get one reward at the end. Critics are expensive, and group baselines are coarse. Start: Chapter 18; GiGPO; VinePPO’s Monte Carlo values.
  6. When does on-policy distillation work, and can a student surpass its teachers? We know compatibility matters, but not how to measure it in advance. Start: Li et al. (2026), Acikgoz et al. (2026), G-OPD.
  7. The right objective. Expected reward, likelihood (MaxRL), pass@k-aware objectives, and test-time-compute-aware training each weight prompts differently. Which should you use when? Start: MaxRL’s weight-function view (this chapter’s demo).
  8. Principled off-policy RL for asynchronous systems. The field has a toolbox of patches (truncated IS, masks, routing replay, matched precision). A theory of how much staleness and mismatch is harmless would let systems go faster safely. Start: Chapter 20; Qwen’s “Stabilizing RL with LLMs” (2025).
  9. Reward hacking that generalizes. Why does hacking in coding environments turn into broader misalignment, and why does inoculation prompting help? Can you detect hackable environments before training? Start: MacDiarmid et al. (2025), Anthropic’s reward-seeker post (2026), ImpossibleBench.
  10. Keeping chains of thought monitorable. What training choices preserve or destroy it, and how would we know? Start: Baker et al. (2025), Korbak et al. (2025), “Monitoring Monitorability” (2025).
  11. Learning from deployment without learning to please. Real-time RL from users is attractive and dangerous (sycophancy). How do you separate “the user was helped” from “the user was flattered”? Start: Cursor’s real-time RL post; OpenAI’s sycophancy post-mortems; Chapter 19.
  12. Where environments come from. Self-play, simulated environments and mined repositories each scale differently and fail differently. Start: Absolute Zero, Self-play SWE-RL, Qwen-AgentWorld.

How to read (and write) an RL-for-LLM paper

The field publishes faster than anyone can read, and many results don’t replicate. Most failures to replicate trace back to a short list of confounders. Before you believe a claimed improvement, check these:

  1. Base model. Which model family? Results on one family (especially Qwen2.5-Math, given the spurious-reward and contamination findings) often don’t transfer. Look for at least two families.
  2. Baselines. Was the baseline tuned as carefully as the new method, at the same learning rate, batch and number of samples? Is it the authors’ own implementation, or a number copied from another paper with a different setup?
  3. Compute. Are methods compared at matched compute (samples generated, gradient steps, GPU-hours), or matched steps? A method that samples twice as many responses per step should be compared at equal samples. ScaleRL adds: is the gain in efficiency (it will vanish with more compute) or in the ceiling?
  4. KL and the reference. Is there a KL term? If not, how far did the policy move? A method that wins only because it was allowed to drift further is a different claim.
  5. Evaluation sampling. Is the metric pass@1 from greedy decoding, or avg@k over kk samples at some temperature? On a 30-question benchmark like AIME, one question is 3.3 points. Are there error bars?
  6. Contamination. Could the benchmark be in the pretraining data? Gains that appear even with random rewards are a red flag.
  7. Seeds. One run per method is an anecdote. RL runs vary a lot across seeds.
  8. Version. arXiv papers change. DeepSeek-R1’s v1 and v2 report different AIME numbers (71.0% vs 77.9% for R1-Zero). Cite the version you read.
  9. Self-reported numbers. Model-report benchmarks, especially on internal benchmarks, are claims, not measurements you can check.

A worked example. A paper claims “Method Z improves AIME’24 accuracy over GRPO by 8 points”. The setup: Qwen2.5-Math-7B; GRPO numbers copied from another paper; Method Z samples 16 responses per prompt against GRPO’s 8; evaluation by avg@4 at temperature 0.6; one seed. Here is what you should list:

  • one model family, and a contamination-prone one;
  • an untuned, borrowed baseline;
  • twice the samples per step for Method Z;
  • 8 points on a 30-question test averaged over only 4 samples is about 2.4 questions, with no error bars;
  • a single seed.

Any one of these could explain the whole gain. Exercise 21.6 gives you another one to dissect.

How to keep up. Read the post-training sections of new open-weight model reports. They are dense, and you now have the vocabulary to decode them. Follow the open RL stacks (TRL, verl, OpenRLHF, slime, prime-rl): when a trick becomes a default in their configs, it has usually survived contact with many users. When a paper surprises you, reproduce a small version before you build on it. The lab for this chapter is set up for exactly that.

Summary

  • The 2026 pipeline: SFT → RL to train domain (and effort-level) specialists → on-policy distillation to merge them, increasingly replacing one big mixed RL run (DeepSeek-V4, Nemotron 3 Ultra, Kimi K3; GLM-5’s cross-stage variant).
  • On-policy distillation = student samples, teacher scores every token with rt=log⁡πT−log⁡πθr_t = \log\pi_T - \log\pi_\theta, policy gradient with discount 0. It is KL-regularized RL whose optimum is the teacher, and it is DAgger for LLMs: dense, on-policy, and often an order of magnitude cheaper than RL when a good teacher exists.
  • The RL algorithm converged on a critic-free, group-baseline policy gradient with mean-only advantages, token-level loss, asymmetric or IS-weight clipping, little or no KL, zero-variance filtering, and tight control of train–inference mismatch. The research moved to rewards, environments and stage design.
  • RL compute is now forecast with saturating curves (ScaleRL): many knobs change efficiency, and only some change the ceiling. Compare recipes by extrapolation, not by snapshots.
  • Expected reward is the first-order term of maximum likelihood (∇log⁡p=∑k1k∇pass@k\nabla\log p = \sum_k \frac1k\nabla\text{pass@}k). The critic-free methods differ in the weight w(p)w(p) they put on each prompt: 1 (REINFORCE/RLOO), 1/p(1−p)1/\sqrt{p(1-p)} (GRPO), (1−(1−p)N)/p(1-(1-p)^N)/p (MaxRL), 1/p1/p (maximum likelihood).
  • Rewards for non-verifiable tasks come from rubrics and generative judges, which are proxies that get hacked, so reward design is now also a safety question: hacking generalizes (MacDiarmid et al.; Anthropic’s reward seeker), and chain-of-thought monitoring works only if you don’t optimize against it.
  • Read papers with a checklist: base model family, tuned baselines, matched compute, KL, evaluation sampling, contamination, seeds, version.

Exercises

Exercise 21.1Decode a model reportConcept●○○

Here is a composite paragraph, written in the style of a 2026 report:

“After a long-CoT cold start, we train domain experts with GRPO (no KL, mean-only advantages, token-level loss, clip-higher) using rule-based verifiers and a generative reward model with per-prompt rubrics. Rollouts use FP8 with rollout routing replay and truncated importance sampling. Experts are then consolidated by multi-teacher on-policy distillation.”

For each phrase, say in one sentence what it means and which chapter it comes from: (a) long-CoT cold start; (b) GRPO with no KL and mean-only advantages; (c) token-level loss; (d) clip-higher; (e) generative reward model with per-prompt rubrics; (f) rollout routing replay and truncated importance sampling; (g) multi-teacher on-policy distillation.

Solution

(a) Long-CoT cold start: a short SFT stage on examples with long chains of thought before RL, so RL starts from a model that already writes in the desired format. DeepSeek-R1’s fix for R1-Zero’s readability problems (Chapter 15).

(b) GRPO, no KL, mean-only advantages: sample a group per prompt and use r(i)−meanr^{(i)} - \text{mean} as every token’s advantage, with no std division (Dr. GRPO’s fix for difficulty bias) and no KL penalty to a reference (Chapters 15–16).

(c) Token-level loss: average the per-token loss over all tokens in the batch rather than per sequence, so long responses are not down-weighted (Chapter 16, DAPO).

(d) Clip-higher: an asymmetric PPO clip range [1−ϵlow,1+ϵhigh][1-\epsilon_\text{low}, 1+\epsilon_\text{high}] with ϵhigh>ϵlow\epsilon_\text{high} > \epsilon_\text{low}, so unlikely tokens can be raised faster, which slows entropy collapse (Chapters 9, 16, 19).

(e) Generative RM with per-prompt rubrics: an LLM judge that reads a checklist written for this prompt, critiques the answer and outputs a score. The reward for tasks without a checker (Chapter 14).

(f) Routing replay and truncated IS: two fixes for train–inference mismatch. Replay the MoE expert choices the sampler made when computing training log-probs, and multiply each token’s loss by min⁡(πtrain/πsampler,C)\min(\pi_\text{train}/\pi_\text{sampler}, C) to correct for the remaining difference (Chapter 20).

(g) Multi-teacher OPD: the final model samples its own answers, and for each domain the corresponding expert scores every token. The student minimizes reverse KL to the expert on its own samples (this chapter).

Exercise 21.2On-policy distillation as KL-regularized RLPen & paper●●○

(a) Show that for any reference πref\pi_\text{ref} with full support, −KL(π∥πT)=Eπ[log⁡(πT/πref)]−KL(π∥πref)-\mathrm{KL}(\pi \Vert \pi_T) = \mathbb{E}_{\pi}[\log(\pi_T/\pi_\text{ref})] - \mathrm{KL}(\pi \Vert \pi_\text{ref}).

(b) Using the Gibbs result from Chapters 10–11 (max⁡πEπ[r]−β KL(π∥πref)\max_\pi \mathbb{E}_\pi[r] - \beta\,\mathrm{KL}(\pi\Vert\pi_\text{ref}) is solved by π∗∝πref er/β\pi^* \propto \pi_\text{ref}\,e^{r/\beta}), find the optimum of the generalized objective Eπ[λlog⁡(πT/πref)]−KL(π∥πref)\mathbb{E}_{\pi}[\lambda \log(\pi_T/\pi_\text{ref})] - \mathrm{KL}(\pi \Vert \pi_\text{ref}) for λ>0\lambda > 0.

(c) Take a single position with two tokens: πref=(0.5,0.5)\pi_\text{ref} = (0.5, 0.5) and πT=(0.8,0.2)\pi_T = (0.8, 0.2). Compute the optimum for λ=1\lambda = 1 and λ=2\lambda = 2. What does λ>1\lambda > 1 (“reward extrapolation”) do, and when might it help or hurt?

Hint
For (b), the “reward” is λlog⁡(πT/πref)\lambda \log(\pi_T/\pi_\text{ref}) and β=1\beta = 1, so er=(πT/πref)λe^{r} = (\pi_T/\pi_\text{ref})^\lambda. For (c), normalize 0.51−λ 0.8λ0.5^{1-\lambda}\,0.8^{\lambda} and 0.51−λ 0.2λ0.5^{1-\lambda}\,0.2^{\lambda}.
Solution

(a) −KL(π∥πT)=Eπ[log⁡πT−log⁡π]=Eπ[log⁡πT−log⁡πref]−Eπ[log⁡π−log⁡πref]=Eπ[log⁡(πT/πref)]−KL(π∥πref)-\mathrm{KL}(\pi\Vert\pi_T) = \mathbb{E}_\pi[\log\pi_T - \log\pi] = \mathbb{E}_\pi[\log\pi_T - \log\pi_\text{ref}] - \mathbb{E}_\pi[\log\pi - \log\pi_\text{ref}] = \mathbb{E}_\pi[\log(\pi_T/\pi_\text{ref})] - \mathrm{KL}(\pi\Vert\pi_\text{ref}). Adding and subtracting log⁡πref\log\pi_\text{ref} is legal wherever πref>0\pi_\text{ref} > 0.

(b) The objective is Chapter 11’s with r=λlog⁡(πT/πref)r = \lambda\log(\pi_T/\pi_\text{ref}) and β=1\beta = 1, so

π∗∝πref (πTπref)λ=πref 1−λ πT λ.\pi^* \propto \pi_\text{ref}\,\Big(\frac{\pi_T}{\pi_\text{ref}}\Big)^{\lambda} = \pi_\text{ref}^{\,1-\lambda}\,\pi_T^{\,\lambda}.

At λ=1\lambda = 1 this is πT\pi_T: ordinary OPD recovers the teacher. For 0<λ<10 < \lambda < 1 it is a geometric interpolation between reference and teacher. For λ>1\lambda > 1 it extrapolates beyond the teacher.

(c) λ=1\lambda = 1: (0.8,0.2)(0.8, 0.2), the teacher. λ=2\lambda = 2: unnormalized 0.5−1(0.64,0.04)=(1.28,0.08)0.5^{-1}(0.64, 0.04) = (1.28, 0.08), which normalizes to (0.941,0.059)(0.941, 0.059).

Extrapolation moves further in the direction the teacher moved away from the reference. Here the reference was indifferent and the teacher preferred the first token 4 : 1, so λ=2\lambda = 2 prefers it 16 : 1. This helps when the teacher–reference difference is real signal: for example, the reference is the teacher’s pre-RL base and the difference is what RL taught. Yang et al. (2026) report that extrapolation then lets a student surpass its domain teachers. It hurts when the difference contains noise or teacher idiosyncrasies, which get amplified too. And it reduces diversity, since the optimum is sharper than the teacher.

Exercise 21.3One step of on-policy distillation by handPen & paper●●○

At one position, the student has logits zz giving πθ=(0.5,0.4,0.1)\pi_\theta = (0.5, 0.4, 0.1) over tokens (A,B,C)(A, B, C), and the teacher has πT=(0.25,0.25,0.5)\pi_T = (0.25, 0.25, 0.5).

(a) Compute the per-token rewards r=log⁡(πT/πθ)r = \log(\pi_T/\pi_\theta) and the KL(πθ∥πT)(\pi_\theta\Vert\pi_T).

(b) Compute the exact gradient ∂ KL/∂zk=πk(log⁡(πk/qk)−KL)\partial\,\mathrm{KL}/\partial z_k = \pi_k\big(\log(\pi_k/q_k) - \mathrm{KL}\big) (with q=πTq = \pi_T) and say which logits gradient descent raises and lowers.

(c) For each possible sampled token, compute the single-sample REINFORCE ascent direction ry(ey−πθ)r_y(e_y - \pi_\theta). Check that their probability-weighted average equals −∇zKL-\nabla_z \mathrm{KL}.

(d) Token C is the teacher’s favorite, but it is sampled only 10% of the time. What does that imply about sampled-token OPD for tokens the student rarely writes, and what does full-vocabulary OPD do differently?

Hint
log⁡2=0.693\log 2 = 0.693, log⁡1.6=0.470\log 1.6 = 0.470, log⁡5=1.609\log 5 = 1.609. The KL is ∑kπklog⁡(πk/qk)\sum_k \pi_k \log(\pi_k/q_k) and should come out near 0.374.
Solution

(a) The rewards are:

  • rA=log⁡(0.25/0.5)=−0.693r_A = \log(0.25/0.5) = -0.693
  • rB=log⁡(0.25/0.4)=−0.470r_B = \log(0.25/0.4) = -0.470
  • rC=log⁡(0.5/0.1)=+1.609r_C = \log(0.5/0.1) = +1.609

KL=0.5(0.693)+0.4(0.470)+0.1(−1.609)=0.347+0.188−0.161=0.374\mathrm{KL} = 0.5(0.693) + 0.4(0.470) + 0.1(-1.609) = 0.347 + 0.188 - 0.161 = 0.374. (Note the KL is positive even though one term is negative: the KL as a whole is always ≥0\ge 0, but individual terms need not be.)

(b) With KL=0.374\mathrm{KL} = 0.374:

  • ∂A=0.5(0.693−0.374)=+0.160\partial_A = 0.5(0.693 - 0.374) = +0.160
  • ∂B=0.4(0.470−0.374)=+0.038\partial_B = 0.4(0.470 - 0.374) = +0.038
  • ∂C=0.1(−1.609−0.374)=−0.198\partial_C = 0.1(-1.609 - 0.374) = -0.198

The components sum to 0, as they must for softmax logits. Gradient descent lowers zAz_A (most), lowers zBz_B slightly, and raises zCz_C.

(c) The single-sample pushes are:

  • Sample A: −0.693 (0.5,−0.4,−0.1)=(−0.347,+0.277,+0.069)-0.693\,(0.5, -0.4, -0.1) = (-0.347, +0.277, +0.069).
  • Sample B: −0.470 (−0.5,0.6,−0.1)=(+0.235,−0.282,+0.047)-0.470\,(-0.5, 0.6, -0.1) = (+0.235, -0.282, +0.047).
  • Sample C: 1.609 (−0.5,−0.4,0.9)=(−0.805,−0.644,+1.448)1.609\,(-0.5, -0.4, 0.9) = (-0.805, -0.644, +1.448).

Weighted by (0.5,0.4,0.1)(0.5, 0.4, 0.1), the average is (−0.173+0.094−0.080,  0.139−0.113−0.064,  0.035+0.019+0.145)=(−0.160,−0.038,+0.198)(-0.173 + 0.094 - 0.080,\; 0.139 - 0.113 - 0.064,\; 0.035 + 0.019 + 0.145) = (-0.160, -0.038, +0.198). That equals −∇zKL-\nabla_z\mathrm{KL}. ✓

(d) Most of the useful signal (raise C) arrives through the rare sample of C, which carries a big push of +1.45+1.45 on zCz_C, 10% of the time. The other samples push C up only indirectly and weakly. So the estimator is unbiased but has high variance exactly where the student is most wrong: tokens the teacher likes and the student rarely writes. Full-vocabulary OPD computes the exact gradient −(0.160,0.038,−0.198)-(0.160, 0.038, -0.198) at every visited position, no matter which token was sampled. That is the stability DeepSeek-V4 paid for with teacher-scheduling infrastructure.

Exercise 21.4MaxRL's weightsPen & paper●●○

(a) Starting from pass@k=1−(1−p)k\text{pass@}k = 1-(1-p)^k, show that ∑k=1N1k∇ pass@k=1−(1−p)Np∇p\sum_{k=1}^{N}\frac1k\nabla\,\text{pass@}k = \frac{1-(1-p)^N}{p}\nabla p.

(b) Evaluate the weight wN(p)=(1−(1−p)N)/pw_N(p) = (1-(1-p)^N)/p for p=0.05p = 0.05 and N=1,8,64N = 1, 8, 64. Compare with GRPO’s 1/p(1−p)1/\sqrt{p(1-p)} and maximum likelihood’s 1/p1/p.

(c) Show that wN(p)≤Nw_N(p) \le N for all pp. Interpret: why can’t MaxRL with NN samples up-weight a prompt by more than NN?

Hint
(a) ∇ pass@k=k(1−p)k−1∇p\nabla\,\text{pass@}k = k(1-p)^{k-1}\nabla p, then sum a geometric series. (c) 1−(1−p)N≤Np1-(1-p)^N \le Np (Bernoulli’s inequality, or a union bound on “at least one of N successes”).
Solution

(a) ∇ pass@k=−k(1−p)k−1⋅(−∇p)=k(1−p)k−1∇p\nabla\,\text{pass@}k = -k(1-p)^{k-1}\cdot(-\nabla p) = k(1-p)^{k-1}\nabla p. Then ∑k=1N1k k(1−p)k−1∇p=∇p∑j=0N−1(1−p)j=∇p 1−(1−p)N1−(1−p)=1−(1−p)Np∇p\sum_{k=1}^N \frac1k\,k(1-p)^{k-1}\nabla p = \nabla p\sum_{j=0}^{N-1}(1-p)^j = \nabla p\,\frac{1-(1-p)^N}{1-(1-p)} = \frac{1-(1-p)^N}{p}\nabla p.

(b) At p=0.05p = 0.05:

  • N=1N = 1: (1−0.95)/0.05=1(1 - 0.95)/0.05 = 1.
  • N=8N = 8: 0.958=0.6630.95^8 = 0.663, so w=0.337/0.05=6.73w = 0.337/0.05 = 6.73.
  • N=64N = 64: 0.9564=e64ln⁡0.95=e−3.283=0.03750.95^{64} = e^{64\ln 0.95} = e^{-3.283} = 0.0375, so w=0.9625/0.05=19.25w = 0.9625/0.05 = 19.25.
  • GRPO: 1/0.0475=4.591/\sqrt{0.0475} = 4.59.
  • Maximum likelihood: 20.

So MaxRL with 8 samples already up-weights this hard prompt more than GRPO does, and with 64 it is within 4% of maximum likelihood.

(c) (1−p)N≥1−Np(1-p)^N \ge 1 - Np (Bernoulli’s inequality), so 1−(1−p)N≤Np1-(1-p)^N \le Np and wN(p)≤Nw_N(p) \le N. Interpretation: the estimator divides by the number of successes K≥1K \ge 1 instead of by NN, and the largest possible boost is when K=1K = 1, a factor of NN. With NN samples you can’t tell a prompt with p=1/Np = 1/N from one with p=1/(100N)p = 1/(100N), so you can’t give the second a 100× larger weight. Sampling compute limits how much the objective can approach maximum likelihood, which is the sense in which MaxRL is “indexed by compute”.

Exercise 21.5Which tasks should a self-play proposer write?Pen & paper●●○

In Absolute Zero, the solver attempts a proposed task GG times, with true success probability pp. With p^\hat p the observed success fraction, the proposer gets r=0r = 0 if p^=0\hat p = 0 and r=1−p^r = 1-\hat p otherwise.

(a) Show that the expected proposer reward is E[r]=(1−p)−(1−p)G\mathbb{E}[r] = (1-p) - (1-p)^G.

(b) Find the pp that maximizes it, and evaluate it for G=8G = 8.

(c) Compare with the probability that a GRPO group of size GG has nonzero variance, 1−pG−(1−p)G1 - p^G - (1-p)^G. Why do both vanish at p=0p = 0, and why does only one vanish at p=1p = 1?

Hint
(a) Write r=(1−p^)−(1−p^)1[p^=0]r = (1-\hat p) - (1-\hat p)\mathbb 1[\hat p = 0] and use E[p^]=p\mathbb{E}[\hat p] = p and P(p^=0)=(1−p)GP(\hat p = 0) = (1-p)^G. (b) Differentiate with respect to pp.
Solution

(a) Since 1−p^=11-\hat p = 1 when p^=0\hat p = 0, we have r=(1−p^)−1[p^=0]r = (1-\hat p) - \mathbb 1[\hat p = 0]. Taking expectations, E[r]=(1−p)−(1−p)G\mathbb{E}[r] = (1-p) - (1-p)^G.

(b) ddpE[r]=−1+G(1−p)G−1=0\frac{d}{dp}\mathbb{E}[r] = -1 + G(1-p)^{G-1} = 0 gives (1−p)G−1=1/G(1-p)^{G-1} = 1/G, so p∗=1−G−1/(G−1)p^* = 1 - G^{-1/(G-1)}. For G=8G = 8: 8−1/7=e−ln⁡8/7=e−0.297=0.7438^{-1/7} = e^{-\ln 8/7} = e^{-0.297} = 0.743, so p∗≈0.26p^* \approx 0.26. The expected reward there is 0.743−0.7438=0.743−0.093=0.650.743 - 0.743^8 = 0.743 - 0.093 = 0.65. The proposer is paid most for tasks the solver gets right about a quarter of the time.

(c) Both vanish at p=0p = 0 because neither a proposer nor a policy gradient can learn from a task nobody ever solves: there is no success to reinforce. At p=1p = 1, GRPO’s group has no variance (every answer is right, so every advantage is 0). The proposer reward also vanishes there (1−p^=01 - \hat p = 0), but for a different reason. The design chose to pay nothing for trivial tasks. GRPO’s signal is symmetric in p↔1−pp \leftrightarrow 1-p (both all-wrong and all-right groups are useless). The proposer’s reward is not symmetric: it prefers harder tasks (p∗≈0.26p^* \approx 0.26, not 0.5), because a task solved most of the time teaches the solver little even when the group has some variance.

One more connection: (1−p)−(1−p)G(1-p) - (1-p)^G is exactly MaxRL’s “push on the logit” for N=G−1N = G - 1 samples, since wN(p) p(1−p)=(1−p)(1−(1−p)N)w_N(p)\,p(1-p) = (1-p)\big(1-(1-p)^N\big). Self-play with a learnability reward and the maximum-likelihood view of RL agree on which problems are worth practicing.

Exercise 21.6Find the confoundersConcept●●○

A preprint claims: “Our method, EntroBoost, prevents entropy collapse and improves AIME’25 by 6.2 points over DAPO.” The setup section says:

  • Base model: Qwen2.5-Math-7B. DAPO baseline numbers “taken from the original DAPO paper”.
  • EntroBoost trained for 800 steps with 16 samples per prompt and a learning rate of 2e-6. (DAPO’s paper used a different base model and its own settings.)
  • Evaluation: AIME’25 (30 problems), avg@8 at temperature 1.0 for EntroBoost. The baseline’s evaluation protocol is not stated.
  • One training run. An ablation shows that removing EntroBoost’s entropy term costs 1.5 points.

List at least five issues, say how each could produce the 6.2-point gap without EntroBoost being better, and propose the experiment that would settle it.

Hint
Go through the checklist: base model, baseline, compute, evaluation, contamination, seeds. Also notice what the ablation does and doesn’t show.
Solution
  1. Different base models. DAPO’s reported number comes from a different base model, so the gap may be a base-model difference. Qwen2.5-Math is also the family where random rewards gave large gains.
  2. Borrowed, untuned baseline. The baseline was not re-run in the same codebase with the same data, steps and samples.
  3. Unmatched compute. 16 samples per prompt and 800 steps may be much more (or less) generation than the baseline used. A fair comparison matches total samples generated.
  4. Unmatched evaluation. avg@8 at temperature 1.0 vs. an unstated protocol. Changing temperature or kk alone can move AIME scores by several points.
  5. Small test set, no error bars. On 30 problems, 6.2 points is about 2 problems. With one seed, the run-to-run spread could exceed that.
  6. Contamination is the item you can check off here: AIME’25 was set in February 2025, after Qwen2.5-Math was released, so the base model cannot have seen it. Say so explicitly; checking a confounder and ruling it out is part of the job. (If the paper also reported AIME’24, contamination would be a live issue there.)
  7. The ablation is weak evidence. Removing the entropy term costs only 1.5 of the 6.2 points, so most of the gain comes from something else (the other settings), not the claimed mechanism.

Settling experiment: run DAPO and EntroBoost in the same codebase, from the same base model (and a second model family), with matched samples per step, steps and learning-rate sweeps. Use at least 3 seeds each, and evaluate both with the same protocol (e.g. avg@32 at a fixed temperature) on AIME’25 plus a larger benchmark. Report entropy curves, to test the mechanism directly, with confidence intervals.

Exercise 21.7Design an experiment to test a frontier claimConcept●●●

Pick one claim and design a TinyLM-scale experiment (using this chapter’s lab) that could support or refute it. Specify: the hypothesis, the arms, what is held fixed, the metrics, the number of seeds, and what result would falsify the claim.

(a) “On-policy distillation beats SFT on teacher samples by more when sequences are longer.” (Thinking Machines’ compounding-error argument.)

(b) “MaxRL improves pass@k at large k more than pass@1.” (Tajwar et al. 2026.)

(c) “RL forgets less than SFT at matched gains.” (Shenfeld et al. 2025.)

Hint
For (a), you need a family of tasks where only the length changes, e.g. “output the sum twice” or “add three numbers”. For (c), you need an old skill to measure and a new skill to learn.
Solution

A model answer for each. Yours may differ; what matters is that it is falsifiable and controlled.

(a) Hypothesis: the gap in final pass@1 between OPD and SFT-on-teacher-samples grows with output length.

  • Arms: every combination of the method (SFT-teacher or OPD-full) and the output length (answer once, repeated 2×, repeated 3×) (extend tinylm so the target is the sum repeated with a separator, and set max_len accordingly).
  • Held fixed: teacher quality (train each teacher to ≥ 95%), the student initialization recipe (same SFT steps), sequences per step, steps, learning rate.
  • Metrics: exact-match pass@1 of the full output; per-token KL to the teacher; the error rate at each answer position (does SFT’s error rate grow along the sequence while OPD’s stays flat?).
  • Seeds: 3.
  • Falsified if: the OPD − SFT gap is flat or shrinks with length beyond seed noise.

(b) Hypothesis: relative to the mean-baseline advantage, MaxRL’s advantage gives a larger gain in pass@16 than in pass@1.

  • Arms: adv="mean" vs adv="maxrl" in project4_maxrl.py.
  • Held fixed: everything else.
  • Metrics: Δpass@1 and Δpass@16 between arms, using 500 evaluation prompts × 32 samples to shrink noise.
  • Seeds: 5. Repeat from a weaker student (--sft-steps 200), where more prompts have small p.
  • Falsified if: Δpass@16 ≤ Δpass@1 in both settings, with confidence intervals excluding the hypothesis.

(c) Hypothesis: at equal accuracy on a new skill, the RL-trained model loses less accuracy on an old skill than the SFT-trained one.

  • Setup: old skill = 2-digit addition (the student’s SFT task). New skill = a different task, e.g. answers written reversed, or subtraction with a new token. Teach the new skill with RL (verifier reward) and with SFT on correct answers, and stop each when new-skill accuracy reaches the same level (e.g. 60%).
  • Metrics: old-skill accuracy at that point, and KL(model ‖ start) on old-skill prompts (RL’s Razor predicts forgetting tracks this KL).
  • Seeds: 3.
  • Falsified if: SFT forgets equally or less at matched new-skill accuracy.
Exercise 21.8Predict what happensConcept●●○

For each recipe change, predict the effect and give the mechanism in one or two sentences.

(a) A team trains with a learned reward model (not a verifier) and, following a 2025 RLVR recipe, removes the KL penalty entirely.

(b) A team increases rollouts per prompt from 8 to 64 on a dataset where most prompts have pass rate below 2%.

(c) A team replaces its final mixed RL stage with on-policy distillation from domain specialists, but its specialists were trained from a different base model with a different tokenizer.

(d) A team switches from group-std normalization (GRPO) to MaxRL’s advantage on a dataset that is mostly easy (pass rates around 0.9).

Solution

(a) Faster reward-model over-optimization. The KL leash was what kept the policy near the data the RM was trained on (Chapter 11, Chapter 19). Verifiable rewards tolerate dropping it because a checker can’t be fooled by drift. A learned RM can, so expect proxy reward up and gold quality eventually down (Gao et al.’s curves). Keep a KL, use RM ensembles, or limit the number of steps on the RM reward (as DeepSeek-R1 did).

(b) Much more signal, at a cost. With p=0.02p = 0.02 and G=8G = 8, 0.988=85%0.98^8 = 85\% of groups are all-wrong and give zero gradient. With G=64G = 64, only 0.9864=27%0.98^{64} = 27\% are, so far more prompts contribute. Expect faster progress on hard prompts (the BroRL and IsoCompute findings), at 8× the generation cost per prompt. Whether it is worth it per unit of compute is exactly the IsoCompute question.

(c) Likely trouble. Sampled-token OPD needs the teacher’s log-prob of the student’s tokens. With different tokenizers, the tokens don’t line up, so you must re-tokenize and align, which is error-prone. Different base models also raise the “compatibility” problem (Li et al. 2026; Acikgoz et al. 2026): the teacher’s guidance on prefixes it would never write is unreliable. Expect weaker gains than same-family OPD, and possibly regressions.

(d) Relatively less push on the easy majority, relatively more on the few hard prompts. At p≈0.9p \approx 0.9, GRPO’s weight is 1/0.09=3.31/\sqrt{0.09} = 3.3, while MaxRL’s (for N=8N = 8) is (1−0.18)/0.9=1.11(1 - 0.1^8)/0.9 = 1.11. GRPO actually up-weights these near-solved prompts more (its weight rises again near p=1p = 1). MaxRL will spend relatively more of its push on the few hard prompts, and less polishing easy ones. Expect pass@1 on easy prompts to rise a little more slowly than under GRPO, and hard-prompt coverage to improve somewhat.

Exercise 21.9Explore the two demosExplore the demo●○○

Timeline.

(a) Filter to Algorithms only and step through with Next. Which milestones removed a component (a model, a network, a sampling loop) rather than adding one?

(b) Tap DeepSeek-V4 with lineage on. Which two older ideas does it combine?

Weights demo.

(c) In the “Push on the logit” view with N = 8, at what pass rate does expected-reward RL push hardest? And maximum likelihood?

(d) Set the dataset’s typical pass rate to 0.1. What share of each method’s total push goes to hard prompts (pp below 0.2)? Then set it to 0.7 and compare.

Solution

(a) DPO removed the reward model and the sampling loop. GRPO and RLOO removed the critic. Dr. GRPO removed the std and length normalizations. On-policy distillation removes the need for a reward altogether, using the teacher’s log-probs instead. Much of the progress was subtraction.

(b) DeepSeek-V4 builds on DeepSeek-V3.2 (GRPO specialists and the general pipeline, back to R1 and GRPO) and on on-policy distillation (Thinking Machines’ RL formulation, back to GKD 2023).

(c) Expected reward’s push is p(1−p)p(1-p), largest at p=0.5p = 0.5. Maximum likelihood’s push is 1−p1-p, largest as p→0p \to 0, on the hardest prompts.

(d) With N = 8, the demo shows these shares of the total push going to prompts with p<0.2p < 0.2:

dataset’s typical pass rateexpected rewardGRPOMaxRLmaximum likelihood
0.1 (hard)49%63%66%85%
0.3 (default)20%27%34%49%
0.7 (easy)1%1%3%4%

The ordering is the same in every row: expected reward < GRPO < MaxRL < maximum likelihood. With only 8 samples MaxRL sits close to GRPO; raise N and it moves toward maximum likelihood. On the easy dataset every method spends almost nothing on hard prompts, because there are almost none. The choice of objective matters most when your data is hard.

Exercise 21.10Lab: the capstone kitCode●●○

In the lab (exercises/21-frontier/):

  • Task 1 reverse_kl_rewards(student_logp, teacher_logp, mask): per-token rt=log⁡πT−log⁡πθr_t = \log\pi_T - \log\pi_\theta, masked and detached.
  • Task 2 opd_pg_loss(student_logp, rewards, mask): the token-mean REINFORCE loss with discount 0.
  • Task 3 full_vocab_reverse_kl(student_logits, teacher_logits, mask): the exact per-position KL, averaged over generated tokens.
  • Task 4 pass_at_k(n, c, k): the unbiased estimator 1−(n−ck)/(nk)1 - \binom{n-c}{k}/\binom{n}{k}, computed as a product.
  • Task 5 maxrl_advantages(rewards): (r−p^)/p^(r - \hat p)/\hat p per group, and zero for groups with no success.

Then run run.py (Project 0: OPD vs. SFT-on-teacher vs. RL) and pick one of Projects 1–5 from the README to carry out properly: at least 3 seeds, a plot, a one-paragraph conclusion, and the extension.

Hint
Task 1: one line, but remember .detach(). Task 3: use F.log_softmax on both, then (p_s * (log_s - log_t)).sum(-1). Task 4: np.prod((n - c - i) / (n - i)) for i in range(k), and return 1.0 early when n - c < k. Task 5: np.where(mean > 0, ...), with a safe denominator so you don’t divide by zero.
Solution

The reference code is in solutions/opd.py and solutions/tools.py. The key lines:

def reverse_kl_rewards(student_logp, teacher_logp, mask):
    return ((teacher_logp - student_logp) * mask).detach()

def opd_pg_loss(student_logp, rewards, mask):
    return -(rewards.detach() * student_logp * mask).sum() / mask.sum().clamp(min=1.0)

def full_vocab_reverse_kl(student_logits, teacher_logits, mask):
    log_s = F.log_softmax(student_logits, -1)
    log_t = F.log_softmax(teacher_logits.detach(), -1)
    kl = (log_s.exp() * (log_s - log_t)).sum(-1)
    return (kl * mask).sum() / mask.sum().clamp(min=1.0)

def pass_at_k(n, c, k):
    if n - c < k:
        return 1.0
    i = np.arange(k)
    return float(1.0 - np.prod((n - c - i) / (n - i)))

def maxrl_advantages(rewards):
    r = np.asarray(rewards, dtype=float)
    mean = r.mean(axis=-1, keepdims=True)
    return np.where(mean > 0, (r - mean) / np.where(mean > 0, mean, 1.0), 0.0)

A few points:

  • The .detach() in Task 1 matters. Without it, gradients would flow through the reward into log⁡πθ\log\pi_\theta a second time, and the loss would no longer be the policy-gradient estimator.
  • Task 3 detaches the teacher so no gradient leaks into a frozen model.
  • Task 4’s product form avoids computing huge binomials.

In run.py you should see full-vocabulary OPD finish ahead (pass@1 about 0.31 → 0.67), with SFT-on-teacher close behind and sampled-token OPD and RL further back. The README explains why the on-policy advantage is modest for 3-token answers.

Files: README.md, opd.py, tools.py, common.py, run.py, project1_clip_higher.py, project2_rubric.py, project3_learnability.py, project4_maxrl.py, project5_sharpen_or_expand.py, test_opd.py, test_tools.py, tinylm.py

cd 21-frontier
python -m pytest -q          # your code: tests fail until you fill in the TODOs
RL_SOLUTIONS=1 python -m pytest -q   # reference solutions: all pass

First time? See Exercises & setup.

Further reading

That’s the end of the course. You started with an agent in a gridworld and ended reading 2026 model reports. The next chapter is yours: pick an open problem, run the small version first, and report the seeds.