返回排行榜

hiyouga/EasyR1

Pythonverl.readthedocs.io

EasyR1: An Efficient, Scalable, Multi-Modality RL Training Framework based on veRL

aigptllmnlpreinforcement-learningrldeepseekqwen
Star 增长趋势
Star
5.1k
Forks
380
周增长
Issues
50
2k3k4k5k
2025年2月2025年7月2026年1月2026年7月
制品库PyPIpip install easyr1
README

EasyR1: An Efficient, Scalable, Multi-Modality RL Training Framework

GitHub Repo stars Twitter Docker Pulls

Used by Amazon Web Services

This project is a clean fork of the original veRL project to support vision language models, we thank all the authors for providing such a high-performance RL training framework.

EasyR1 is efficient and scalable due to the design of HybirdEngine and the latest release of vLLM's SPMD mode.

Features

  • Supported models

    • Llama3/Qwen2/Qwen2.5/Qwen3 language models
    • Qwen2-VL/Qwen2.5-VL/Qwen3-VL vision language models
    • DeepSeek-R1 distill models
  • Supported algorithms

    • GRPO
    • DAPO new
    • Reinforce++
    • ReMax
    • RLOO
    • GSPO new
    • CISPO new
  • Supported datasets

  • Supported tricks

    • Padding-free training
    • LoRA training new
    • Resuming from the latest/best checkpoint
    • Wandb & SwanLab & Mlflow & Tensorboard tracking

Requirements

Software Requirements

  • Python 3.9+
  • transformers>=4.54.0
  • flash-attn>=2.4.3
  • vllm>=0.8.3

We provide a Dockerfile to easily build environments.

We recommend using the pre-built docker image in EasyR1.

docker pull hiyouga/verl:ngc-th2.8.0-cu12.9-vllm0.11.0
docker run -it --ipc=host --gpus=all hiyouga/verl:ngc-th2.8.0-cu12.9-vllm0.11.0

If your environment does not support Docker, you can consider using Apptainer:

apptainer pull easyr1.sif docker://hiyouga/verl:ngc-th2.8.0-cu12.9-vllm0.11.0
apptainer shell --nv --cleanenv --bind /mnt/your_dir:/mnt/your_dir easyr1.sif

Use USE_MODELSCOPE_HUB=1 to download models from the ModelScope hub.

Hardware Requirements

* estimated

Method Bits 1.5B 3B 7B 32B 72B
GRPO Full Fine-Tuning AMP 2*24GB 4*40GB 8*40GB 16*80GB 32*80GB
GRPO Full Fine-Tuning BF16 1*24GB 1*40GB 4*40GB 8*80GB 16*80GB
GRPO LoRA Fine-Tuning AMP 1*12GB 1*24GB 2*32GB 2*80GB 4*80GB

[!NOTE] Use worker.actor.fsdp.torch_dtype=bf16 and worker.actor.optim.strategy=adamw_bf16 to enable bf16 training.

Tutorial: Run Qwen2.5-VL GRPO on Geometry3K Dataset in Just 3 Steps

image

Installation

git clone https://github.com/hiyouga/EasyR1.git
cd EasyR1
pip install -e .

GRPO Full Training

bash examples/qwen2_5_vl_7b_geo3k_grpo.sh

GRPO LoRA Training

bash examples/qwen3_vl_4b_geo3k_grpo_lora.sh

Merge Checkpoint in Hugging Face Format

python3 scripts/model_merger.py --local_dir checkpoints/easy_r1/exp_name/global_step_1/actor

[!TIP] If you encounter issues with connecting to Hugging Face, consider using export HF_ENDPOINT=https://hf-mirror.com.

If you want to use SwanLab logger, consider using bash examples/qwen2_5_vl_7b_geo3k_swanlab.sh.

Custom Dataset

Please refer to the example datasets to prepare your own dataset.

How to Understand GRPO in EasyR1

image

How to Run 70B+ Model in Multi-node Environment

  1. Start the Ray head node.
ray start --head --port=6379 --dashboard-host=0.0.0.0
  1. Start the Ray worker node and connect to the head node.
