ScaleRLT: Exact Log-Probabilities and Fast Deferred Rollouts for Reinforcement Learning on Looped Transformers
Organizations: University of Tübingen, Tübingen, Germany. · Xi’an Jiaotong University, Xi’an, China. · University of Illinois Urbana-Champaign, Urbana, IL, USA.
Abstract
Looped language models such as Ouro reuse one block of layers several times per token. A rollout engine can batch the deeper loops of several response positions and run them only when a deep readout is due. This deferred schedule is fast, but the learner of an on-policy RL algorithm recomputes the sampled tokens' log-probabilities with a dense pass, and the two computations differ in floating point: in FP32 at 4096 tokens about 18% of the sampled tokens miss a same-weight gate, and with bf16 weights nearly every token does. We use a hybrid learner log-probability, , where denotes stop-gradient. Its value is a no-grad replay through the rollout's own schedule, and its gradient is the dense learner's. The replay reproduces the rollout bit for bit in all 167 FP32 and 28 bf16 real-weight cells we ran on three platforms, including rollouts whose batch shrinks at stop tokens, and the gradient has the same FP32 error as other dense implementations in all 102 pre-registered comparisons from 96 to 4096 tokens; the full GRPO loss of a training step matches a float64 reference to . On one GPU, deferral raises rollout throughput by to , and by to once every step runs from CUDA graphs, bit for bit. In a two-node GRPO loop, one-wave KV admission and CUDA graphs shorten an update by with the gate bitwise at every update, and four nodes keep the update time within 2% at the same per-GPU load. In 100-update runs held-out GSM8K accuracy rose from 23% to 82% with the mixed-depth readout that deferral relies on and from 34% to 90% with the native readout, which reached a higher accuracy in less time. For looped models beyond one node we analyse a ring mapping of layers to GPUs and measure its communication paths.
Figures & tables
| Platform | Length | Cells | Max | Tokens over |
| L40S | 96 | 54 | 161/14,496 (1.1%) | |
| L40S | 1024 | 3 | 404/10,016 (4.0%) | |
| L40S | 4096 | 1 | 760/4,096 (18.6%) | |
| GH200 | 96 | 36 | 65/9,664 (0.7%) | |
| GH200 | 1024 | 4 | 599/17,984 (3.3%) | |
| GH200 | 4096 | 5 | 13,545/73,408 (18.5%) |
| Platform | Cells | Tokens | Lengths | A2 bitwise | A2x max | A2-solo max | |
| L40S (CPU arms) | 10 | 2,928 | 96/512 | 1/2/4/8 | 10/10 | – | |
| L40S | 58 | 28,608 | 96/1024/4096 | 1/2/4/8 | 58/58 | ||
| GH200 | 45 | 101,056 | 96/1024/4096 | 1/2/4/8 | 45/45 | ||
| GH200, production rollout | 54 | 55,678 | 1024 | 1/2/4/8 | 54/54 | – | |
| GH200, bf16 | 23 | 19,008 | 96/1024/4096 | 1/2/4/8 | 23/23 | ||
| GH200, bf16, production rollout | 5 | 15,724 | 1024 | 8 | 5/5 | – |
| Platform | Length | Comparisons | median | max | Other dense, median | , max |
|---|---|---|---|---|---|---|
| GH200 | 96 | 72 | 1.62 | |||
| B300 | 512 | 2 | 1.09 | |||
| B300 | 1024 | 20 | 1.19 | |||
| B300 | 4096 | 8 | 0.96 |
| Config | Deferred | Eager | K4 | Def./eager | W/o capture | Capture |
|---|---|---|---|---|---|---|
| , 512 | 316 | 205 | 213 | 1.54 | 1.56 | 2% |
| , 512 | 1211 | 1025 | 976 | 1.18 | 1.19 | 1% |
| , 2048 | 591 | 452 | 442 | 1.31 | 1.31 | 1% |
| , 512, stop tokens | 485 | 412 | 416 | 1.18 | 1.37 | 27% |
| Configuration | Waves | Rollout s | Gate s | Train s | Step s | Rollout tok/s | Gate bitwise | Peak MiB |
|---|---|---|---|---|---|---|---|---|
| Cap 16 (2 waves) | 2 | 80.1 | 77.6 | 32.5 | 195.6 | 1,336 | 24/24 | 67,062 |
| One wave | 1 | 36.5 | 34.7 | 29.9 | 106.2 | 2,929 | 24/24 | 97,208 |
| One wave + graphs | 1 | 18.7 | 15.9 | 30.6 | 70.5 | 5,728 | 24/24 | 97,034 |
| One wave, release | 1 | 37.0 | 34.2 | 30.3 | 106.9 | 2,892 | 24/24 | 63,016 |
| One wave + graphs, release | 1 | 19.2 | 16.1 | 31.5 | 72.2 | 5,578 | 24/24 | 63,246 |
| Arm | Samples | Updates | Update (s) | Rollout | Gate | Train | Peak (MiB) | Gate bitwise | Accuracy |
|---|---|---|---|---|---|---|---|---|---|
| K4, weak | 512 | 20 | 81.2 | 23.4 | 20.9 | 32.0 | 49,582 | 320/320 | 33.8% 84.2% |
| Mixed, weak | 512 | 20 | 69.2 | 18.5 | 16.2 | 30.3 | 50,000 | 320/320 | 23.0% 76.4% |
| K4, strong | 256 | 10 | 60.2 | 21.6 | 20.1 | 15.9 | 39,262 | 160/160 | 33.8% 79.6% |
| K4, no recompute | 512 | 5 | 68.3 | 23.7 | 21.0 | 19.1 | 49,518 | 80/80 | – |
| Updates | 8 GPUs, 256/update | 1 GPU, 64/update | ||
|---|---|---|---|---|
| Mixed | K4 | Mixed | K4 | |
| 0 | 23.0% | 33.8% | 23.0% | 33.8% |
| 20 | 75.8% | 84.6% | 69.2% | 82.6% |
| 40 | 78.8% | 87.8% | 74.4% | 84.4% |
| 60 | 81.6% | 87.6% | 80.8% | 86.6% |
| 80 | 82.0% | 89.0% | 81.0% | 87.6% |
| Updates | bf16, T3 | bf16, dense ungated | FP32, T3 |
|---|---|---|---|
| 0 | 23.6% | 23.6% | 23.0% |
| 20 | 50.8% | 50.0% | 69.2% |
| 40 | 69.2% | 69.0% | 74.4% |
| 60 | 72.4% | 70.0% | 80.8% |
| 80 | 74.0% | 72.6% | 81.0% |
| 100 | 77.2% | 77.0% | 78.8% |
| Path | 4 MiB | 64 MiB | 256 MiB |
|---|---|---|---|
| NIC, one pair | 21.8 | 23.8 | 23.8 |
| NIC, one pair to a different GPU index | 21.5 | 23.6 | 23.7 |
| NVLink, 8-rank communicator, defaults | 45.6 | 51.4 | 51.4 |
| NVLink, node-local communicator | 73.3 | 121.4 | 124.3 |
| NVLink, 8-rank, 8 channels per net peer | 68.7 | 122.1 | 124.3 |
| NVLink, copy engine via CUDA IPC | 90.7 | 129.3 | 132.0 |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Length | Eager tok/s | Deferred tok/s | Ratio | Peak GiB | Note | |
|---|---|---|---|---|---|---|
| 512 | 1 | 10.8 | 16.5 | 1.53 | 6.2 | |
| 512 | 8 | 85.2 | 128.7 | 1.51 | 12.0 | |
| 512 | 32 | 269.1 | 402.8 | 1.50 | 31.9 | |
| 512 | 64 | 479.7 | 705.2 | 1.47 | 58.4 | |
| 2048 | 8 | 83.0 | 127.3 | 1.53 | 30.0 | |
| 2048 | 16 | 139.8 | 236.1 | – | 54.6 | different nodes |
| Length | Per-row sync | One sync/step | + CUDA graphs | Speedup | Bitwise | |
|---|---|---|---|---|---|---|
| 8 | 512 | 138 | 165 | 342 | 2.49 | yes |
| 64 | 512 | 888 | 894 | 1412 | 1.59 | yes |
| 24 | 2048 | 336 | 396 | 654 | 1.95 | yes |
| 12 | 4096 | 194 | 213 | 308 | 1.59 | yes |
| Path | Recompute | Train (s) | per sample (s) | GPU busy | Train peak (GiB) | Gradient norm | |
| 1 | per sequence | off | 62.8 | 0.98 | 84% | 44.8 | 3.44061 |
| 1 | batched | off | 54.1 | 0.85 | 73% | 40.4 | 3.44061 |
| 2 | batched | off | 35.4 | 0.55 | 92% | 51.2 | 3.43930 |
| 3 | batched | off | 36.2 | 0.57 | 96% | 64.4 | 3.43887 |
| 4 | batched | off | out of memory | ||||
| 8 | batched | off | out of memory | ||||
| Shape | Params | States/replica | Rollout weights | FSDP regather | Ring boundary | Ratio |
|---|---|---|---|---|---|---|
| , 48 layers | 10.9B | 76 GiB | 20 GiB | 174 GB | 0.54 GB | 324 |
| , 60 layers | 29.7B | 207 GiB | 55 GiB | 475 GB | 0.81 GB | 590 |
| , 80 layers | 69.3B | 484 GiB | 129 GiB | 1108 GB | 1.07 GB | 1032 |
| Run | Predictions | Met | Not met (predicted; measured) |
|---|---|---|---|
| Two-node calibration, 16 samples/rank | 6 | 5 | Update time on 8 GPUs at most that on 4; |
| Two-node admission and CUDA graphs | 9 | 8 | Peak memory at most 90 GB; 97,208 MiB |
| Two-node memory rerun | 8 | 7 | Reserved memory before training within 2 GiB of that before the rollout; 13.8–14.2 GiB once per rank |
| Allocator snapshots, one GPU | 4 | 4 | – |
| Point-to-point, first round | 10 | 6 | NCCL NVLink at least 90 GB/s; 52. NVLink over NIC – ; . Four-NIC split (unpipelined) at most the direct time; . 4 KiB half round trip at most 20 s (NVLink) and 40 s (NIC); 101 and 89 s |
| Point-to-point, second round | 8 | 5 | Single-process copy-engine slowness is host-side; it is not. Host time per call 10–60 s; 61. CUDA-graph ring at most 15 s per hop; 25 |
RL for Language Models
Reinforcement learning for language models uses feedback-driven policy updates to improve reasoning, alignment, and interactive behavior.
See all 438 papers