Unit 8 of 13 · about 5 hours · explain, measure
Actor, rollout, verifier and learner roles, synchronous and asynchronous loops and staleness
Decoupling rollout from training buys throughput but sells freshness. Version stamps decide whether a gradient still describes the current policy.
You'll be able to
- Name the actor, rollout, verifier and learner roles and state which state each owns.
- Contrast synchronous and asynchronous rollout-update loops by weight sync, queueing and staleness.
- Measure policy lag on a tiny loop and state when updates stop being on-policy.
Covers
Read
In this order, only the parts listed
0 of 3 done
- Hybrid controller and worker rolesveRL
Single-controller design at commit 8718ca3: controller on one process with generator, actor and critic workers on many;
ActorRolloutRefmanaging actor plus rollout plus reference with colocated NCCL reshard;TrainingWorkerfor critic and reward - Async generation and staleness controlveRL
Fully async design at commit 8718ca3: sample-by-sample rollouter with message queue,
staleness_threshold0 for sync and above 0 for async, NCCL parameter sync, rollout log-prob correction with bypass mode - Distributed RL training and engine mismatchHands-on Modern RL - Reasoning, Agentic RL and Safety
Behavior policy versus recorded old policy: floating point, kernels and routing make them diverge, the ratio goes wrong, and clipping cannot fix it; 70B full state about 1.22TB versus ZeRO-3 plus checkpointing about 30GB; async LlamaRL and AReaL patterns (page read 2026-10-14)
Read for the mechanism and thresholds. Do not build multi-GPU runs here.
Focus on
- The controller owns versions and dispatch. Rollout owns generation. The verifier owns scores. The learner owns weights.
- Synchronous loops stamp one version per batch. Async loops mix versions, so each trajectory carries its rollout version.
- Staleness is the gap between rollout weights and learner weights. Past a threshold the data is off-policy.
- Engine mismatch is not staleness. Two engines can disagree on the same version, and no clip fixes that.
Common mistakes · 3
- Treating colocated sync as free. Broadcast and reshard still cost time and need measuring.
- Calling async data on-policy. Mixed versions need importance handling or a freshness bound.
- Recomputing old log probabilities from the newer policy. Old log probabilities are immutable rollout data.
Try it yourself
Closed-book, before checking anything
Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.Which role owns the reward score?Answer
The verifier or reward worker. The learner must not recompute scores from a newer model.
2.What changes between sync and async loops?Answer
Weight sync timing and queueing. Sync uses one version per batch; async overlaps generation with updates and mixes versions.
3.What does a staleness threshold of 0 mean?Answer
Fully synchronous updates. Above 0 allows bounded async lag with correction.
4.Two engines compute different log probabilities for the same version. Does PPO clipping fix the ratio?Answer
No. Clipping limits movement but cannot reconcile probabilities from different engines.
You're done when
You can name each role owner from memory and your loop diagram shows version stamps, sync points and the staleness bound.
Only when you can do this without notes.
Leads to
Notes
Resources · 2 for this unit, 11 more in the section
- Hands-on Modern RL - Reasoning, Agentic RL and SafetyWalking Labs · support
Use the build-an-agentic-training-system page (a from-scratch trainer exercise), one reasoning or search control and the reward-hacking evaluation chapter selectively. Skip the pages that need API keys or several GPUs and the frontier surveys. Pin commit 9231bab of walkinglabs/hands-on-modern-rl; its
code/chapterNNfolders do not follow the site chapter numbers. - veRLByteDance · support
Inspect the hybrid-controller architecture, worker roles, supported algorithms and examples at commit 8718ca3 after single-device losses pass. Trace one rollout from generation through reward and update, record policy lag and run only hardware-compatible examples.
Also in this section
- RLHF Book - Reasoning, Synthetic Data, Tools and EvaluationNathan Lambert · primary
Study Chapter 7 (reasoning and inference-time scaling), Chapter 12 (synthetic data and on-policy distillation), Chapter 13 (tool use), Chapter 14 (over-optimization) and Chapter 16 (evaluation). Build a claim map separating RLVR learning, inference-time search, on-policy distillation, tool trajectories, reward overoptimization and independent evaluation.
- RLHF Book Course - Lectures 5, 7, 11 and 12Nathan Lambert · required
Use Lecture 5 (the rise of reasoning models), Lecture 7 (synthetic data and modern post-training), Lecture 11 (tool use and the road to agents) and Lecture 12 (frontier model evaluation). Tie every mechanism to a distinct data and compute budget.
- DeepSeek-R1 Technical ReportDeepSeek AI · required
Read version 2 of the report (January 2026; the Nature 2025 paper is the peer-reviewed version): the R1-Zero and R1 training pipeline, reward design, observed behaviors and limitations. Reproduce only a reduced verifier-driven question and test whether longer sampling or selection explains the observed gain.
- Build a Reasoning Model (From Scratch) - Chapters 3, 6 and 8Sebastian Raschka (Manning) · support
Use Chapter 3 (a math verifier: boxed-answer extraction, normalization and equivalence checks), Chapter 6 (RLVR with GRPO on a MATH subset) and Chapter 8 (distillation from filtered rollouts) as the smallest verifier-to-distillation path on Qwen3 0.6B.
- Tulu 3: Pushing Frontiers in Open Language Model Post-TrainingLambert et al. (Ai2, 2024) · support
Read the RLVR section: verifiable rewards for math, instruction following and constraints, and how the RLVR stage sits after SFT and DPO. Compare its recipe with R1-Zero on what is rewarded and what is held out.
- STaR: Bootstrapping Reasoning With ReasoningZelikman et al. (NeurIPS 2022) · support
Read the generate, filter by correctness and fine-tune loop and the rationalization step. Use it as the rejection fine-tuning control that an RL method must beat at matched samples.
- RAGEN: Understanding Self-Evolution in LLM Agents via Multi-Turn Reinforcement LearningWang et al. (2025) · support
Read the multi-turn trajectory formulation and the training instabilities it reports for agent RL (collapse into repetitive reasoning). Use it to design the diagnostics for a small multi-turn environment.
- Stanford CS224R 2026 LLM RL Default Project - ExtensionStanford University · required
Use the specification sections on SFT, IPO, RLOO, evaluation and one extension such as off-policy sampling, test-time inference, exploration, self-play or tool reasoning. Build independent code on a distinct task and respect all course restrictions.
- Berkeley CS 185/285 Deep Reinforcement Learning (Spring 2026) - LLM RL Default Final ProjectUC Berkeley · support
Read the default project for open-ended instruction following: offline DPO, IPO and AOT, online GRPO, Dr. GRPO and GSPO, and judge-based win rates against a frozen base. Use it as a second extension menu; its compute assumes cloud GPUs and a paid judge model.
- LLM Post-Training Laboratory - Final IntegrationRoadmap-Final · required
Finish the bounded rollout and verification queue, reasoning or tool extension, independent clean and adversarial evaluation, reward-hacking postmortem, policy-lag and throughput records, clean reproduction and one prespecified negative or positive result.
- Reinforcement Learning CheckpointRoadmap-Final · support
Take the checkpoint closed-note after the integrated project. Pass the estimator and state reconstruction, unseen failure diagnosis, matched-budget comparison, external evaluation and research-readiness clauses.