2026-12-01 17:08 UTC

PocketRL reports $4.71 RLVR training for a 7B model on one RTX 5090

state: seedheat: mediumuncertainty: mediumrelevance: highreinforcement-learning model-training consumer-gpuDualverseAI

What is this?

DualverseAI has released PocketRL, an Apache-2.0 codebase and paper for reinforcement learning with verifiable rewards (RLVR). The project says its ActGRA gradient compression and shared 16-bit weights with a rounding remainder reduce persistent training memory for a 7B model from 113 GiB to 18 GiB. Its reported run trains Qwen2.5-Math-7B for 500 updates in 7.3 hours on one RTX 5090, with an estimated GPU cost of $4.71; a 27B run uses four RTX 5090s. The repository, paper, and model checkpoints are linked in the supplied sources. The performance, memory, and cost comparisons are the authors’ reported results; independent validation or adoption evidence is not supplied.

Why it matters

If the reported results hold up, PocketRL could make RLVR fine-tuning more accessible to researchers and small teams with high-end consumer GPUs, rather than multi-GPU datacenter setups. The notable contribution is a training-stack efficiency improvement, not a new base model. Its evidence is a first-party release and reported experiments; generality beyond the tested math models and recipes remains uncertain.

Current assessment

New: DualverseAI’s PocketRL release provides code, a paper, and checkpoints for RLVR training, with instructions for reproducing its 1.5B, 7B, and 27B recipes and for supplying custom data and reward functions. The repository reports that ActGRA keeps optimizer state for a low-rank projection fitted to layer activations, while a small per-weight rounding remainder lets training and generation share 16-bit weights. For Qwen2.5-Math-7B, the authors report 22.5 GiB peak GPU memory, 7.3 hours and estimated $4.71 on one RTX 5090; their comparisons show competitive average scores across six math benchmarks, but PocketRL does not lead every individual benchmark. They also report a 27B Qwen3.8 run on four 5090s for $23.53. These are author-reported experiments and estimated costs, not independently confirmed results; no external replication or adoption evidence is included. The README notes that package runtime and memory can differ from paper runs because the paper used colocated vLLM generation and the package ships a native decoder. The claims concern specific math models, datasets, hardware and training settings, so broader task performance and reproducibility remain open. If replicated, the memory reduction could widen access to RL post-training and make more experimentation feasible on locally owned GPUs.

Measured heat

now 0 pts/hpeak 6 pts/hcomments 0/hpeers p14momentum: steady2 platformsage 123h
points/hour across evidence Β· reading as of 2026-12-02 03:25:53.643646+11:00 Β· deterministic, not a model opinion

How the heat travelled

11-26 13:00⭐ origin echo-reconstructedThe arXiv paper is the earliest linked primary artifact in the chain (submitted Nov. 27, 2026; the HN post cites it as β€œPaper”). It introduc
Stephen Chung and Wenyu Du on paper (echo) Β· attributed from hn.story.50700891
β€”
11-30 15:18first on hacker news Β· published Β· +98.3hShow HN: PocketRL – Train a 7B LLM with RL on one RTX 5090 for $4.71
stephenchung
β€”
11-30 15:18amplified on hacker news πŸ‘‘hn.story.50700891
stephenchung
peak 1 Β· 0 comments Β· 103% of case engagement
11-30 15:20our radar first saw it Β· +98.3hdiscovery anchor: hn.story.50700891β€”

Evidence (2) β€” ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnShow HN: PocketRL – Train a 7B LLM with RL on one RTX 5090 for $4.71
Retrieved article excerpt

Open article Β· Retrieved 2026-11-30T15:22:07.946011+00:00

# PocketRL

**Train LLMs with RLVR cheaply and efficiently.**

