Reinforcement Learning Optimization for Large-Scale Learning: An Efficient and User-Friendly Scaling Library

Weixun Wang, Shaopan Xiong, Gengru Chen, Wei Gao, Sheng Guo, Yancheng He, Ju Huang, Jiaheng Liu, Zhendong Li, Xiaoyang Li, Zichen Liu, Haizhou Zhao, Dakai An, Lunxi Cao, Qiyang Cao, Wanxi Deng, Feilei Du, Yiliang Gu, Jiahe Li, Xiang Li, Mingjie Liu, Yijia Luo, Zihe Liu, Yadao Wang, Pei Wang, Tianyuan Wu, Yanan Wu, Yuheng Zhao, Shuaibing Zhao, Jin Yang, Siran Yang, Yingshui Tan, Huimin Yi, Yuchi Xu, Yujin Yuan, Xingyao Zhang, Lin Qu, Wenbo Su, Jiamang Wang, Bo ZhengarXiv 2025 · DOI

Abstract

ROLL (Reinforcement Learning Optimization for Large-scale Learning) is a high-performance library designed for the large-scale reinforcement learning (RL) training of Large Language Models (LLMs). By simplifying complex multi-model pipelines and introducing sample-level scheduling alongside flexible resource mapping, ROLL enables stable training for models exceeding 200 billion parameters. The framework significantly boosts performance in reasoning and agentic tasks, scaling efficiently to thousands of GPUs.

Introduction

Reinforcement Learning has emerged as a critical component in developing the reasoning capabilities of modern LLMs, underpinning techniques from RLHF to advanced "thinking" models. However, training these models at scale presents a significant systems challenge. Developers must coordinate at least four distinct models—Actor, Critic, Reference, and Reward—across asynchronous stages of generation, inference, and training.

To address these complexities, the ROLL Team has introduced ROLL, an open-source library built to make large-scale RL training efficient, scalable, and user-friendly. By decoupling the rigid stages of traditional RL workflows, ROLL allows for higher GPU utilization and better support for complex agentic interactions.

System Challenges in Large-Scale RL

Standard RL training for LLMs is notoriously difficult to manage due to the multi-stage nature of the workflow. A typical iteration involves generation (Actor), inference (Critic, Reference, and Reward processing), and training (parameter updates). Existing frameworks often treat these stages as rigid, synchronous blocks, leading to several inefficiencies:

  • GPU Idling: Bottlenecks in one stage, such as slow environment interactions or reward model latency, cause expensive GPUs to sit idle.
  • Rigid Resource Allocation: Fixed GPU assignments prevent the system from reallocating resources dynamically between generation and training stages.
  • Agentic Complexity: "Agentic" RL, involving multi-turn interactions with an environment, is particularly hard to scale because environment latency often stalls the entire pipeline.

The ROLL Architecture

ROLL tackles these challenges with a modular, "single-controller" architecture built on top of Ray. This design allows for fine-grained control over the training lifecycle and resource distribution.

Parallel Worker Abstraction

ROLL encapsulates distinct roles—Actor, Critic, Reward, and Environment—into "Parallel Workers." This modularity allows researchers to swap components or experiment with various algorithms, such as PPO, GRPO, or DAPO, without requiring a complete overhaul of the codebase.

Sample-Level Rollout Scheduling

Unlike traditional systems that manage data in rigid batches, ROLL’s scheduler operates at the individual sample level. This enables Dynamic Sampling: if a batch already contains enough high-quality samples to provide a valid gradient, the system can proactively abort remaining slow generation tasks. This eliminates the "long-tail" problem where a single slow response stalls the entire training loop.

AutoDeviceMapping and Asynchronous Support

The AutoDeviceMapping module facilitates flexible resource allocation. Instead of locking GPUs to a single model, ROLL can reallocate portions of the generation cluster to the training stage dynamically. Furthermore, for multi-turn tasks, ROLL uses dedicated Environment Workers that interact with external tools or sandboxes asynchronously, ensuring that the Actor can continue generating for other samples while waiting for environment feedback.

Experimental Evaluation

The authors evaluated ROLL across a diverse set of reasoning and agentic benchmarks, demonstrating its versatility and performance.

  • Reasoning Gains: On the Qwen2.5-7B-Base model, ROLL improved average accuracy across RLVR (Reinforcement Learning with Verifiable Rewards) tasks from 0.18 to 0.52—a 2.89x improvement. Math reasoning specifically saw a jump from 0.20 to 0.53.
  • Agentic Mastery: In the WebShop environment, the success rate increased from 37% to over 85%. The model also became more efficient, reducing the average number of actions per episode from 7 to 4.
  • Production-Grade Scalability: The library successfully supported the training of a 200B+ parameter Mixture-of-Experts (MoE) model on thousands of GPUs for two weeks without interruption, proving its industrial-strength fault tolerance.

Conclusion

ROLL significantly lowers the barrier to large-scale RL by providing a high-performance, modular framework. By moving from batch-level to sample-level management and decoupling environment interactions, it provides the necessary infrastructure for the next generation of reasoning-capable LLMs. The library is open-source and available for the community to drive further innovation in RL scaling.

Summary updated

BibTeX
@misc{wang2025reinforcement,
  author = {Weixun Wang and Shaopan Xiong and Gengru Chen and Wei Gao and Sheng Guo and Yancheng He and Ju Huang and Jiaheng Liu and Zhendong Li and Xiaoyang Li and Zichen Liu and Haizhou Zhao and Dakai An and Lunxi Cao and Qiyang Cao and Wanxi Deng and Feilei Du and Yiliang Gu and Jiahe Li and Xiang Li and Mingjie Liu and Yijia Luo and Zihe Liu and Yadao Wang and Pei Wang and Tianyuan Wu and Yanan Wu and Yuheng Zhao and Shuaibing Zhao and Jin Yang and Siran Yang and Yingshui Tan and Huimin Yi and Yuchi Xu and Yujin Yuan and Xingyao Zhang and Lin Qu and Wenbo Su and Wei Wang and Jiamang Wang and Bo Zheng},
  title = {{Reinforcement Learning Optimization for Large-Scale Learning: An Efficient and User-Friendly Scaling Library}},
  year = {2025},
  eprint = {2506.06122},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.06122},
}
Figure