RL at scale
How a large, asynchronous reinforcement-learning run turns GPUs into a better model
From a classroom loop to a factory
On paper, reinforcement learning for an LLM is a short loop: try, get scored, update. In a classroom you run it on one GPU and wait. At the scale of a modern open model it becomes a factory: thousands of GPUs writing attempts, thousands of sandboxes running code, graders scoring, and a trainer updating the model while all of that keeps moving.
This page follows the “RL at scale” part of Brandon Amos’s talk Post-training Beam [1] and the Beam technical report [2]. The tasks and graders that feed the loop are on Tasks, verifiers and judges. The story of why RL is here at all is on Evolution of post-training.
A restaurant kitchen. Orders (tasks) come in, cooks (inference GPUs) prepare dishes (rollouts), a taster (grader) scores them, and the head chef (trainer) changes the recipe. The kitchen never stops while the recipe changes, so some dishes are cooked to last hour’s recipe.
The update rule, in one picture
Beam uses GRPO-style policy gradients, building on PPO and GRPO [1][6]. Take one prompt, sample a group of \(G\) attempts, score each one, and give each attempt an advantage: its reward minus the group’s mean reward.
\[ \tilde{A}_i = r_i - \frac{1}{G}\sum_{j=1}^{G} r_j \]
With rewards \(0, 1, 1, 0\) the mean is \(\tfrac12\), so the advantages are \(-\tfrac12, +\tfrac12, +\tfrac12, -\tfrac12\). Good attempts are pushed up, bad ones down. If every attempt gets the same reward, every advantage is zero and the prompt teaches nothing. GRPO in detail, and the DeepSeek-R1 story, are on Reinforcement learning for reasoning. You can compute this yourself in Lab#LL02-1.
Beam’s run
The numbers: 10.5K GB300 GPUs, four weeks, more than 100 million rollouts (repeats, derisking and distillation included) and more than a million tasks [1][2]. The median rollout took about twelve minutes; some took over an hour [1]. Scores kept rising to the end, with no plateau [2]. The task mix changed during the run, so the curves are evidence about the whole recipe, not about rollout count alone [1].
Two halves: infrastructure and science
They pull against each other. Bigger batches keep the GPUs busy but make the data older. A faster trainer changes the balance with generation. A gradient spike might come from number formats, a broken task, or a batch change — you need both kinds of measurement to tell which [1].
The asynchronous loop
- A rollout worker takes a task and asks the inference pool for the next tokens. It records the tokens, their probabilities and the model version that wrote them.
- Tool calls run in a sandbox (files, a shell, a test suite), which returns observations.
- At the end a verifier or judge scores the attempt.
- Once enough attempts of the same task are done, the group is kept and packed into a training batch.
- The trainer updates the model and publishes new weights to inference, while other rollouts are still running [1].
Inference and training use separate GPU pools. The sandboxes are their own service: over a billion sandbox creation requests across more than twenty clusters and two clouds [1]. A free GPU cannot help an agent that is waiting for its sandbox, so sandbox speed is part of the same budget.
Stale samples
Because the trainer keeps moving, an attempt may have been written by an older version of the model.
The average stays a few versions behind; the tail can be very old. Age counts updates; divergence (the KL in the lower panel) measures how much the probabilities actually changed. Both are monitored, and the recorded versions and probabilities let the trainer correct for the gap [1].
Tokens have a price
A model rewarded only for being right learns to write a lot. Beam’s answer is a reasoning-effort setting plus a linear length cost [1][2].
The idea in one line: maximise the task reward minus a cost for every token,
\[ \max_\theta\; \mathbb{E}_{y\sim\pi_\theta(\cdot\mid x,e)}\big[\, r(y) - \lambda(e)\, c(y) \,\big] \]
where \(x\) is the task, \(e\) the effort, \(y\) the rollout, \(r\) the correctness reward, \(c\) the number of tokens and \(\lambda\) the price per token [1].
- Effort sets a budget. Run out of budget and the attempt stops with no correctness reward.
- Every token has a price. Among equally correct answers, the shorter earns more.
- In the talk’s illustration, \(\lambda(e) = \kappa / B(e)\): a bigger budget means a cheaper token [1].
It works: during RL, Beam solves more DeepSWE tasks at the same token budget, checkpoint after checkpoint [2].
Other 2026 models choose differently: a bonus for the shortest correct answer in a group, a reward of −1 beyond a budget, a cost in dollars and seconds [1].
These are recipes, not a controlled comparison: nobody has shown which penalty is best [1].
Training and serving must agree
The last group of details sounds boring and matters a lot. RL assumes that the probabilities the trainer computes are the same ones inference used when it wrote the attempt. In a big system they drift apart [1]:
- Number formats. Most of the model runs in BF16, but routers, the residual stream and the output head run in FP32 in both training and inference, to keep them close [1][2].
- Router replay. In a Mixture-of-Experts model (Beam picks 8 of 256 experts per token), a near-tie can pick different experts in training and in inference, even with identical weights. The fix is to record which experts inference chose and replay them in training [4].
- Careful arithmetic. When two distributions are almost equal, computing the difference between them (a KL) can lose its precision. Amos’s ongoing work studies exactly this [1][5].
Two cooks follow the same recipe, but one weighs in grams and the other in ounces, rounded. Over a few dishes nobody notices. Over a million dishes, the taster is scoring a different recipe from the one being changed.
In one table
| Piece | Kitchen analogy | Why it matters |
|---|---|---|
| Group advantage | Score each dish against the others from the same order | A signal without a learned critic; zero if all dishes are alike |
| Asynchronous loop | The kitchen never stops while the recipe changes | Keeps thousands of GPUs busy |
| Sandbox service | Ovens and stoves on demand | Waiting for an oven wastes a cook |
| Staleness | Dishes cooked to last hour’s recipe | The update must account for older samples |
| Effort and length cost | A time limit and a price per minute | Right and brief |
| Router replay, FP32 paths | Same scales in every kitchen | Training and serving compute the same probabilities |
FAQ
Why asynchronous? Wouldn’t waiting be cleaner? Cleaner, but slow. A rollout can take minutes or hours. If the trainer waited for the slowest one, most GPUs would sit idle. The price is staleness, which is measured and corrected.
Does a length penalty make the model dumber? It can, if the price is too high: useful reasoning or a needed tool call gets cut. That is why the price is tied to an effort level and kept as one tunable number [1]. Try it in Lab#LL02-1.
Is “100 million rollouts” the same as 100 million tasks? No. It counts every attempt, including repeated attempts at the same task, derisking runs and the distillation stage [1].
Do I need any of this for a classroom RL run? No. One GPU, a synchronous loop and a verifier are enough to learn the idea. This page is about what changes when the loop becomes a factory.
See also
- Evolution of post-training and Tasks, verifiers and judges
- Reinforcement learning for reasoning — GRPO and DeepSeek-R1
- Inference-time scaling — spending more tokens on purpose
- Evolution of LLM Architecture — Mixture of Experts
- On-policy distillation — the same loop, with a teacher instead of a grader
- Lab#LL02-1: Group advantage and length cost
References
- [1] Brandon Amos, Post-training Beam, MIT ScaleML seminar, 30 November 2026. Slides page, PDF, Beamer source and figure credits. Slide images reproduced with credit; slide numbers are PDF page numbers.
- [2] Reflection Team, Beam Model Technical Report, 2026. arXiv:2611.26358; report PDF.
- [3] Reflection, Introducing Beam, 2026. https://reflection.ai/blog/introducing-beam. Token-efficiency and staleness figures, as bundled in the talk.
- [4] Ma and colleagues, Stabilizing MoE Reinforcement Learning by Aligning Training and Inference Routers (Rollout Routing Replay). https://arxiv.org/abs/2510.11370.
- [5] Brandon Amos, On numerical issues of divergences between nearly equal distributions, 2026. https://arxiv.org/abs/2611.18511. See also Barron and colleagues, A Fix for Softmax and Cross-Entropy, 2026, arXiv:2610.31642.
- [6] Zhihong Shao and colleagues, DeepSeekMath, 2024 (GRPO). https://arxiv.org/abs/2402.03300. John Schulman and colleagues, Proximal Policy Optimization Algorithms, 2017. https://arxiv.org/abs/1707.06347.









