verl README

The project's README from github.com/XiaomiMiMo/verl. As one markdown file: README.md.

XiaomiMiMo/verl

Agentic RL training code for MiMo. The detailed training recipe can be found in Section 7 of our report MiMo-V2.6: Scaling Reinforcement Learning Towards Self-Improvement.

This fork adds reproduction code for five RL environments upon verl (0.9.0.dev).

Domain Task Family Verifier Launch script Settings
Code Software engineering Executable tests scripts/code/train.sh scripts/code/env.example
Cyber Vulnerability reproduction Rule checks scripts/arvo/arvo.sh scripts/arvo/arvo.env.example
General Knowledge work Rubric-based judging scripts/general/general.sh scripts/general/general.env.example
Visual Web development Visual grading scripts/design/webdev.sh scripts/design/webdev.env.example
Music Symbolic music composition Rule checks scripts/design/music.sh scripts/design/music.env.example

Each launch script reads the variables listed in the *.env.example next to it; set those before launching.


The original verl README follows.


👋 Hi, everyone! verl is a RL training library initiated by ByteDance Seed team and maintained by the verl community.

Ask DeepWiki.com GitHub Repo stars Twitter Documentation

seed logo

verl: Volcano Engine Reinforcement Learning for LLMs

verl is a flexible, efficient and production-ready RL training library for large language models (LLMs).

verl is the open-source version of HybridFlow: A Flexible and Efficient RLHF Framework paper.

verl is flexible and easy to use with:

verl is fast with:

verl-arch.png

News

