A preprint published on arXiv this week introduces PocketRL, an open-source reinforcement learning codebase that trains a 7B language model on a single RTX 5090 and a 27B model on four of the same cards. The authors report an 84% reduction in persistent training memory, dropping the footprint from 113 GiB to 18 GiB, and claim a total training cost of $4.71 for the 7B run. The work targets the memory bottleneck that currently forces most RLVR (reinforcement learning with verifiable rewards) pipelines onto multi-GPU clusters or expensive cloud instances.
The memory savings come from two independent modifications to the standard training loop. The first tackles the optimizer state, which typically consumes several times the memory of the model weights when using Adam. The second eliminates the need for a separate 32-bit master weight copy by storing a tiny rounding remainder alongside 16-bit weights. Together, these changes allow the entire training state to fit on consumer hardware without CPU offloading.
Compressing the optimizer state
Standard RLVR training stores the full gradient matrix and two moment buffers for every parameter. To shrink this footprint, the authors propose ActGRA, a gradient compression method that projects each layer’s gradient onto a low-dimensional basis. The projection basis is not chosen at random; it is fitted to the layer’s input activations using a randomized range finder and QR factorization.
The rationale is straightforward. A weight gradient is a weighted sum of the layer’s input activations, meaning the gradient naturally concentrates in the same directions as the activations. By stacking sampled token activations into a matrix and applying a random Gaussian mixing followed by QR decomposition, the method extracts an orthonormal basis that captures the dominant activation directions. At a rank of 128, ActGRA retains 45% of the squared gradient norm, compared to just 7% for the random projections used in prior work like LoGRA.
The authors provide a theoretical bound showing that the retention ratio depends on how concentrated the activations are. If the activations vary mainly along a few directions, the QR factorization reliably captures them. Empirical measurements across 42 weight matrices show a 0.94 Pearson correlation between activation retention and gradient retention, confirming that fitting the basis to activations is a reliable proxy for capturing the gradient.
During the backward pass, the full gradient is never materialized. Instead, the projected activations are multiplied by the output gradients to compute the compressed coordinates directly. The Adam optimizer then updates the first and second moment buffers in this compressed space. A row-wise second moment buffer reduces memory further, and the update is lifted back to full dimensionality via the basis matrix before being applied to the weights. The basis is refitted every few updates to track activation drift, with the momentum buffer projected onto the new basis to maintain continuity.
Keeping small updates from vanishing
The second memory saving addresses the precision requirements of training. RLVR typically uses very small learning rates, which means optimizer updates can be smaller than the spacing between adjacent BF16 floating-point numbers. When this happens, rounding maps the updated weight back to its old value, and the update is lost. Standard mixed-precision training avoids this by keeping a 32-bit master copy of the weights, but that doubles the weight memory.
Illustrative image: Surprising_Media / Pixabay
PocketRL keeps the weights in BF16 for both training and inference, but adds a four-bit count per weight to track the rounding error. Each count represents one-sixteenth of the gap between adjacent BF16 numbers at that magnitude. When an update is applied, the system adds the stored remainder and the new update in FP32, rounds the sum back to BF16, and stores the new rounding difference as a signed four-bit integer using stochastic rounding. This allows sub-precision changes to accumulate across steps without requiring a full 32-bit master copy.
The remainder adds just 0.5 bytes per weight, or 3.04 GiB for a 7B model. Combined with the compressed optimizer state, the total persistent memory drops to 18 GiB. The same 16-bit weights are used directly for inference, eliminating the need to maintain a separate inference checkpoint.
Performance and scaling on consumer hardware
The authors evaluated PocketRL on Qwen2.5-Math-1.5B, Qwen2.5-Math-7B, and Qwen3.8-27B using Dr. GRPO as the base algorithm. Training was run on 8,552 level 3–5 mathematics problems, with evaluation across six test sets including MATH-500, AIME 2024, AIME 2025, AMC 2023, Minerva Math, and OlympiadBench.
On a single RTX 5090, PocketRL completes 100 RL updates for a 7B model in 1.8 hours at a cost of $1.40. The abstract reports a total run cost of $4.71, which is less than 9% of the cost of the next-cheapest comparable released model. The 7B model reaches a 43.0% average score across the six math test sets, matching the mean of 42.1% reported for other released 7B models trained from the same base. ActGRA consistently outperforms both dense training and LoGRA across the evaluation sets, with the authors attributing the gain to low-rank projection reducing overfitting to noise in sampled rewards.
The method also scales to larger models. A 27B model trained on four RTX 5090s completes 100 steps in 9.1 hours for $23.59, a 77% cost reduction compared to similar codebases running on H100s. The 27B model improves by 13.5 percentage points on MATH-500, moving from 80.85% to 94.3%.
Practical limits and next steps
The paper’s empirical evidence is confined to mathematics benchmarks and a single model family. The authors note that evaluating larger models or different domains would require more resources than were available. The cost projections are calculated from GPU rental quotes collected in late November 2026, and the authors explicitly state that these figures will fluctuate with market availability and pricing.
For practitioners, the immediate takeaway is that RLVR is no longer strictly gated by multi-GPU memory constraints for models up to 7B. The open-source release allows teams to prototype RLVR pipelines on consumer hardware, though the method requires careful tuning of the refit interval and learning rate to avoid accuracy degradation. The trade-off is clear: significant memory and cost savings are achieved by accepting a compressed gradient representation and a quantized weight update scheme, both of which are now available for direct integration into existing training stacks.
Sources
PNEUMETRON EDITORIAL
Pneumetron's pipeline pairs AI-assisted drafting with human editorial review before publishing — our goal is to make staying informed easier, not to replace real reporting.