[Project page](https://dualverse-ai.github.io/pocketrl/)
[Paper on arXiv](https://arxiv.org/abs/2611.37942)
[Hugging Face models](https://huggingface.co/stephenchungmh/pocketrl)
[Quickstart](https://github.com/dualverse-ai/pocketrl#quickstart)

**πŸ€– [Discovered by an AI agent.](https://rstation.ai/problems/math_rlvr/papers/40/v1)** PocketRL's core methods were found by an autonomous research agent on [rStation](https://rstation.ai/), then selected and verified by human researchers, as part of DualverseAI's [**Autonomous Research Program**](https://dualverse.ai/auto_research).

PocketRL is a memory-efficient, low-cost RLVR code base. It trains a 7B model with RL on **one RTX 5090** in **7.3 hours for $4.71**, less than 9% of the training cost of similar models:

[MATH-500 accuracy against estimated training cost for PocketRL-7B and six released 7B RLVR models](https://github.com/dualverse-ai/pocketrl/blob/main/assets/figure-1.png)

## Highlights

- **7B RL on one RTX 5090, 27B RL on four RTX 5090s.** PocketRL saves ~84% of persistent training memory (113 GiB β†’ 18 GiB at 7B), allowing large-model training to fit on RTX 5090s.
- **Cheapest training with competitive performance among released models.** Training PocketRL-7B costs only $4.71, 91% less than the cheapest of similar models, while matching their performance. Training PocketRL-1.5B and PocketRL-27B costs only $5.31 and $23.53.
- **Cheapest per RL step among RLVR repos.** 100 RL steps cost $1.40 at 7B and $23.59 at 27B on RTX 5090s. The next cheapest repo costs 4.6Γ— and 4.4Γ— as much, respectively.
- **Fast on H100s too.** PocketRL is the fastest RLVR repo at 1.5B and 7B on H100s. At 27B it takes 4.3 hours per 100 steps on four H100s.

## Main Results

### Accuracy on six math benchmarks

Avg@8 accuracy (%) at temperature 1 on math test set.

| Model | MATH-500 | AIME 2024 | AIME 2025 | AMC 2023 | Minerva | Olympiad | **Average** | Est. cost |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| **Qwen2.5-Math-1.5B** | | | | | | | | |
| Base model | 21.9 | 2.5 | 1.7 | 16.3 | 5.4 | 12.6 | 10.0 | – |
| **PocketRL** | 70.0 | 10.8 | 8.5 | 47.5 | 27.1 | 33.8 | 32.9 | $5.31 |
| *Released 1.5B models* | | | | | | | | |
| Oat-Zero (8Γ— A100) | 71.3 | 19.2 | 7.1 | 53.4 | 29.9 | 34.3 | 35.9 | $99 |
| ExGRPO (8Γ— H100) | 66.8 | 10.4 | 10.8 | 38.4 | 25.3 | 30.9 | 30.4 | $689 |
| Mean of released | 69.0 | 14.8 | 9.0 | 45.9 | 27.6 | 32.6 | 33.2 | $394 |
| **Qwen2.5-Math-7B** | | | | | | | | |
| Base model | 30.2 | 10.8 | 2.5 | 20.0 | 7.2 | 9.5 | 13.4 | – |
| **PocketRL** | 79.9 | 23.9 | 12.5 | 63.2 | 36.4 | 42.0 | 43.0 | $4.71 |
| *Released 7B models* | | | | | | | | |
| RePO-Zero (4Γ— A100) | 74.1 | 16.7 | 9.6 | 59.7 | 33.0 | 36.9 | 38.3 | $54 |
| Oat-Zero (8Γ— A100) | 79.4 | 35.4 | 11.2 | 65.6 | 36.4 | 42.1 | 45.0 | $112 |
| SimpleRL-Zoo (16Γ— H100) | 76.3 | 24.2 | 11.2 | 61.2 | 34.8 | 38.9 | 41.1 | $788 |
| PRIME-Zero (8Γ— A100) | 80.8 | 18.3 | 15.0 | 59.4 | 40.1 | 41.3 | 42.5 | $1,077 |
| ExGRPO (8Γ— H100) | 82.7 | 25.8 | 15.0 | 63.1 | 38.1 | 46.3 | 45.2 | $944 |
| GPG-Zero (4Γ— A100) | 72.9 | 23.8 | 10.4 | 63.1 | 33.8 | 37.7 | 40.3 | $613 |
| Mean of released | 77.7 | 24.0 | 12.1 | 62.0 | 36.0 | 40.5 | 42.1 | $598 |
| **Qwen3.8-27B** | | | | | | | | |
| Base model | 80.8 | 25.8 | 25.4 | 66.6 | 41.2 | 47.4 | 47.9 | – |
| **PocketRL** | 94.3 | 51.1 | 44.3 | 86.4 | 49.8 | 62.5 | 64.7 | $23.53 |

### PocketRL performance across gradient compression methods

PocketRL also trains with three gradient compression methods: Dense, LoGRA, and ActGRA. ActGRA, the method we propose, is the default.

| Method | MATH-500 | Six-set avg. | GPUs | Train time | Est. cost | Peak GiB/GPU |
| --- | --- | --- | --- | --- | --- | --- |
| **Qwen2.5-Math-1.5B** | | | | | | |
| Base model | 21.9 | 10.0 | – | – | – | – |
| Dense | 64.5 | 30.3 | 1Γ— RTX 5090 | 10.1 h | $6.53 | 25.6 |
| LoGRA | 69.2 | 32.5 | 1Γ— RTX 5090 | 8.8 h | $5.66 | 27.4 |
| **ActGRA (default)** | **70.0** | **32.9** | 1Γ— RTX 5090 | **8.2 h** | **$5.31** | **15.8** |
| **Qwen2.5-Math-7B** | | | | | | |
| Base model | 30.2 | 13.4 | – | – | – | – |
| Dense | 76.1 | 40.1 | 2Γ— H100 | 7.8 h | $46.42 | 74.5 |
| LoGRA | 77.6 | 41.8 | 1Γ— RTX 5090 | 12.3 h | $7.93 | 31.3 |
| **ActGRA (default)** | **79.9** | **43.0** | 1Γ— RTX 5090 | **7.3 h** | **$4.71** | **22.5** |
| **Qwen3.8-27B** | | | | | | |
| Base model | 80.8 | 47.9 | – | – | – | – |
| **ActGRA (default)** | **94.3** | **64.7** | 4Γ— RTX 5090 | **9.1 h** | **$23.53** | **31.1** |

### Learning curves

[MATH-500 and six-set average accuracy over training for ActGRA, LoGRA and Dense at 1.5B and 7B](https://github.com/dualverse-ai/pocketrl/blob/main/assets/learning-curves.png)

> Avg@8 accuracy on MATH-500 and the six-set average during training, for Qwen2.5-Math-1.5B (top) and Qwen2.5-Math-7B (bottom).

### Cost and speed against public RLVR repos

We ran the same RL step in each RLVR repo: 16 prompts, eight sampled answers per prompt, up to 3,000 tokens per answer. Each repo uses the smallest number of GPUs, up to eight, that completes an update, with its own released settings. Time and cost are for 100 RL steps, estimated from timed updates.

[Cost of 100 RL steps for PocketRL, Oat, verl, OpenRLHF, LoGRA and TRL at 1.5B, 7B and 27B](https://github.com/dualverse-ai/pocketrl/blob/main/assets/cost-100-steps.png)

PocketRL is the only RLVR repo that trains 7B on one RTX 5090 and 27B on RTX 5090s at all, and it does both without CPU offloading. On one H100, it runs 100 steps at 7B in 1.8 hours, 61% less time than TRL (4.6 hours). Moving to RTX 5090s cuts its cost by a further 72% at 7B and 51% at 27B.

## Model checkpoints

The PocketRL models are on [Hugging Face](https://huggingface.co/stephenchungmh/pocketrl).

| Model | Base model | Updates | Seed | MATH-500 | Six-set avg. | Download |
| --- | --- | --- | --- | --- | --- | --- |
| PocketRL-1.5B | Qwen2.5-Math-1.5B | 700 | 7 | 70.7 | 33.2 | [PocketRL-1.5B](https://huggingface.co/stephenchungmh/pocketrl/tree/main/PocketRL-1.5B) |
| PocketRL-7B | Qwen2.5-Math-7B | 500 | 101 | 78.8 | 43.4 | [PocketRL-7B](https://huggingface.co/stephenchungmh/pocketrl/tree/main/PocketRL-7B) |
| PocketRL-27B | Qwen3.8-27B | 100 | 42 | 95.0 | 65.3 | [PocketRL-27B](https://huggingface.co/stephenchungmh/pocketrl/tree/main/PocketRL-27B) |

## How it works

[ActGRA gradient projection and the shared-weight PocketRL training loop](https://github.com/dualverse-ai/pocketrl/blob/main/assets/overview.png)

> (a) ActGRA projects each layer's gradient onto a basis Q fitted to its input activations, runs a row-wise Adam on the small projected gradient, and lifts the update back into the full weight matrix. (b) Generation and training share the same 16-bit weights. A small rounding remainder per weight keeps updates that are too small for 16-bit precision.

Standard RLVR spends most of its GPU memory on two things: the Adam optimizer state, and 32-bit master weights kept alongside a separate 16-bit copy for generation. PocketRL removes both.

1. **ActGRA** compresses the gradient. Each layer's gradient is a sum of outer products with its input activations, and those activations concentrate in a few directions. ActGRA fits a rank-128 basis to the activations with a QR factorization, refreshed every eight updates, and keeps the Adam state for the small projected gradient instead of the full weight matrix. Optimizer memory at 7B drops from 56.7 GiB to 0.6 GiB.
2. **16-bit weights with a rounding remainder** replace the 32-bit master copy. A packed 4-bit remainder per weight (8-bit at 1.5B) stores the part of each update lost to BF16 rounding, so small updates still accumulate. The same weights serve generation and training, so there is no second copy.

**Memory budget for RLVR on Qwen2.5-Math-7B**

|  | Standard training | PocketRL |
| --- | --- | --- |
| Inference weights (16-bit) | 14.19 GiB | shared |
| Training weights (16-bit) | 14.19 GiB | 14.19 GiB |
| Master weights (32-bit) | 28.37 GiB | – |
| Rounding remainder | – | 3.04 GiB |
| Optimizer state | 56.74 GiB | 0.61 GiB |
| **Total** | **113 GiB** | **18 GiB** |

## Quickstart

### Installation

PocketRL needs Linux, Python 3.10 or later and PyTorch 2.6 or later. On RTX 5090s, use a PyTorch build for CUDA 12.8 or newer.

```
git clone https://github.com/dualverse-ai/pocketrl.git
cd pocketrl
pip install -e '.[math,vllm]'      # math grader and vLLM evaluation
pip install -e '.[math,vllm,hybrid]'  # also needed for the 27B model
```

### Train your first model

The following needs a single RTX 5090 or H100. It trains Qwen2.5-Math-1.5B on the paper's MATH training set:

```
pocketrl train paper-1.5b --gpus 1
```

The first run downloads the model from Hugging Face and the paper's datasets: 8,552 MATH problems (levels 3 to 5) for training and six test sets for evaluation. Training runs 700 updates, which took 8.2 hours on one RTX 5090 in the paper, and saves a checkpoint to `runs/paper-1.5b` every 50 updates. Progress goes to `runs/paper-1.5b/metrics.jsonl`.

The same command trains the larger models in the paper:

| Recipe | Model | GPUs | Updates | Paper training time |
| --- | --- | --- | --- | --- |
| `paper-1.5b` | Qwen2.5-Math-1.5B | 1Γ— RTX 5090 or H100 | 700 | 8.2 h on RTX 5090 |
| `paper-7b` | Qwen2.5-Math-7B | 1Γ— RTX 5090 or H100 | 500 | 7.3 h on RTX 5090 |
| `paper-27b` | Qwen3.8-27B | 4Γ— RTX 5090 or H100 | 100 | 9.1 h on 4Γ— RTX 5090 |

```
pocketrl train paper-7b --gpus 1 --seed 42 --output runs/7b-seed42
CUDA_VISIBLE_DEVICES=0,1,2,3 pocketrl train paper-27b --gpus 4 --output runs/27b-seed42
```

Each update samples 16 training questions from MATH (levels 3 to 5), draws eight answers per question of up to 3,000 tokens at temperature 1, grades them, and applies one Dr. GRPO update with ActGRA at rank 128 and learning rate 1e-6. A checkpoint is saved every 50 updates. Rerun the same command with `--resume` to continue from the latest checkpoint. To use the datasets from a local directory instead, see the [data guide](https://github.com/dualverse-ai/pocketrl/blob/main/docs/data.md).

Evaluate a run on all six test sets with eight samples per question:

```
pocketrl eval paper-7b --gpus 1 --checkpoint runs/7b-seed42 --samples 8 --output runs/7b-seed42-eval.jsonl
```

The command prints the accuracy on each test set and their mean. Evaluation uses vLLM by default; `--backend native` uses PocketRL's built-in decoder instead.

### Change hyperparameters

Command-line flags override any recipe setting:

```
pocketrl train paper-7b --gpus 1 --lr 2e-6 --rank 256 --prompts-per-step 32 --samples 16 \
  --max-new-tokens 4096 --context-length 5120 --updates 300 --output runs/7b-custom
```

| Flag | Meaning | Paper value |
| --- | --- | --- |
| `--method` | Gradient method: `actgra`, `logra` or `dense` | `actgra` |
| `--lr` | Learning rate | 1e-6 |
| `--prompts-per-step` | Questions per update | 16 |
| `--samples` | Answers sampled per question | 8 |
| `--max-new-tokens` | Maximum answer length | 3,000 |
| `--context-length` | Prompt plus answer token limit | 4,096 |
| `--temperature` | Sampling temperature for rollouts | 1.0 |
| `--rank` | ActGRA basis rank | 128 |
| `--refresh` | Updates between basis refits | 8 |
| `--remainder-bits` | Rounding remainder bits, 4 or 8 | 4 (8 at 1.5B) |
| `--max-grad-norm` | Gradient norm clip | 1.0 |
| `--updates` | Run length | 700 / 500 / 100 (1.5B / 7B / 27B) |
| `--save-every` | Checkpoint interval | 50 |
| `--seed` | Seed | 42 |

For a reusable setup, copy a recipe such as [`pocketrl/recipes/paper-7b.yaml`](https://github.com/dualverse-ai/pocketrl/blob/main/pocketrl/recipes/paper-7b.yaml), edit it, and pass the file instead of the recipe name: `pocketrl train my-recipe.yaml --gpus 1`. Run `pocketrl train --help` for every option.

### Train other and larger models

`--model` accepts a Hugging Face model ID or a local directory. The trainer supports Qwen2 and Qwen2.5 models and
stephenchung10
🟧 echo.paper ⭐The arXiv paper is the earliest linked primary artifact in the chain (submitted Nov. 27, 2026; the HN post cites it as β€œPaper”). It introducStephen Chung and Wenyu Duβ€”β€”

Interpretation history

Decision trace