← All entries
Paper2026#1498

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

Summary

RL post-training keeps fp32 master weights in the optimizer and serves rollouts from a bf16 copy made by round-to-nearest conversion - the export rule in every open-source framework the authors examined (verl, TRL, OpenRLHF, slime, prime-rl, AReaL). Near a weight of magnitude |w| the bf16 grid spacing is u ~ |w|/128, so round-to-nearest discards any update smaller than u/2 ~ |w|/256; at common RL learning rates (eta ~ 1e-6) almost every update is that small. Measured on Qwen3-1.7B: only 0.4-0.5% of served weights change per optimizer step (0.13% at eta = 3e-7), a weight crosses a rounding boundary only every ~50-200 steps, and under a decaying LR schedule the sampler effectively freezes while the optimizer keeps moving - the data-generating policy lags the optimizer by 50-150 steps. Muon is worse: its per-element updates are nearly uniform in magnitude, so at eta = 1e-6 almost none cross a boundary. The mismatch is invisible to existing corrections (PPO clipping, truncated importance sampling, IcePop) because the ratio they form compares the trainer's bf16 forward pass with the sampler, and both sit downstream of the same rounding: the visible per-token |log rho| stays ~0.01 all training while the hidden master-versus-served ratio - never formed by any framework - grows to 0.10-0.16 on MATH and ~0.45 on knights-and-knaves, with per-token effective sample size between master and served policy falling to 0.2-0.35 on 2,000-token tasks. Fix (Fair Cast): export with an unbiased rounding rule - stochastic rounding (E[q] = theta exactly) or error feedback (a sigma-delta-style residual keeping accumulated export error bounded by u) - AND compute the training loss on the served copy; both halves are necessary, either alone fails. One line at the export call, no hyperparameters, 22-38 ms per export of 1.7B parameters. Results across 25 matched seed-pairs (Qwen3-0.6B to 4B, AdamW and Muon, GRPO on logic/game/math/code tasks): Fair Cast ahead on 18, tied on 6, behind on 1, mean gain 6.1 points; zebra puzzles 0.57 +/- 0.16 over four runs vs round-to-nearest collapsing to 0.33 +/- 0.10; on knights-and-knaves the round-to-nearest sampler stays frozen for the first ~20 steps (0.12 -> 0.15 -> 0.22) where Fair Cast moves immediately (0.12 -> 0.51 -> 0.79), and a single optimizer step moves an fp32 sampler 0.17 -> 0.84 while the bf16 round-to-nearest sampler stays at 0.19 across three steps. Two further findings: under round-to-nearest the saved fp32 checkpoint can score 12-50 points BELOW its own served export (the checkpoint is not the model; any finer export inherits the gap), and the round-to-nearest lag is an uncontrolled low-pass filter on the served policy that acts as a regularizer - exporting an EMA of the master with the same unbiased rounding restores it as a single explicit knob and surpasses round-to-nearest on the one task where the filter helps. Relation to prior diagnostics: Dirhoussi, Gallouedec et al. derived the same dead-zone threshold and PULSE measured the resulting update sparsity, but both treated it as a communication artefact and made the trainer agree with the stale sampler; this paper instead makes the served copy track the master and trains on the served copy. Code and full training harness public (MIT). Joins the precision thread and the train-inference-mismatch cluster (IDs 1588/1589): it identifies a mismatch upstream of every correction in that cluster, since they all compare copies downstream of the rounding.

Venue
arXiv preprint
Source
arxiv
Access
free
Language
en
Added
Nov 2, 2026
Verified
Nov 2, 2026

Research notes

  • License: paper CC BY 4.0 (license icon on the arXiv record); code MIT (verified on the repo: github.com/andrewgcodes/faircast, includes the full training harness and per-arm configs). Shared as a bare t.co link 2026-11-02 resolving directly to the arXiv page.

Similar entries