verl-project/verl

verl/HybridFlow: A Flexible and Efficient RL Post-Training Framework

What it solves

verl is a production-ready reinforcement learning (RL) training library designed specifically for large language models (LLMs). It addresses the complexity of post-training alignment, allowing developers to implement diverse RL algorithms (like PPO and GRPO) with minimal code while maintaining high throughput and scalability across large GPU clusters.

How it works

The library uses a hybrid-controller programming model (HybridFlow) that decouples computation and data dependencies. This allows it to integrate seamlessly with various LLM infrastructure components:

  • Training Backends: Supports FSDP, FSDP2, and Megatron-LM.
  • Rollout Generation: Integrates with vLLM, SGLang, and Hugging Face Transformers.
  • Resource Management: Uses flexible device mapping to place models on different GPU sets for optimal resource utilization.
  • Efficiency: Employs a 3D-HybridEngine to reduce memory redundancy and communication overhead when switching between training and generation phases.

Who it’s for

It is intended for researchers and engineers working on LLM post-training, specifically those needing to scale RLHF (Reinforcement Learning from Human Feedback) to very large models (up to 671B parameters) and those implementing advanced reasoning or multi-modal RL.

Highlights

  • Algorithm Support: Ready-to-use implementations of PPO, GRPO, GSPO, ReMax, RLOO, and more.
  • Broad Compatibility: Works with popular Hugging Face models (Qwen, Llama, Gemma, DeepSeek) and supports NVIDIA, AMD, and Ascend hardware.
  • Advanced Capabilities: Supports vision-language models (VLMs), multi-turn tool calling, and LoRA RL to save memory.
  • High Scalability: Capable of scaling to trillion-parameter models on limited hardware via expert parallelism and Megatron-bridge.

Related

  • Project
  • Project
  • Project
  • Project
  • Project