需先按 PyTorch 官网安装匹配的 CUDA 版 PyTorch,再装 miniverl;训练、Hydra、量化依赖需通过 extras 单独安装;示例默认用 Qwen3-0.6B,需自行准备模型权重。
mini-verl
DaoyuanLi2816Apache-2.0活跃维护在单张消费级显卡上跑 PPO、GRPO 和同策略蒸馏的轻量 RL 训练框架,让普通玩家也能做 LLM 对齐后训练。
verl for a single consumer GPU. PPO, GRPO and on-policy distillation on NVIDIA GPUs.
python -m pip install "miniverl[train,hydra]"
miniverl run --example hydra-ppo --bind reward.provider=target_length --run-id local-ppo单张 NVIDIA 消费级 GPU,README 以 RTX 4080 实测:Qwen3-0.6B/1.7B 在线蒸馏峰值显存 3.1914 GiB,SmolLM2-360M/1.7B 为 1.4961 GiB;模型能否装下取决于显存与负载。
在单张消费级 NVIDIA GPU 上跑 PPO、GRPO 和在线蒸馏的 verl 精简版
在单张消费级显卡上跑 PPO、GRPO 和同策略蒸馏的轻量 RL 训练框架,让普通玩家也能做 LLM 对齐后训练。
核心能力
- 复用 verl 配置字段与 Hydra overrides 映射到本地执行
- Actor、critic、reference、reward、teacher 分阶段共享同一张 GPU
- 从 checkpoint 精确恢复模型、优化器、数据位置与随机状态
- 导出 PEFT adapter、Parquet 数据集及运行配置与源码标识
- 支持 PPO、GRPO、在线蒸馏,另有 SFT、DPO、离线 KD 原生配方
容易踩的坑
- v0.16.0miniVERL v0.16.0最新正式版2026-09-12 · 2026-09-12 07:30 UTC
What's Changed
- chore: synchronize v0.15.0 publication and 0.15.1.dev0 by @DaoyuanLi2816 in https://github.com/DaoyuanLi2816/mini-verl/pull/122
- v0.16.0: native verl Hydra input and deterministic sampling by @DaoyuanLi2816 in https://github.com/DaoyuanLi2816/mini-verl/pull/123
Full Changelog: https://github.com/DaoyuanLi2816/mini-verl/compare/v0.15.0...v0.16.0
- v0.15.0miniVERL v0.15.02026-09-10 · 2026-09-10 07:16 UTC
查看更新说明
What's Changed
- Synchronize v0.14.0 publication and begin 0.14.1 development by @DaoyuanLi2816 in https://github.com/DaoyuanLi2816/mini-verl/pull/119
- v0.15.0: run resolved verl configs directly on one GPU by @DaoyuanLi2816 in https://github.com/DaoyuanLi2816/mini-verl/pull/120
- Include v0.15 direct-workflow evidence in release assets by @DaoyuanLi2816 in https://github.com/DaoyuanLi2816/mini-verl/pull/121
Full Changelog: https://github.com/DaoyuanLi2816/mini-verl/compare/v0.14.0...v0.15.0
- v0.14.0miniVERL v0.14.02026-09-09 · 2026-09-09 08:34 UTC
查看更新说明
What's Changed
- Advance development after v0.13.0 release by @DaoyuanLi2816 in https://github.com/DaoyuanLi2816/mini-verl/pull/117
- Productize local PPO and GRPO workflows for v0.14.0 by @DaoyuanLi2816 in https://github.com/DaoyuanLi2816/mini-verl/pull/118
Full Changelog: https://github.com/DaoyuanLi2816/mini-verl/compare/v0.13.0...v0.14.0
- v0.13.0miniVERL v0.13.02026-09-08 · 2026-09-08 13:28 UTC
查看更新说明
What's Changed
- Advance development after v0.12.0 release by @DaoyuanLi2816 in https://github.com/DaoyuanLi2816/mini-verl/pull/114
- Release v0.13.0: executable single-GPU PPO by @DaoyuanLi2816 in https://github.com/DaoyuanLi2816/mini-verl/pull/115
- Fix v0.13 qualification release assets by @DaoyuanLi2816 in https://github.com/DaoyuanLi2816/mini-verl/pull/116
Full Changelog: https://github.com/DaoyuanLi2816/mini-verl/compare/v0.12.0...v0.13.0
- v0.12.0miniVERL v0.12.02026-09-08 · 2026-09-08 07:27 UTC
查看更新说明
What's Changed
- Advance development to 0.11.1.dev0 by @DaoyuanLi2816 in https://github.com/DaoyuanLi2816/mini-verl/pull/104
- Release v0.12.0: single-GPU verl v0.9 RL by @DaoyuanLi2816 in https://github.com/DaoyuanLi2816/mini-verl/pull/111
- Fix target-length qualification metadata by @DaoyuanLi2816 in https://github.com/DaoyuanLi2816/mini-verl/pull/112
- Finalize v0.12 release gate records by @DaoyuanLi2816 in https://github.com/DaoyuanLi2816/mini-verl/pull/113
Full Changelog: https://github.com/DaoyuanLi2816/mini-verl/compare/v0.11.0...v0.12.0
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
verl for a single consumer GPU.
Run PPO, GRPO and on-policy distillation on one NVIDIA GPU. Bring your verl configs, train locally, pick up interrupted runs and export your models.
PyPI v0.16.0 is stable; main is development.
Your first local experiment
Install the matching CUDA-enabled build using the PyTorch installer, then:
python -m pip install "miniverl[train,hydra]"
miniverl data sample --reward-profile target-length --rows 8 --out data/rl-prompts.parquet
miniverl run --example hydra-ppo --bind reward.provider=target_length --dry-run
miniverl run --example hydra-ppo --bind reward.provider=target_length --run-id local-ppo
This Qwen3-0.6B example trains with a simple length reward. Inspect it in
rewards.jsonl, or follow the five-minute workflow
to use GRPO, resume training and export an adapter.
Already have a verl experiment? Bring its config tree and Hydra overrides:
miniverl run --verl-config-path /path/to/verl/trainer/config \
--verl-config-name ppo_trainer --dry-run \
algorithm.adv_estimator=grpo actor_rollout_ref.rollout.n=8 trainer.n_gpus_per_node=8
The direct-config guide walks through binding your data and reward function. The single-GPU guide helps you choose a model and memory settings. Install extras add training, Hydra or quantization dependencies; choose the CUDA PyTorch build separately.
Choose your path
| You want to… | Start here | Take away |
|---|---|---|
| Train with rewards | PPO / GRPO walkthrough | A trained adapter, reward logs and resumable checkpoints |
| Distill a teacher | OPD quickstart | A student trained on its own rollouts with teacher feedback |
| Move to a larger setup | Export and hand off | PEFT, Parquet and config files, plus a report of remaining setup |
SFT, DPO and offline KD are also available through native recipes. Hardware planning helps fit a workload to your GPU.
What a run gives you
- Familiar configs. Reuse verl fields and overrides; inspect how each maps to local execution.
- Visible training. Follow rollouts, rewards, losses and teacher targets.
- Exact recovery. Resume model, optimizer, data position and random state from a checkpoint.
- Reusable outputs. Export adapters, datasets and the configuration and source identities behind the run.
How it works
Actor, critic, reference, reward and teacher roles share the GPU in phases. PPO trains an actor and a separate critic; GRPO uses grouped rewards; OPD learns from teacher targets on the student's current rollouts.
Measured results
On an RTX 4080, the Qwen3-0.6B/1.7B OPD workload completed eight updates over 32 distinct prompts at 3.1914 GiB peak reserved VRAM. An interruption after update four reproduced byte-identical trajectories, adapter and optimizer tensors on resume. The SmolLM2-360M/1.7B workload used 1.4961 GiB. Workload and measurements · 24-cell rollout-backend study.
For task outcomes, read the calculator study, RecoveryBench, Alignment Lab and External Alignment Gate. These include negative and mixed results, with their original data and scope.
About and compatibility
miniVERL is an independent Apache-2.0 project for single-GPU NVIDIA CUDA training. It supports documented verl configuration profiles; model fit depends on GPU memory and workload. See the compatibility matrix for supported upstream versions and semantics, and limitations for hardware coverage, scientific scope and the distributed-execution boundary.
Development
git clone https://github.com/DaoyuanLi2816/mini-verl.git
cd mini-verl
python -m pip install -e ".[dev,train]"
pytest -q -m "not gpu and not network"
Contributing · Changelog · Citation · Security · License