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.

Everyday example

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

Slide titled Beam's RL run with headline numbers and eight small learning curves, pass at 1 against run completion, for SWE-bench Verified, SWE-bench Pro, DeepSWE, BrowseComp, HLE, LiveCodeBench v6, AIME 2026 and GPQA-Diamond. Most curves rise to the end of the run.

Beam’s RL run: held-out scores across the run, with 10.5K GB300 GPUs, four weeks, over 100M rollouts and over 1M tasks. Image: Brandon Amos, Post-training Beam, slide 26 [1]. Original: Beam Model Technical Report, Figure 17, p. 32 [2].

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

Slide titled How to scale RL? Infra and Science. Infra: training throughput, rollout generation, latency, keeping the run moving. Science: overall formulation, optimization dynamics, model health, gradient spikes.

Scaling RL needs progress on both the infrastructure and the science. Image: Brandon Amos, Post-training Beam, slide 27 [1].

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

Slide titled The asynchronous RL loop. Tasks go to rollout workers running agent episodes; they send context to a policy inference GPU pool and receive tokens, log-probabilities and versions; actions go to a task sandbox that returns observations. Completed attempts go to task grading by verifiers or judges; rewards go to batch preparation, which retains groups and packs samples; training batches go to a trainer GPU pool, which sends updated weights back to inference.

The asynchronous RL loop: rollout workers, policy inference, task sandboxes, grading, batch preparation and the trainer, all running at once. Image: Brandon Amos, Post-training Beam, slide 28 [1]. Original: Beam Model Technical Report, §4.4 [2].
  1. 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.
  2. Tool calls run in a sandbox (files, a shell, a test suite), which returns observations.
  3. At the end a verifier or judge scores the attempt.
  4. Once enough attempts of the same task are done, the group is kept and packed into a training batch.
  5. 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.

Two stacked plots over training steps 190 to 315. Top: sample age in policy versions behind; the batch average stays near five while the oldest sample rises in a jagged line, peaking at 107 versions, about a day old. Bottom: KL between the sampling policy and the updated policy, rising from low toward high.

Sample staleness: the average sample is a few versions old, but the oldest in a batch can be over a hundred versions, about a day. Image: Brandon Amos, Post-training Beam, slide 30 [1]. Original: Reflection, Introducing Beam [3].

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].

Three scatter plots of score against mean generated tokens for DeepSWE v1.1, HLE text-only and Terminal Bench 2.1. Beam's curve rises steeply at low token counts; several other models sit further right, using more tokens.

Beam’s score against mean generated tokens on three benchmarks, as reasoning effort increases. Image: Brandon Amos, Post-training Beam, slide 7 [1]. Original: Reflection, Introducing Beam [3].

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].

Slide titled Token efficiency via a linear length penalty with the objective max over theta of expected r of y minus lambda of e times c of y. A flow from low or high effort to rollout budget B of e to token cost lambda proportional to one over B. A plot of length penalty against rollout length, with a steeper line for low effort ending at B low and a shallower line for high effort ending at B high.

Effort sets a rollout budget; each token costs a little. Image: Brandon Amos, Post-training Beam, slide 33 [1]. Original: Beam Model Technical Report, §4.1.2 [2]; the budget-normalised price is the talk’s illustration.
  • 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].

Slide listing advantages: dense optimization signal, every token contributes to the cost, penalizes verbosity, favors shorter successful responses, one coefficient to tune. Disadvantages: unnaturally brief text, less human-readable reasoning traces, no prompt-specific adjustment, coefficient fixed at a given effort level.

The trade-offs of a linear length penalty. Image: Brandon Amos, Post-training Beam, slide 34 [1].

It works: during RL, Beam solves more DeepSWE tasks at the same token budget, checkpoint after checkpoint [2].

Slide with a plot of DeepSWE score against output and tool tokens per episode. Several curves, one per RL checkpoint, move up and to the left as training progresses.

DeepSWE token efficiency improves across RL checkpoints; each curve is a checkpoint, each point an effort level. Image: Brandon Amos, Post-training Beam, slide 32 [1]. Original: Beam Model Technical Report, Figure 40, p. 78 [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].

Slide titled What other models do: a table of models, their length or cost control and release month, including Beam, Mistral Large 4, Kimi K3, DeepSeek V4.1 Flash, Nemotron 3 Ultra, Nemotron 3.5 Super, MiMo-V2.6, Inkling, Inkling 2 Small and Cognition SWE-2.

Length and cost controls in other 2026 models. Image: Brandon Amos, Post-training Beam, slide 35 [1]. Model sources are in the talk’s SOURCES.md.

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].

Left: scatter of training probability against inference probability; red points without replay spread widely, green points with replay hug the diagonal. Right: three engine diagrams, inference engine and training engine with old and updated policy, all reusing the expert selection 1 and 4 through Rollout Routing Replay.

Router replay: reuse the experts that inference selected when the trainer recomputes the token. The scatter shows training against inference probabilities, much closer to the diagonal with replay. Image: Brandon Amos, Post-training Beam, slide 38 [1]. Original figures: Ma and colleagues, Rollout Routing Replay [4]; measured on Qwen3-30B-A3B, not on Beam.
  • 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].
Everyday example

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

References

Back to top