alibaba/ROLL

An Efficient and User-Friendly Scaling Library for Reinforcement Learning with Large Language Models

What is ROLL?

ROLL (Reinforcement Learning Optimization for Large-Scale Learning) is an open-source library from Alibaba for applying reinforcement learning (RL) to Large Language Models (LLMs) — the kind of AI models behind chatbots and reasoning systems. It's designed to run on large clusters of GPUs.

What RL does for LLMs: After a model is initially trained, RL fine-tunes it to improve specific behaviors — like aligning with human preferences, doing complex reasoning, or handling multi-turn agentic interactions (e.g., using tools, playing games, multi-turn dialogue).

How it works

ROLL uses a multi-role distributed architecture built on Ray (a distributed computing framework). This lets it flexibly allocate GPU resources and schedule different tasks (like training vs. generating responses) across machines. It integrates three major open-source technologies:

  • Megatron-Core — for model training
  • SGLang and vLLM — for fast inference/generation

This combination lets ROLL scale from a single machine to clusters with thousands of GPUs.

Key capabilities

  • RLVR (Reinforcement Learning with Verifiable Rewards): Training for math, coding, general reasoning, open-ended Q&A, and instruction following. Supports asynchronous parallel rollout (generating samples in parallel) and dynamic sampling.
  • Agentic RL: Multi-turn interaction training for games, dialogues, and tool use. Supports environment-level asynchronous rollout and asynchronous training.
  • Algorithm support: Out-of-the-box implementations of PPO, GRPO, Reinforce++, TOPR, RAFT++, GSPO, and more — with 20+ configurable RL strategy options (reward normalization, clipping, advantage estimation methods, etc.).
  • Training/inference engines: vLLM and SGLang for generation; FSDP2 and Megatron-LM 5D parallelism (dp/tp/pp/cp/ep) for training. Also supports LoRA (lightweight fine-tuning) and FP8 rollout (reduced-precision inference for speed).
  • AutoDeviceMapping: Custom device mapping for different roles, managing colocated and disaggregated deployments.
  • Observability: Integration with SwanLab, WandB, and TensorBoard for tracking performance metrics per domain and reward type.
  • Post-training pipelines: Agentic RL (LLM & VLM), RLVR (LLM & VLM), Distill Pipeline, DPO Pipeline, and SFT Pipeline (the last one listed as "under development").

Hardware support

  • AMD GPUs — with out-of-box Docker images and example configs
  • Huawei Ascend NPUs — with a dedicated usage guide

Notable works built on ROLL

The README lists several research projects and papers that used ROLL, including:

  • Freshness-Aware-PER — a prioritized experience replay framework for LLM/VLM RL
  • ComplementaryRL — a framework for learning from experience via co-evolving an experience extractor and policy actor
  • RLix — an RL job manager that shares GPU capacity across jobs
  • TurningPoint-GRPO — a GRPO framework for text-to-image generation
  • SocioReasoner — vision-language method for urban socio-semantic segmentation
  • STAgent — agentic LLM for spatio-temporal tasks
  • IPRO — video diffusion framework for identity preservation
  • TaoSR-SHE — search relevance framework for Taobao
  • EARL — efficient agentic RL systems for LLMs

Additional facts

  • License: Apache 2.0
  • Paper: A tech report is available on arXiv (2506.06122), plus several related papers on specific techniques (e.g., ROLL Flash for asynchronous acceleration, RollPacker for long-tail rollouts).
  • Documentation: Extensive docs at alibaba.github.io/ROLL, covering installation, configuration, debugging, checkpoints, and quick-start guides for single-node and multi-node deployments.
  • Recent updates (from the news log): Support for Qwen3.5 models, FSDP2 strategy, Megatron with LoRA, Qwen3-Omni, and an "ALE ecosystem" with an open-source agentic model called ROME.

Related

  • Project
  • Project
  • Project
  • Project
  • Project