ray start --address=<head_node_ip>:6379
  1. Check the Ray resource pool.
ray status
  1. Run training script on the Ray head node only.
bash examples/qwen2_5_vl_7b_geo3k_grpo.sh

See the veRL's official doc for more details about multi-node training and Ray debugger.

Other Baselines

We also reproduced the following two baselines of the R1-V project.

  • CLEVR-70k-Counting: Train the Qwen2.5-VL-3B-Instruct model on counting problem.
  • GeoQA-8k: Train the Qwen2.5-VL-3B-Instruct model on GeoQA problem.

Performance Baselines

See baselines.md.

Awesome Work using EasyR1

TODO

  • Support ulysses parallelism for VLMs (middle priority).
  • Support more VLM architectures.

[!NOTE] We will not provide scripts for supervised fine-tuning and inference in this project. If you have such requirements, we recommend using LlamaFactory.

Known bugs

These features are temporarily disabled for now, we plan to fix them one-by-one in the future updates.

  • Vision language models are not compatible with ulysses parallelism yet.

Discussion Group

👋 Join our WeChat group.

FAQs

ValueError: Image features and image tokens do not match: tokens: 8192, features 9800

Increase the data.max_prompt_length or reduce the data.max_pixels.

RuntimeError: CUDA Error: out of memory at /workspace/csrc/cumem_allocator.cpp:62

Reduce the worker.rollout.gpu_memory_utilization and enable worker.actor.offload.offload_params.

RuntimeError: 0 active drivers ([]). There should only be one.

Uninstall deepspeed from the current python environment.

Citation

Core contributors: Yaowei Zheng, Junting Lu, Shenzhi Wang, Zhangchi Feng, Dongdong Kuang, Yuwen Xiong and Richong Zhang

We also thank Guangming Sheng and Chi Zhang for helpful discussions.

@misc{zheng2025easyr1,
  title        = {EasyR1: An Efficient, Scalable, Multi-Modality RL Training Framework},
  author       = {Yaowei Zheng, Junting Lu, Shenzhi Wang, Zhangchi Feng, Dongdong Kuang, Yuwen Xiong, Richong Zhang},
  howpublished = {\url{https://github.com/hiyouga/EasyR1}},
  year         = {2025}
}

We recommend to also cite the original work.

@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}
}
相关仓库
openclaw/openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

TypeScriptnpmOtheraiassistant
openclaw.ai
383.7k80.6k
obra/superpowers

An agentic skills framework & software development methodology that works.

ShellMIT Licenseaibrainstorming
258.9k23.1k
NousResearch/hermes-agent

The agent that grows with you

PythonPyPIMIT Licenseaiai-agent
hermes-agent.nousresearch.com
218.5k41.3k
n8n-io/n8n

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

TypeScriptnpmOtherautomationipaas
n8n.io
197.4k59.5k
Significant-Gravitas/AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

PythonPyPIOtheraiopenai
agpt.co
185.6k46.1k
f/prompts.chat

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

HTMLOtherchatgptai
prompts.chat
166.2k21.5k
AUTOMATIC1111/stable-diffusion-webui

Stable Diffusion web UI

PythonPyPIGNU Affero General Public License v3.0deep-learningdiffusion
164.3k30.4k
Snailclimb/JavaGuide

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

JavaScriptnpmApache License 2.0javainterview
javaguide.cn
157.2k46.2k
firecrawl/firecrawl

The API to search, scrape, and interact with the web at scale. 🔥

TypeScriptnpmGNU Affero General Public License v3.0aicrawler
firecrawl.dev
154.1k8.8k
langgenius/dify

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

TypeScriptnpmOtheraigpt
dify.ai
149.7k23.6k
open-webui/open-webui

User-friendly AI Interface (Supports Ollama, OpenAI API, ...)

PythonPyPIOtherollamaollama-webui
openwebui.com
146.3k21.2k
langchain-ai/langchain

The agent engineering platform.

PythonPyPIMIT Licenseaianthropic
docs.langchain.com/langchain/
142.3k23.7k