more...
  • [2025/04] [Seed-Thinking-v1.5](https://github.com/ByteDance-Seed/Seed-Thinking-v1.5/blob/main/seed-thinking-v1.5.pdf) tech report is released! Trained with verl, Seed-Thinking-v1.5 achieves 86.7 on AIME 2024, 55.0 on Codeforces and 77.3 on GPQA, demonstrating excellent reasoning abilities in STEM and coding. Beyond reasoning tasks, the method demonstrates notable generalization across diverse domains.
  • [2025/07] verl keynote at [AWS AI Hours Singapore](https://pages.awscloud.com/aws-ai-hours-sg.html#agenda) on 7/8, verl & verl-agent project updates at [Agent for SWE meetup](https://lu.ma/e498qhsi) by LF AI & Data Singapore on 7/11.
  • [2025/06] verl team will provide latest project updates at [PyTorch Day China](https://www.lfasiallc.com/pytorch-day-china/) on June 7th. Meet our dev team in Beijing!
  • [2025/04] [VAPO](https://arxiv.org/pdf/2504.05118) (value-based augmented PPO) paper covers our latest RL method for reasoning models. Trained from Qwen-32B-base model, VAPO achieves 60.4 on AIME 2024, outperforming DAPO-32B.
  • [2025/05] [PF-PPO](https://arxiv.org/abs/2409.06957), accepted to ICML 2025, is now supported in verl! PF-PPO enhances policy learning efficiency and robustness by filtering potentially noisy reward signals and reusing high-quality experiences via a replay buffer.
  • [2025/04] We will give a tutorial about latest post-training techniques and programming guide for verl at [ICLR 2025 Expo](https://iclr.cc/virtual/2025/calendar?filter_events=Expo+Talk+Panel&filter_rooms=), [SCI-FM workshop](https://open-foundation-model.github.io/) and [LMSys afterparty](https://lu.ma/d23nyynm). Talk materials available [here](https://github.com/eric-haibin-lin/verl-community/tree/main/iclr25).
  • [2025/03] verl v0.3.0.post1 is released! See [release note](https://github.com/verl-project/verl/releases/) for details. It achieves [~1.4x speedup](https://tongyx361.github.io/blogs/posts/verl-intro/#/verl-flexible-and-efficient-rl-for-llms) compared to prev versions.
  • [2025/05] verl will be presented at [A2M Shanghai](https://a2m.msup.com.cn/home/?aid=4488&city=shanghai) on 5/16 - 5/17.
  • [2025/05] verl will be presented at [GOSIM x PyTorch Day 2025](https://paris2025.gosim.org/). See you in Paris!
  • [2025/03] We introduced the programming model of verl at the [vLLM Beijing Meetup](https://mp.weixin.qq.com/s/n77GibL2corAtQHtVEAzfg) and [verl intro and updates](https://github.com/eric-haibin-lin/verl-community/blob/main/slides/verl-lmsys-meetup.pdf) at the [SGLang-LMSYS Org Meetup](https://lu.ma/ntjrr7ig) in Sunnyvale mid-March.
  • [2025/03] We will present verl(HybridFlow) at EuroSys 2025. See you in Rotterdam!
  • [2025/02] verl v0.2.0.post2 is released!
  • [2025/02] We presented verl in the Bytedance/NVIDIA/Anyscale Ray Meetup. See you in San Jose!
  • [2025/01] [Doubao-1.5-pro](https://team.doubao.com/zh/special/doubao_1_5_pro) is released with SOTA-level performance on LLM & VLM. The RL scaling preview model is trained using verl, reaching OpenAI O1-level performance on math benchmarks (70.0 pass@1 on AIME).
  • [2024/12] verl is presented at Ray Forward 2024. Slides available here
  • [2024/12] The team presented Post-training LLMs: From Algorithms to Infrastructure at NeurIPS 2024. Slides and video available.
  • [2024/10] verl is presented at Ray Summit. Youtube video available.
  • [2024/08] HybridFlow (verl) is accepted to EuroSys 2025.

Key Features

Getting Started

Documentation

Quickstart:

Running a PPO example step-by-step:

Reproducible algorithm baselines:

Algorithm recipes (recipe/):

For code explanation and advance usage (extension):

Blogs from the community

Performance Tuning Guide

The performance is essential for on-policy RL algorithm. We have written a detailed performance tuning guide to help you optimize performance.

Upgrade to vLLM >= v0.8.2

verl now supports vLLM>=0.8.2 when using FSDP as the training backend. Please refer to this document for the installation guide and more information. Please avoid vllm 0.7.x, which contains bugs that may lead to OOMs and unexpected errors.

Use Latest SGLang

SGLang is fully supported with verl, and SGLang RL Group is working extensively on building unique features, including multi-turn agentic RL, VLM RLHF, server-based RL, and partial rollout. Please refer to this document for the installation guide and more information.

Upgrade to FSDP2

verl is fully embracing FSDP2! FSDP2 is recommended by torch distributed team, providing better throughput and memory usage, and is composible with other features (e.g. torch.compile). To enable FSDP2, simply use verl main and set the following options:

actor_rollout_ref.ref.strategy=fsdp2
actor_rollout_ref.actor.strategy=fsdp2
critic.strategy=fsdp2

Furthermore, FSDP2 cpu offloading is compatible with gradient accumulation. You can turn it on to save memory with actor_rollout_ref.actor.fsdp_config.offload_policy=True. For more details, see https://github.com/verl-project/verl/pull/1026

AMD Support (ROCm Kernel)

verl runs on AMD ROCm GPUs (MI300X / MI325X / MI355X) with FSDP, FSDP2, and Megatron trainer backends, and vLLM as the validated inference engine (SGLang support is in progress). See the AMD ROCm quick-start guide for container bring-up, environment verification, and training examples.

Citation and acknowledgement

If you find the project helpful, please cite:

@article{sheng2024hybridflow,
  title   = {HybridFlow: A Flexible and Efficient RLHF Framework},
  author  = {Guangming Sheng and Chi Zhang and Zilingfeng Ye and Xibin Wu and Wang Zhang and Ru Zhang and Yanghua Peng and Haibin Lin and Chuan Wu},
  year    = {2024},
  journal = {arXiv preprint arXiv: 2409.19256}
}

verl is inspired by the design of Nemo-Aligner, Deepspeed-chat and OpenRLHF. The project is adopted and contributed by Bytedance, Anyscale, LMSys.org, Alibaba Qwen team, Shanghai AI Lab, Tsinghua University, UC Berkeley, UCLA, UIUC, University of Hong Kong, ke.com, All Hands AI, ModelBest, JD AI Lab, Microsoft Research, StepFun, Amazon, LinkedIn, Meituan, Camel-AI, OpenManus, Xiaomi, NVIDIA research, Baichuan, RedNote, SwissAI, Moonshot AI (Kimi), Baidu, Snowflake, Skywork.ai, JetBrains, IceSword Lab, and many more.

Awesome Projects Built with verl

Welcome to register your awesome project build with verl for other developers' reference!

Contribution Guide

See contributions guide

About ByteDance Seed Team

Founded in 2023, ByteDance Seed Team is dedicated to crafting the industry's most advanced AI foundation models. The team aspires to become a world-class research team and make significant contributions to the advancement of science and society. You can get to know Bytedance Seed better through the following channels👇

We are HIRING! Send us an email if you are interested in internship/FTE opportunities in RL for agents.

verl (XiaomiMiMo/verl)

Searching Database…

725 ·GitHub
这是什么?verl 是一个面向大语言模型的开源强化学习后训练框架,由字节跳动 Seed 发起,是 HybridFlow 论文的开源版本。这个 XiaomiMiMo 分叉在其基础上增加了针对 MiMo 的智能体强化学习训练代码,并在 verl 0.9.0.dev 之上提供了五个强化学习环境的复现代码。
它是一个通用的强化学习框架,还是专门用来训练 MiMo 模型的一次性方案?两者都有:verl 本身是一个通用的强化学习训练库,几行代码就能搭建出 GRPO 或 PPO 这类数据流,并可接入 FSDP、Megatron-LM、vLLM 或 SGLang。这个分叉在其之上叠加了 MiMo 专属的智能体强化学习方案、启动脚本和两个 agent 子模块。
我怎么启动一次训练?每个环境都有自己的启动脚本,比如软件工程用 scripts/code/train.sh,漏洞复现用 scripts/arvo/arvo.sh。先初始化 thirdparty 子模块,再按脚本旁边的 .env.example 设置好变量,然后运行脚本即可。
我需要什么样的硬件?需要一台 GPU 机器或集群:训练通过 FSDP、FSDP2 或 Megatron-LM 运行, rollout 生成通过 vLLM、SGLang 或 HF Transformers 完成。支持 NVIDIA、AMD(ROCm MI300X / MI325X / MI355X)和昇腾,可扩展到数百块 GPU。
像 vLLM 这类推理引擎有没有版本上的坑?有——请避开 vLLM 0.7.x,其中包含可能导致 OOM 和意外错误的 bug;FSDP 后端支持 vLLM >= 0.8.2。SGLang 则获得完整支持,包括多轮智能体强化学习和基于 server 的强化学习。
这个分叉新增的五个强化学习环境分别是什么?Code(软件工程,用可执行测试来评分)、Cyber(漏洞复现,用规则检查)、General(知识类工作,基于评分细则评判)、Visual(网页开发,按视觉效果评分)和 Music(符号音乐创作,用规则检查)。每个环境都有自己的启动脚本和 .env.example。
verl 实现了哪些强化学习算法?包括 PPO、GRPO、GSPO、ReMax、REINFORCE++、RLOO、PRIME、DAPO、DrGRPO、KLCov、ClipCov 等等,另外还支持监督微调。奖励可以是基于模型的奖励,也可以是针对数学、编程等领域的基于函数的可验证奖励。
mimoagent 和 uni-agent 这两个子模块是干什么的?mimoagent 是 mini-swe-agent 的一个分叉,提供智能体运行框架、工具、执行环境和评分器——Code、Cyber、General 和 Visual 这四个环境都会用到它。uni-agent 增加了模型网关和 TransferQueue 轨迹采集功能,只有 Code 环境会用到;Music 两个都不用。
我可以用它训练视觉语言模型吗?可以——verl 支持视觉语言模型和多模态强化学习,已支持 Qwen2.5-VL 和 Kimi-VL,并且 rollout 可以进行带工具调用的多轮交互。
Creator
XiaomiMiMo
Size
29.2 MB
Stars
725
Updated
CommitOct 18
Age
28d
Commits · 90 Days