r/MachineLearning • u/progenitor414 • 1d ago
Research [R] PocketRL: Training a 7B Language Model with Reinforcement Learning on One RTX 5090
https://arxiv.org/abs/2611.37942Abstract:
It is now common to post-train large language models with reinforcement learning with verifiable rewards (RLVR), but its heavy memory use, and hence high cost, is an important bottleneck for RLVR research and a major expense in training frontier models. We introduce PocketRL, a low-cost, memory-efficient RLVR code base that trains a 7B model on a single RTX 5090 and a 27B model on only four, without CPU offloading. PocketRL combines two ideas. First, we project each layer's gradient and optimizer state onto a small basis fitted to the layer's input activations by a QR factorisation, which we call ActGRA, and show that such a basis retains far more of the gradient than the random projections used in prior work. Second, we propose training on 16-bit weights with half an extra byte per weight that carries the rounding error, which prevents small updates from being lost. The same 16-bit weights are used for inference, which saves further memory. Together, these methods reduce memory use for training a 7B model by 84%. This enables us to train a competitive 7B model in less than 8 hours on a single RTX 5090 for just $4.71, less than 9% of the cost of training comparable models. PocketRL also reduces the cost of a 27B training step by more than 77% compared with similar code bases. We open-source our PocketRL code base.
Project Page: https://dualverse-ai.github.io/pocketrl/
15
u/HungryhungryUgolino 1d ago
Big if true (?), not well read in actual training protocols for LLMs. Interested if anyone has tried this. Might get around to reading the article this weekend to see what implementing any of this actually entails.
6
u/ResidentPositive4122 21h ago
There's something wrong with the benchmark tables, q3.8-27b scores way higher on the aime problems. (~90%) And it doesn't come with any base model, so it's unlikely that ~100 steps reported would show any meaningful budge on those kinds of tasks (the model is benchmaxxed on math already). Any idea what happened there? How did you get the original scores?
Perhaps some context length limits?
3
u/Sufficient-Pen-3796 17h ago
So you let other agents work on problems and then preprint under your name?
1
u/impossiblefork 17h ago
This is of course a short and silly comment, but I wonder whether it'd work for pretraining too.
Because, why shouldn't it?
1
u/NaivelyBayesic 8h ago
Cool result, the cost number is kinda wild. The 3,000 token cap thing is worth flagging for anyone reading the tables though... if the 27B base model is blowing past the cap on AIME, then a chunk of the "gain" from RL is the model learning to finish inside the budget rather than getting better at math. Not a knock, that's a real thing to learn, but it's a different claim than the headline.
The question I'd have is how the low rank gradient projection holds up when the reward is sparse. On math the signal is dense enough, lots of groups have a pass. On longer horizon stuff where most groups have nothing passing, the gradient you do get is already small and you really don't want to lose any of it to a projection. The pretraining note in the thread (needs more precise, high rank signal) makes me think there's a spectrum here and it'd be good to know where agentic RL falls on it.
Also kinda interesting that the agents explored this one. Curious whether the ActGRA idea came from them or the humans set that direction?
-1
u/raviolli 1d ago
Budding. Matrix factorisation big news