PocketRL: Reasoning-model training for $5 on one RTX 5090 – and the catch
The new open-source project PocketRL trains a 7B model with reinforcement learning on a single gaming GPU, using the method behind reasoning models like DeepSeek-R1. According to the authors, an AI research agent came up with the memory tricks that make it possible. We explain how to run it on your own tasks and check the numbers. It turns out the evidence is thinner than the headline suggests.

What's going on
Reasoning models like DeepSeek-R1 learn much of their step-by-step thinking through RLVR, short for Reinforcement Learning with Verifiable Rewards: the model solves lots of problems, a program automatically checks whether each answer is correct, and correct solution paths get reinforced. The catch is that it eats memory. During training, the weights, gradients, optimizer state and a copy for generating responses all have to sit in VRAM at the same time. For a 7B model, the authors say that adds up to 113 GiB – more than an H100 has.
PocketRL by Stephen Chung and Wenyu Du (DualverseAI) promises a way out. The project is licensed under Apache 2.0, and the paper came out on November 27. It claims full RL training of a 7B model on a single RTX 5090 in 7.3 hours for $4.71, and Qwen3.8-27B on four cards for around $23.50. The authors do this without LoRA and without CPU offloading, i.e. moving data to slower system RAM. We looked at how it works, how to run it yourself and how solid the results are.
The two memory tricks
ActGRA targets the Adam optimizer. Adam keeps two running averages for every weight, which alone costs 56.7 GiB at 7B. A layer's gradients are closely tied to that layer's inputs, the so-called activations. These activations mostly move in a small number of directions. ActGRA uses QR decomposition (a standard linear algebra technique) to find 128 of these principal directions and refreshes them every 8 updates. Adam then only computes in the small projected space, and the result is mapped back onto the full weight matrix. Think of it this way: instead of monitoring every street in a city, you only watch the 128 main arteries. This brings optimizer memory down to 0.6 GiB.
Gradient projection isn't a new idea. GaLore already trained a 7B model on a 24 GB card in 2024, using directions derived from the gradient itself. The more recent LoGRA uses random projections. What's new in ActGRA is the basis derived from activations. According to the paper, it preserves 45.5 percent of the gradient at rank 128, versus just 7.3 percent with LoGRA's random projection. Swap the ActGRA basis for a random one, and MATH-500 drops from 68.2 to 55.4 percent in the ablation.
The rounding residual is the second trick. Normally you keep a 32-bit master copy alongside the 16-bit (BF16) weights, because tiny updates would otherwise simply get rounded away in BF16. Instead, PocketRL stores 4 bits per weight that record what was lost in rounding. That way, small updates still add up. The idea is reminiscent of Kahan summation, which Zamirai et al. already studied for pure BF16 training in 2020. And because training and response generation share the same weights, the second copy for inference goes away. Without the residual, MATH-500 drops from 69.05 to 60.9 percent according to the ablation.
| Memory for Qwen2.5-Math-7B | Standard | PocketRL |
|---|---|---|
| Inference weights (16-bit) | 14.19 GiB | shared |
| Training weights (16-bit) | 14.19 GiB | 14.19 GiB |
| Master copy (32-bit) | 28.37 GiB | – |
| Rounding residual | – | 3.04 GiB |
| Optimizer state | 56.74 GiB | 0.61 GiB |
| Total | 113 GiB | 18 GiB |
The 18 GiB is only the persistent memory. On top of that come activations and the cache for generated responses. The paper gives peak usage as 22.5 GiB in one place and 21.5 GiB in another.
How to run your own training
You'll need Linux, Python 3.10+ and PyTorch 2.6+. For the RTX 5090, you need a PyTorch build for CUDA 12.8 or later. After git clone, pip install -e '.[math,vllm]' installs the package. For the 27B model, add the hybrid extra.
- Dataset: a JSONL file with one problem per line, e.g.
{"prompt": "What is 17 * 23?", "answer": "391"}. All fields exceptpromptare passed to the reward function. Hugging Face datasets can be specified ashf:owner/dataset:split. - Reward function: a Python function in
rewards.pythat receivesprompts,completionsand the extra fields and returns a number for each response. The README showsboxed_match, which compares the contents of\boxed{}with the answer. - Launch:
pocketrl train paper-1.5b --gpus 1 --data my_task.jsonl --reward rewards.py:boxed_match --output runs/my-task. Use--modelto pick a different model.--updates,--lrand--rankoverride the defaults (learning rate 1e-6, rank 128).--wandblogs rewards and response lengths, and--resumepicks up an interrupted run. - Evaluation:
pocketrl eval … --samples 8.
For each update, PocketRL samples 16 problems, generates 8 responses each with up to 3,000 tokens and computes a Dr. GRPO step from them. Dr. GRPO is a variant of GRPO: responses within a group are compared against each other, and the better ones get reinforced. That leads to a practical rule. If the starting model never earns a reward on your problems, every response in a group is equally bad and the model learns nothing. Your problems need to be within reach of what the model can already manage occasionally. One big catch on model choice: only Qwen2, Qwen2.5 and "Qwen3.5-style" hybrid models like Qwen3.8-27B are supported. Llama, Gemma and Mistral are missing.
PocketRL vs. Unsloth vs. TRL
| PocketRL | Unsloth GRPO | TRL GRPOTrainer | |
|---|---|---|---|
| What gets trained | all weights (update in a projected subspace) | LoRA/QLoRA (small adapter matrices) | full or LoRA/QLoRA via PEFT |
| Memory at 7B | 22.5 GiB peak (vendor figure) | QLoRA: roughly parameter count in GB, 16-bit LoRA at least 4× that (rule of thumb from the docs) | full: not easily on a 5090, according to PocketRL |
| Models | Qwen2/2.5, Qwen3.5-style | many families | any HF model |
| Reward | Python function → list of numbers | Python functions, combinable | functions, reward models, weighted, async |
| Loss function | Dr. GRPO | incl. grpo, dr_grpo, gspo | default dapo, incl. dr_grpo, sapo |
| Maturity | a few days old | established | established |
By PocketRL's own measurements, 100 RL steps on the 7B model on RTX 5090 cards cost $1.40 with PocketRL, versus $6.42 with Oat, $7.58 with OpenRLHF, $12.45 with verl and $15.67 with TRL. Unsloth is missing from this comparison. That matters, because according to the Unsloth docs, QLoRA already runs models up to about 17B on 15 GB of VRAM. Unsloth also shares weights with vLLM. The real difference is the type of training: PocketRL updates all weights, LoRA only small adapter matrices bolted on top. At 1.5B, LoRA matched ActGRA in the paper at 68.8 percent. At 7B, LoRA ran out of memory on the 5090, so the authors left it out. In other words, the paper doesn't show that full training is meaningfully better than LoRA on these tasks at all.
Running the numbers: What "$4.71" really means
The authors assume $0.645 per GPU hour. That's the average of offers from Vast.ai, RunPod Community, AutoDL and Lambda on November 25. Storage, idle time, evaluation and failed runs aren't included. Our recalculation with current prices:
| RTX 5090 hourly price | 7B (7.3 GPU-h) | 27B (36.4 GPU-h) |
|---|---|---|
| Paper average $0.645 | $4.71 | $23.48 |
| Runpod Community $0.69 | $5.04 | $25.12 |
| Vast.ai median $0.76 (per Thunder Compute, Dec. 1) | $5.55 | $27.66 |
| Runpod Secure $1.39 | $10.15 | $50.60 |
So the ballpark holds up. One detail stands out, though: 100 steps cost $1.40 in the benchmark, which would put 500 steps at around $7 rather than $4.71. The paper itself offers a plausible explanation. Over the course of training, responses get much shorter, from around 1,100 to about 650 tokens, which makes later steps cheaper. The authors haven't confirmed this explanation. If you want to buy your own card, Thunder Compute currently puts an RTX 5090 at $6,499 to $11,849, against a launch price of $1,999.
The catch: Math, Qwen and an agent as inventor
Testing covered only six math benchmarks and a single model family. The authors acknowledge this as a limitation themselves. And Qwen2.5-Math, of all models, is a tricky test case. In the "Spurious Rewards" study, even a random reward lifted the 7B model by 21.4 points on MATH-500; correct rewards added 29.1. The authors of that study therefore urge:
"Proposed RLVR reward signals should be tested on diverse models!"
Another paper suspects that test problems leaked into Qwen2.5's training data. Given 40 percent of a MATH-500 problem, the model completed the rest verbatim in 54.6 percent of cases. Then there's the baseline: the 7B base model scores 30.2 percent at temperature 1, but 50.0 with greedy decoding (always picking the most likely token), according to the paper. So the jump to 79.9 percent looks bigger than it is. The only fair comparison is against other RL models trained from the same base. There, PocketRL-7B averages 43.0, just above the mean of 42.1, but behind Oat-Zero (45.0) and ExGRPO (45.2). At 1.5B, it scores 32.9, behind Oat-Zero (35.9). The cost advantage is still substantial.
The 27B result is more telling, with the average rising from 47.9 to 64.7 points, and AIME 2025 going from 25.4 to 44.3. But there's a caveat here too. Qwen3.8-27B is a fully post-trained reasoning model that, according to its Model Card, can produce chains of thought of up to 262,144 tokens. PocketRL caps responses at 3,000 tokens in both training and testing and reports no truncation rates. Our take: A good chunk of the gain could come from the model learning to think more concisely instead of getting cut off mid-thought. That's genuinely useful, but it doesn't necessarily mean a smarter model.
Finally, according to the "AI Use" section, both methods came from an autonomous agent on the rStation platform. It was given a single goal: train a 7B model on a 5090 to competitive accuracy. According to the fresh paper "The Placebo Improvement", exactly this kind of goal-driven assignment tempts agents into fake successes. For Claude Opus 4.5, the rate of false success reports rose from 16 to 96 percent when an improvement target and a yes/no verdict were required. In the project's defense: humans re-checked the results with three seeds and additional model sizes. And the memory savings are measurable and don't depend on random variance. Shakier is the claim that ActGRA actually learns better than full training (7B: 43.0 vs. 40.1). The paper doesn't explain that effect convincingly.
The bigger picture
PocketRL is interesting if you want to try full-weight RL training instead of LoRA on affordable hardware, and for researchers who need lots of cheap runs. The memory math is transparent and well broken down, and the cost claim holds up to our ballpark check. There are no independent replications yet. The "Show HN" post got zero comments, and the repo has a single issue asking for the evaluations to be verified.
Our take: The technique is plausible and well documented. But the project hasn't shown that it learns just as well beyond Qwen and math. If you use it, run two sanity checks: train the same task once with a random reward and once with LoRA in Unsloth or TRL. Only if PocketRL beats both is $4.71 a real bargain.
Sources
- GitHub: dualverse-ai/pocketrl github.com
- PocketRL README (raw) raw.githubusercontent.com
- arXiv: PocketRL (2611.37942) arxiv.org
- arXiv HTML: PocketRL-Paper arxiv.org
- PocketRL-Projektseite dualverse-ai.github.io
- Hugging Face: stephenchungmh/pocketrl huggingface.co
- arXiv: The Placebo Improvement (2612.02507) arxiv.org
- arXiv: Spurious Rewards (2506.10947) arxiv.org
- arXiv: Reasoning or Memorization? (2507.10532) arxiv.org
- arXiv: LoGRA (2610.06647) arxiv.org
- arXiv: GaLore (2403.03507) arxiv.org
- arXiv: Revisiting BFloat16 Training (2010.06192) arxiv.org
- Unsloth-Doku: Reasoning – GRPO & RL unsloth.ai
- Unsloth-Doku: Memory Efficient RL unsloth.ai
- Hugging Face TRL: GRPO Trainer huggingface.co
- Hugging Face: Qwen/Qwen3.8-27B huggingface.co
- Runpod Pricing runpod.io
- Thunder Compute: RTX 5090 Rent vs Buy thundercompute.com
- GitHub-Issues: dualverse-ai/pocketrl github.com
Ask the AI assistant
Questions about this article, installation or background? Our assistant knows this page and runs on our own machine, not in someone else's cloud.
The Assistant is an AI (Gemma 4) and can make mistakes – please check important details against the source. Questions are used only to generate an answer and are deleted after one hour. Please don't enter any personal data.
Comments
What do you think? Already tried it? Write it here, no sign-up needed.
Comments are public. Links aren't allowed, and we delete abusive posts. You can delete your own comment at any time in this browser. Learn more in the Privacy Policy.