Run this model with HF Jobs
Run stephenchungmh/pocketrl on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/stephenchungmh/pocketrl. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/stephenchungmh/pocketrl on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/stephenchungmh/pocketrl. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/stephenchungmh/pocketrl. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use stephenchungmh/pocketrl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stephenchungmh/pocketrl with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="stephenchungmh/pocketrl")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("stephenchungmh/pocketrl", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use stephenchungmh/pocketrl with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "stephenchungmh/pocketrl" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stephenchungmh/pocketrl", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/stephenchungmh/pocketrl
- SGLang
How to use stephenchungmh/pocketrl with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "stephenchungmh/pocketrl" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stephenchungmh/pocketrl", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "stephenchungmh/pocketrl" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stephenchungmh/pocketrl", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use stephenchungmh/pocketrl with Docker Model Runner:
docker model run hf.co/stephenchungmh/pocketrl
PocketRL models
These are the models trained with reinforcement learning from verifiable rewards (RLVR) in the PocketRL paper. PocketRL is a memory-efficient, low-cost RLVR code base. It trains a 7B model on one RTX 5090 in 7.3 hours for $4.71, less than 9% of the training cost of similar released models.
Code Β· Project page Β· Paper PDF
PocketRL's core methods were found by an autonomous research agent on rStation, then selected and verified by human researchers, as part of DualverseAI's Autonomous Research Program.
Models
Each model is in its own folder of this repository.
| Model | Base model | Updates | Seed | GPUs used | MATH-500 | Six-set avg. |
|---|---|---|---|---|---|---|
| PocketRL-1.5B | Qwen2.5-Math-1.5B | 700 | 7 | 1Γ RTX 5090 | 70.7 | 33.2 |
| PocketRL-7B | Qwen2.5-Math-7B | 500 | 101 | 1Γ RTX 5090 | 78.8 | 43.4 |
| PocketRL-27B | Qwen3.8-27B | 100 | 42 | 4Γ RTX 5090 | 95.0 | 65.3 |
Accuracy is avg@8 (%) at temperature 1. The six math test sets are MATH-500, AIME 2024, AIME 2025, AMC 2023, Minerva Math and OlympiadBench. The table gives scores for the released seed; the paper reports the mean over three seeds.
Results
Three-seed mean avg@8 accuracy (%) at temperature 1.
| Model | MATH-500 | AIME 2024 | AIME 2025 | AMC 2023 | Minerva | Olympiad | Average | Est. cost |
|---|---|---|---|---|---|---|---|---|
| Qwen2.5-Math-1.5B | 21.9 | 2.5 | 1.7 | 16.3 | 5.4 | 12.6 | 10.0 | β |
| PocketRL-1.5B | 70.0 | 10.8 | 8.5 | 47.5 | 27.1 | 33.8 | 32.9 | $5.31 |
| Mean of released 1.5B models | 69.0 | 14.8 | 9.0 | 45.9 | 27.6 | 32.6 | 33.2 | $394 |
| Qwen2.5-Math-7B | 30.2 | 10.8 | 2.5 | 20.0 | 7.2 | 9.5 | 13.4 | β |
| PocketRL-7B | 79.9 | 23.9 | 12.5 | 63.2 | 36.4 | 42.0 | 43.0 | $4.71 |
| Mean of released 7B models | 77.7 | 24.0 | 12.1 | 62.0 | 36.0 | 40.5 | 42.1 | $598 |
| Qwen3.8-27B | 80.8 | 25.8 | 25.4 | 66.6 | 41.2 | 47.4 | 47.9 | β |
| PocketRL-27B | 94.3 | 51.1 | 44.3 | 86.4 | 49.8 | 62.5 | 64.7 | $23.53 |
The released 1.5B models are Oat-Zero and ExGRPO. The released 7B models are RePO-Zero, Oat-Zero, SimpleRL-Zoo, PRIME-Zero, ExGRPO and GPG-Zero. All were scored with the same test sets and grader. Per-model results are in the code repository.
Training
Each update samples 16 questions from the MATH training set (levels 3 to 5, 8,552 problems), draws eight answers per question of up to 3,000 tokens at temperature 1, grades them with the Dr. GRPO boxed-answer grader, and applies one Dr. GRPO update with learning rate 1e-6.
PocketRL removes the two largest memory costs of standard RLVR:
- ActGRA projects each layer's gradient onto a rank-128 basis fitted to the layer's input activations with a QR factorization, refreshed every eight updates. Adam state is kept only for the small projected gradient. At 7B, optimizer memory drops from 56.7 GiB to 0.6 GiB.
- 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) keeps the part of each update lost to BF16 rounding. Generation and training share the same weights.
Together they reduce persistent training memory at 7B from 113 GiB to 18 GiB.
| Model | GPUs | Training time | Est. cost | Peak GiB/GPU |
|---|---|---|---|---|
| PocketRL-1.5B | 1Γ RTX 5090 | 8.2 h | $5.31 | 15.8 |
| PocketRL-7B | 1Γ RTX 5090 | 7.3 h | $4.71 | 22.5 |
| PocketRL-27B | 4Γ RTX 5090 | 9.1 h | $23.53 | 31.1 |
To reproduce a model, see the Quickstart:
pip install -e '.[math,vllm]'
pocketrl train paper-7b --gpus 1 --seed 101 --output runs/7b-seed101
Usage
The 1.5B and 7B models were trained and evaluated with the Qwen-Math prompt:
from huggingface_hub import snapshot_download
from vllm import LLM, SamplingParams
path = snapshot_download("stephenchungmh/pocketrl", allow_patterns="PocketRL-7B/*")
llm = LLM(f"{path}/PocketRL-7B")
question = "What is the sum of the first 100 positive integers?"
prompt = (
"<|im_start|>system\nPlease reason step by step, and put your final answer within \\boxed{}.<|im_end|>\n"
f"<|im_start|>user\n{question}<|im_end|>\n<|im_start|>assistant\n"
)
output = llm.generate([prompt], SamplingParams(temperature=1.0, max_tokens=3000))
print(output[0].outputs[0].text)
The 27B model uses its chat template with thinking enabled:
from huggingface_hub import snapshot_download
from vllm import LLM, SamplingParams
path = snapshot_download("stephenchungmh/pocketrl", allow_patterns="PocketRL-27B/*")
llm = LLM(f"{path}/PocketRL-27B", tensor_parallel_size=4)
tokenizer = llm.get_tokenizer()
question = "What is the sum of the first 100 positive integers?"
messages = [{"role": "user", "content": question + "\nShow your reasoning and put the final answer inside \\boxed{}."}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=True)
output = llm.generate([prompt], SamplingParams(temperature=1.0, max_tokens=3000))
print(output[0].outputs[0].text)
You can also evaluate any downloaded model on the six test sets with the PocketRL command line:
pocketrl eval paper-7b --gpus 1 --checkpoint path/to/PocketRL-7B --samples 8 --output eval.jsonl
License
The models are released under the Apache License 2.0, the same license as their Qwen base models. The paper is released under CC BY 4.0.
Citation
@misc{chung2026pocketrl,
title = {PocketRL: Training a 7B Language Model with Reinforcement Learning on One RTX 5090},
author = {Chung, Stephen and Du, Wenyu},
year = {2026},
note = {DualverseAI}
}
Model tree for stephenchungmh/pocketrl
Dataset used to train stephenchungmh/pocketrl
Evaluation results
- avg@8 accuracy (T=1) on MATH-500self-reported70.700
- avg@8 accuracy (T=1) on MATH-500self-reported78.800
- avg@8 accuracy (T=1) on MATH-500self-reported95.000