Datasets:

Modalities:
Image
Text
Size:
< 1K
ArXiv:
Libraries:
Datasets

Improve dataset card for Vision-R1-cold

#2
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +64 -163
README.md CHANGED
@@ -1,170 +1,71 @@
1
- # EasyR1: An Efficient, Scalable, Multi-Modality RL Training Framework
2
-
3
- [![GitHub Repo stars](https://img.shields.io/github/stars/hiyouga/EasyR1)](https://github.com/hiyouga/EasyR1/stargazers)
4
- [![Twitter](https://img.shields.io/twitter/follow/llamafactory_ai)](https://twitter.com/llamafactory_ai)
5
-
6
- This project is a clean fork of the original [veRL](https://github.com/volcengine/verl) project to support vision language models, we thank all the authors for providing such a high-performance RL training framework.
7
-
8
- EasyR1 is efficient and scalable due to the design of **[HybirdEngine](https://arxiv.org/abs/2409.19256)** and the latest release of **[vLLM](https://github.com/vllm-project/vllm)**'s SPMD mode.
9
-
10
- ## Features
11
-
12
- - Supported models
13
- - Llama3/Qwen2/Qwen2.5 language models
14
- - Qwen2/Qwen2.5-VL vision language models
15
- - DeepSeek-R1 distill models
16
-
17
- - Supported algorithms
18
- - GRPO
19
- - Reinforce++
20
- - ReMax
21
- - RLOO
22
-
23
- - Supported datasets
24
- - Any text, vision-text dataset in a [specific format](#custom-dataset)
25
-
26
- - Supported tricks
27
- - Padding-free training
28
- - Resuming from checkpoint
29
- - Wandb & SwanLab & Mlflow & Tensorboard tracking
30
-
31
- ## Requirements
32
-
33
- ### Software Requirements
34
-
35
- - Python 3.9+
36
- - transformers>=4.49.0
37
- - flash-attn>=2.4.3
38
- - vllm>=0.7.3
39
-
40
- We provide a [Dockerfile](./Dockerfile) to easily build environments.
41
-
42
- We recommend using the [pre-built docker image](https://hub.docker.com/r/hiyouga/verl) in EasyR1.
43
-
44
- ```bash
45
- # stable
46
- docker pull hiyouga/verl:ngc-th2.5.1-cu120-vllm0.7.4-hotfix
47
- # nightly
48
- docker pull hiyouga/verl:ngc-th2.6.0-cu120-vllm0.8.2
49
- ```
50
-
51
- ### Hardware Requirements
52
-
53
- \* *estimated*
54
-
55
- | Method | Bits | 1.5B | 3B | 7B | 32B |
56
- | ------------------------ | ---- | ------ | ------ | ------ | ------- |
57
- | GRPO Full Fine-Tuning | AMP | 2*24GB | 4*40GB | 8*40GB | 16*80GB |
58
- | GRPO Full Fine-Tuning | BF16 | 1*24GB | 1*40GB | 4*40GB | 8*80GB |
59
-
60
- > [!NOTE]
61
- > Use `worker.actor.fsdp.torch_dtype=bf16` and `worker.actor.optim.strategy=adamw_bf16` to enable bf16 training.
62
- >
63
- > We are working hard to reduce the VRAM in RL training, LoRA support will be integrated in next updates.
64
-
65
- ## Tutorial: Run Qwen2.5-VL GRPO on [Geometry3K](https://huggingface.co/datasets/hiyouga/geometry3k) Dataset in Just 3 Steps
66
-
67
- ![image](assets/qwen2_5_vl_7b_geo.png)
68
-
69
- ### Installation
70
-
71
- ```bash
72
- git clone https://github.com/hiyouga/EasyR1.git
73
- cd EasyR1
74
- pip install -e .
75
- ```
76
-
77
- ### GRPO Training
78
-
79
- ```bash
80
- bash examples/qwen2_5_vl_7b_geo3k_grpo.sh
81
- ```
82
-
83
- ### Merge Checkpoint in Hugging Face Format
84
-
85
- ```bash
86
- python3 scripts/model_merger.py --local_dir checkpoints/easy_r1/exp_name/global_step_1/actor
87
  ```
88
 
89
- > [!TIP]
90
- > If you encounter issues with connecting to Hugging Face, consider using `export HF_ENDPOINT=https://hf-mirror.com`.
91
- >
92
- > If you want to use SwanLab logger, consider using `bash examples/qwen2_5_vl_7b_geo3k_swanlab.sh`.
93
-
94
- ## Custom Dataset
95
-
96
- Please refer to the example datasets to prepare your own dataset.
97
-
98
- - Text dataset: https://huggingface.co/datasets/hiyouga/math12k
99
- - Vision-text dataset: https://huggingface.co/datasets/hiyouga/geometry3k
100
-
101
- > [!TIP]
102
- > EasyR1 already supports multi-image dataset.
103
-
104
- ## How to Understand GRPO in EasyR1
105
-
106
- ![image](assets/easyr1_grpo.png)
107
-
108
- - To learn about the GRPO algorithm, you can refer to [Hugging Face's blog](https://huggingface.co/docs/trl/v0.15.2/en/grpo_trainer).
109
-
110
- ## How to Run 70B+ Model in Multi-node Environment
111
-
112
- Please see the **[veRL's official doc](https://verl.readthedocs.io/en/latest/start/multinode.html)** for multi-node training and Ray debugger.
113
-
114
- ## Other Baselines
115
-
116
- We also reproduced the following two baselines of the [R1-V](https://github.com/deep-agent/R1-V) project.
117
- - [CLEVR-70k-Counting](examples/baselines/qwen2_5_vl_3b_clevr.sh): Train the Qwen2.5-VL-3B-Instruct model on counting problem.
118
- - [GeoQA-8k](examples/baselines/qwen2_5_vl_3b_geoqa8k.sh): Train the Qwen2.5-VL-3B-Instruct model on GeoQA problem.
119
-
120
- ## Awesome Work using EasyR1
121
-
122
- - **MMR1**: Advancing the Frontiers of Multimodal Reasoning. [![[code]](https://img.shields.io/github/stars/LengSicong/MMR1)](https://github.com/LengSicong/MMR1)
123
- - **Vision-R1**: Incentivizing Reasoning Capability in Multimodal Large Language Models. [![[code]](https://img.shields.io/github/stars/Osilly/Vision-R1)](https://github.com/Osilly/Vision-R1) [![[arxiv]](https://img.shields.io/badge/arxiv-2503.06749-blue)](https://arxiv.org/abs/2503.06749)
124
- - **Seg-Zero**: Reasoning-Chain Guided Segmentation via Cognitive Reinforcement. [![[code]](https://img.shields.io/github/stars/dvlab-research/Seg-Zero)](https://github.com/dvlab-research/Seg-Zero) [![[arxiv]](https://img.shields.io/badge/arxiv-2503.06520-blue)](https://arxiv.org/abs/2503.06520)
125
- - **MetaSpatial**: Reinforcing 3D Spatial Reasoning in VLMs for the Metaverse. [![[code]](https://img.shields.io/github/stars/PzySeere/MetaSpatial)](https://github.com/PzySeere/MetaSpatial) [![[arxiv]](https://img.shields.io/badge/arxiv-2503.18470-blue)](https://arxiv.org/abs/2503.18470)
126
-
127
- ## TODO
128
-
129
- - Support LoRA (high priority).
130
- - Support ulysses parallelism for VLMs (middle priority).
131
- - Support more VLM architectures.
132
-
133
- > [!NOTE]
134
- > We will not provide scripts for supervised fine-tuning and inference in this project. If you have such requirements, we recommend using [LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory).
135
-
136
- ### Known bugs
137
-
138
- These features are temporarily disabled for now, we plan to fix them one-by-one in the future updates.
139
-
140
- - Vision language models are not compatible with ulysses parallelism yet.
141
-
142
- ## Discussion Group
143
-
144
- 👋 Join our [WeChat group](assets/wechat.jpg).
145
 
146
  ## Citation
147
 
148
- Core contributors: [Yaowei Zheng](https://github.com/hiyouga), [Junting Lu](https://github.com/AL-377), [Shenzhi Wang](https://github.com/Shenzhi-Wang), [Zhangchi Feng](https://github.com/BUAADreamer), [Dongdong Kuang](https://github.com/Kuangdd01) and Yuwen Xiong
149
-
150
- We also thank Guangming Sheng and Chi Zhang for helpful discussions.
151
-
152
  ```bibtex
153
- @misc{zheng2025easyr1,
154
- title = {EasyR1: An Efficient, Scalable, Multi-Modality RL Training Framework},
155
- author = {Yaowei Zheng, Junting Lu, Shenzhi Wang, Zhangchi Feng, Dongdong Kuang, Yuwen Xiong},
156
- howpublished = {\url{https://github.com/hiyouga/EasyR1}},
157
- year = {2025}
 
 
 
158
  }
159
- ```
160
-
161
- We recommend to also cite the original work.
162
-
163
- ```bibtex
164
- @article{sheng2024hybridflow,
165
- title = {HybridFlow: A Flexible and Efficient RLHF Framework},
166
- 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},
167
- year = {2024},
168
- journal = {arXiv preprint arXiv: 2409.19256}
169
- }
170
- ```
 
1
+ ---
2
+ task_categories:
3
+ - image-text-to-text
4
+ tags:
5
+ - multimodal
6
+ - reasoning
7
+ - chain-of-thought
8
+ - vision-r1
9
+ ---
10
+
11
+ # Vision-R1-cold
12
+
13
+ Vision-R1-cold is a high-quality multimodal Chain-of-Thought (CoT) dataset consisting of 200,000 samples. It serves as the cold-start initialization data for **Vision-R1**, a multimodal large language model (MLLM) designed to enhance reasoning capabilities through Reinforcement Learning (RL).
14
+
15
+ - **Paper:** [Vision-R1: Incentivizing Reasoning Capability in Multimodal Large Language Models](https://huggingface.co/papers/2503.06749)
16
+ - **Repository:** [https://github.com/Osilly/Vision-R1](https://github.com/Osilly/Vision-R1)
17
+
18
+ ## Dataset Description
19
+
20
+ The dataset was constructed without human annotations by leveraging an existing MLLM and DeepSeek-R1. The authors used a **Modality Bridging** approach where multimodal data is first processed by an MLLM to obtain a "Pseudo-CoT" (caption and reasoning process). This textual description is then fed to DeepSeek-R1 to facilitate the generation of high-quality, complex CoT processes. The resulting data is post-processed and filtered to create the final 200K dataset.
21
+
22
+ ## Usage
23
+
24
+ To use this dataset with the [LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory) framework, you can update your `dataset_info.json` with the following configuration:
25
+
26
+ ```json
27
+ "vision_r1_llava_cot_full": {
28
+ "file_name": "vision_r1_llava_cot_full.json",
29
+ "formatting": "sharegpt",
30
+ "columns": {
31
+ "messages": "conversations",
32
+ "images": "image"
33
+ },
34
+ "tags": {
35
+ "role_tag": "from",
36
+ "content_tag": "value",
37
+ "user_tag": "human",
38
+ "assistant_tag": "gpt"
39
+ }
40
+ },
41
+ "vision_r1_mulberry_sft_full": {
42
+ "file_name": "vision_r1_mulberry_sft_full.json",
43
+ "formatting": "sharegpt",
44
+ "columns": {
45
+ "messages": "conversations",
46
+ "images": "images"
47
+ },
48
+ "tags": {
49
+ "role_tag": "from",
50
+ "content_tag": "value",
51
+ "user_tag": "user",
52
+ "assistant_tag": "assistant"
53
+ }
54
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  ```
56
 
57
+ **Note:** The images for this dataset are derived from [LLaVA-CoT-100k](https://huggingface.co/datasets/Xkev/LLaVA-CoT-100k) and [Mulberry-SFT](https://huggingface.co/datasets/HuanjinYao/Mulberry-SFT).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  ## Citation
60
 
 
 
 
 
61
  ```bibtex
62
+ @misc{huang2025visionr1incentivizingreasoningcapability,
63
+ title={Vision-R1: Incentivizing Reasoning Capability in Multimodal Large Language Models},
64
+ author={Wenxuan Huang and Bohan Jia and Zijie Zhai and Shaosheng Cao and Zheyu Ye and Fei Zhao and Yao Hu and Shaohui Lin},
65
+ year={2025},
66
+ eprint={2503.06749},
67
+ archivePrefix={arXiv},
68
+ primaryClass={cs.CV},
69
+ url={https://arxiv.org/abs/2503.06749},
70
  }
71
+ ```