Manuscript Offprint

arXiv:2610.41073

bf16 Rounding Silently Discards Most RL Policy Updates: A Hidden Training-Inference Mismatch and an Unbiased One-Line Fix

Andrew Gao, William Gao

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Reinforcement learning (RL) post-training of language models keeps fp32 master weights in the optimizer and serves rollouts from a bf16 copy produced by round-to-nearest conversion. At the learning rates in common use, most per-step updates are smaller than half a bf16 spacing and the conversion discards them: on Qwen3-1.7B only 0.4–0.5% of served weights change per step, and the policy that generates the training data lags the optimizer by 50–150 steps. Existing mismatch corrections cannot see this lag because they compare two copies downstream of the same rounding. We propose Fair Cast: export the master with an unbiased rounding rule (stochastic rounding or error feedback) and compute the training loss on the served copy. The change is one line at the export call, adds no hyperparameters and costs 22–38 ms per export of 1.7B parameters. Across 25 matched seed-pairs on Qwen3-0.6B to 4B with AdamW and Muon, Fair Cast is ahead on 18, tied on 6 and behind on 1, with a mean gain of 6.1 points; on zebra puzzles it reaches 0.57±0.160.57 \pm 0.16 over four runs where round-to-nearest collapses to 0.33±0.100.33 \pm 0.10. It also makes the saved fp32 checkpoint agree with the served model, and it exposes the implicit lag of round-to-nearest as a regularizer that can be restored explicitly when a task needs it.

Code: https://github.com/andrewgcodes/faircast

(a) Zebra puzzles, 1.7B (3 and 4 runs)

Figure

(b) Knights-and-knaves, 1.7B

(e) Nim, 1.7B

(c) Knights-and-knaves, Muon (2 seeds)

(f) GSM8K, 0.6B (3 seeds)

(g) MATH levels 3-5, 0.6B (3 seeds)

(d) Knights-and-knaves, 0.6B

(h) MBPP+ held-out, 1.7B (4 seeds)

round-to-nearest export (current default) Fair Cast (unbiased export + train on served copy)

fp32 sampler (no rounding)

Figure 1. Fair Cast learns faster and more stably than round-to-nearest export across tasks, model sizes and optimizers, and tracks the fp32 sampler where one was run. Held-out accuracy of the served copy against optimizer step on logic (a-d), game (e), mathematics (f, g) and code (h) tasks; bands are ±\pm 1 s.d. across runs (panel (a): three round-to-nearest and four Fair Cast runs; panel (h): scored on the 224 MBPP+ problems absent from the training split); the dashed line is a sampler run in fp32 with no rounding at all.

1 Introduction

Modern LLM reinforcement learning stacks separate the optimizer from the sampler. The optimizer holds fp32 master weights θ\theta; a dedicated inference engine (vLLM, SGLang) holds a bf16 copy q and generates the rollouts. Every open-source framework we examined (verl, TRL, OpenRLHF, slime, prime-rl, AReaL) produces q from θ\theta by round-to-nearest conversion (Figure 2). This paper is about what that conversion does to learning, and how to fix it with one line of code.

Figure

Fair Cast changes the two shaded boxes: unbiased rounding at the export, and a trainer forward on the exact served copy q

Figure 2. Where the two ratios live. The trainer's bf16 forward pass and the sampler both sit downstream of the export, so the ratio frameworks check (green) stays near one; the ratio between the fp32 master and the served copy (red) is never formed. Fair Cast changes the two shaded boxes.

The problem is one of scale. Near a weight of magnitude ∣w∣|w| the bf16 grid spacing is u≈∣w∣/128u \approx |w|/128, so round-to-nearest discards any update smaller than u/2≈∣w∣/256u/2 \approx |w|/256 (Figure 3). At the learning rates in common use (η≈10−6\eta \approx 10^{-6}) almost every Adam update is that small: on Qwen3-1.7B only 0.4–0.5% of served weights change per optimizer step, and the sampler acts on a policy that reflects the optimizer state of 50–150 steps earlier. Dirhoussi, Gallouédec et al. [1] derived the same threshold and observed that the inference engine “sees a nearly static model … even as the optimizer accumulates meaningful updates in FP32”; PULSE [2] measured the resulting sparsity. Both treated it as a communication artefact and, where they intervened, made the trainer agree with the stale sampler; the same team now ships only the changed 1% of bf16 elements as a sparse delta, describing the sparsity as obtained “with zero approximation” [25].

Figure

Figure 3. A weight on the bf16 grid. Left: under round-to-nearest the served value stays at w0w_0 while the fp32 master accumulates sub-u/2 updates; it jumps only when the master crosses a midpoint. Right: under stochastic rounding the served value flips between neighbours with probability equal to the fractional position, so E[q]=θE[q] = \theta at every step.

Our central observation is that the quantity those diagnostics check is not the quantity that governs learning. Under round-to-nearest the samples come from the export q and the gradient is evaluated at q, but the update lands on the master θ\theta, where the optimizer state lives. The policy that is sampled and differentiated therefore lags the policy the optimizer believes it is improving by however many updates the dead zone has withheld, and the size of that lag is the ratio πθ(y)/πq(y)\pi_{\theta}(y)/\pi_q(y). No framework forms it. What frameworks compute is πtrainer(y)/πsampler(y)\pi_{\text{trainer}}(y)/\pi_{\text{sampler}}(y), and because the trainer's bf16 forward pass is itself a function of q, that ratio stays near one however far θ\theta has moved. We measure the visible ratio at ∣log⁡ρ∣≈0.01|\log \rho| \approx 0.01 per token throughout training while the hidden one grows to 0.10–0.45 (Figure 4); the per-token effective sample size between master and served policy falls to 0.2–0.35 on 2,000-token tasks.

The fix is to make the export unbiased and to train on it. Fair Cast replaces round-to-nearest at the export with stochastic rounding (or error feedback), so that E[q]=θE[q] = \theta and no update is systematically withheld, and computes the loss on the exact served copy, so that the policy generating the data is the policy being differentiated. Figure 1 summarizes the effect across the tasks, model sizes and optimizers we study.

Contributions.

  1. A hidden lag. We measure the master-versus-served mismatch that current frameworks never form, and show why PPO clipping, truncated importance sampling, IcePop masking and bf16-autocast training cannot detect it ( §3–§4§3–§4).

  2. Fair Cast. An unbiased export combined with training on the served copy: one line at the export call, no hyperparameters, 22–38 ms per export of 1.7B parameters. Both halves are necessary; either alone fails ( §5,§7.1§5, §7.1).

  3. Faster and more stable learning. Over the 25 matched seed-pairs reported in Table 2 and §7.5 (Qwen3-0.6B to 4B, AdamW and Muon), Fair Cast is ahead by more than one point on 18, within one point on 6 and behind on 1, with a mean gain of 6.1 points. On zebra puzzles it reaches 0.57±0.160.57 \pm 0.16 over four runs where round-to-nearest collapses to 0.33±0.100.33 \pm 0.10; under Muon it leads at every checkpoint ( §7.2–§7.3§7.2–§7.3).

  4. The checkpoint is not the model. Under round-to-nearest the saved fp32 master can score 12–50 points below its own served export, and any export finer than bf16 (fp16, FP8 via fp16) inherits the difference; under Fair Cast master and export agree ( §7.4§7.4).

  5. Lag as a tunable regularizer. The lag of round-to-nearest is an uncontrolled low-pass filter on the served policy. Restoring it explicitly, as an exponential moving average exported with the same unbiased rounding, gives a single knob that recovers and surpasses round-to-nearest on the one task where the filter helps ( §7.5§7.5).

References (24)