Back to articles

PocketRL Cuts the Memory Cost of Training a 7B Model on One RTX 5090

2 min read

Reinforcement learning with verifiable rewards (RLVR) can improve language models on tasks whose answers can be checked, but its training overhead is a practical barrier. Optimizer state, gradients and multiple weight copies can demand far more memory than inference alone. PocketRL is an open-source training codebase designed to reduce that burden, with the authors reporting that it can train a 7B model on a single RTX 5090 without CPU offloading.

Two ways to reduce memory

  • Fit the gradient representation to activations. PocketRL’s ActGRA constructs a small basis for each layer from that layer’s input activations, using QR factorization. Gradient updates and optimizer state are represented in this basis rather than stored at full size. At rank 128 on a 1.5B model, the paper reports that ActGRA retains 45.5% of the gradient, compared with 7.3% for the random-projection approach LoGRA. For the 7B setup, optimizer state falls from 56.74 GiB to 0.61 GiB.
  • Keep 16-bit weights, but track rounding residue. A half-byte per weight records the remainder introduced when updates are rounded. Training and generation can then share the same 16-bit weights, avoiding a separate 32-bit master-weight copy while helping small updates survive quantization.

Together, the techniques reduce reported 7B training memory from 113 GiB to 18 GiB, an 84% cut. The team says PocketRL-7B trained in 7.3 hours on one RTX 5090 for $4.71. It compares that figure with $54 to $1,077 for similar RL-trained models starting from the same base model, Qwen2.5-Math-7B. On six math benchmarks, PocketRL-7B averaged 43.0%, close to the 42.1% mean reported for six released 7B models. The 1.5B version averaged 32.9%, versus 33.2% for two released models.

Why it matters—and what remains to be tested

Lower memory requirements can make RLVR experiments accessible to teams with fewer accelerators, rather than only lowering the bill for large training runs. The authors also report scaling to a 27B model on four RTX 5090s, with per-step costs more than 77% below comparable codebases. Its MATH-500 score rose from 80.8% for the base model to 94.3% after training. These figures describe the paper’s experiments; results can depend on the task, implementation and hardware. A gradient-retention figure is not itself a guarantee of end-task quality, and independent reproduction will be important. The open-source release should make it possible to examine how well the memory savings and benchmark results transfer to other setups.

Source: Hugging Face Daily Papers

Comments

Checking sign-in status...

Loading comments...

Related articles