Safetensors
qwen3_vl
yuhangzang commited on
Commit
9683a4d
Β·
verified Β·
1 Parent(s): 0cef403

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +113 -20
README.md CHANGED
@@ -21,17 +21,38 @@ license: apache-2.0
21
  <a href="https://scholar.google.com/citations?user=5bInRDEAAAAJ&hl=zh-CN"><strong>Feng Wu</strong></a> Β·
22
  <a href="http://dahua.site/"><strong>Dahua Lin</strong></a>
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
- πŸ“–<a href="https://arxiv.org/abs/2509.22647">Paper</a> | 🏠<a href="https://github.com/InternLM/CapRL">Github</a> | πŸ€—<a href="https://huggingface.co/collections/long-xing1/caprl-68d64ac32ded31596c36e189">CapRL Collection</a> | πŸ€—<a href="https://huggingface.co/papers/2509.22647">Daily Paper</a>
26
 
27
  #### CapRL Series Model & Dataset
28
  | Series | Models & Resources |
29
  | :--- | :--- |
30
- | **CapRL 3.0 Series (CapRL++)** | [πŸ€— CapRL-Video-4B](https://huggingface.co/internlm/CapRL-Video-4B) |
31
  | **CapRL 2.0 Series** | [πŸ€— CapRL-Qwen3VL-2B](https://huggingface.co/internlm/CapRL-Qwen3VL-2B) \| [πŸ€— CapRL-Qwen3VL-4B](https://huggingface.co/internlm/CapRL-Qwen3VL-4B) \| [πŸ“¦ CapRL-Qwen3VL-2B-GGUF](https://huggingface.co/internlm/CapRL-Qwen3VL-2B-GGUF) \| [πŸ“¦ CapRL-Qwen3VL-4B-GGUF](https://huggingface.co/internlm/CapRL-Qwen3VL-4B-GGUF) \| [🌈CapRL-Qwen3VL-4B Space](https://huggingface.co/spaces/yuhangzang/CapRL-Qwen3VL-4B)
32
  | **CapRL 1.0 Series** | [πŸ€— CapRL-Qwen2.5VL-3B](https://huggingface.co/internlm/CapRL-3B) \| [πŸ€— CapRL-InternVL3.5-8B](https://huggingface.co/yuhangzang/CapRL-InternVL3.5-8B) \| [πŸ“Š CapRL-2M Dataset](https://huggingface.co/datasets/internlm/CapRL-2M) \| [πŸ“¦ CapRL-3B-GGUF](https://huggingface.co/mradermacher/CapRL-3B-GGUF) \| [πŸ“¦ CapRL-3B-i1-GGUF](https://huggingface.co/mradermacher/CapRL-3B-i1-GGUF) \| [🌈CapRL-Qwen2.5VL-3B Space](https://huggingface.co/spaces/yuhangzang/caprl)
33
 
34
- **CapRL 3.0 series (CapRL++)**: **CapRL-Video-4B** has been released!
35
 
36
  We are excited to release the **CapRL 2.0 series**: **CapRL-Qwen3VL-2B** and **CapRL-Qwen3VL-4B**. These models feature fewer parameters while delivering even more powerful captioning performance.
37
  Notably, **CapRL-Qwen3VL-2B outperforms both CapRL-Qwen2.5VL-3B and Qwen2.5VL-72B in captioning tasks, while CapRL-Qwen3VL-4B further demonstrates a significant performance leap over the 2B version.**
@@ -44,16 +65,17 @@ This guide will help you choose the most suitable model for your specific needs:
44
  |-|-|-|
45
  |πŸ€—[CapRL-Qwen3VL-2B](https://huggingface.co/internlm/CapRL-Qwen3VL-2B)|2B|Speed, Efficiency|
46
  |πŸ€—[CapRL-Qwen3VL-4B](https://huggingface.co/internlm/CapRL-Qwen3VL-4B)|4B|High Performance, Advanced Captioning Ability|
 
47
 
48
  Now you can try out CapRL with your own images🎨!&nbsp;&nbsp;&nbsp;&nbsp;➑️&nbsp;&nbsp;&nbsp;&nbsp;[🌈CapRL-Qwen2.5VL-3B Space](https://huggingface.co/spaces/yuhangzang/caprl) and [🌈CapRL-Qwen3VL-4B Space](https://huggingface.co/spaces/yuhangzang/CapRL-Qwen3VL-4B).
49
 
50
 
51
  ## πŸ“’ News
52
  We are working on even stronger base models and upgrading our training recipe β€” stay tuned!
53
- - πŸ”₯ [05/25/2026] We have released the training and evaluation code for CapRL++. See mroe in `CapRL++` folder.
54
  - πŸ”₯ [05/22/2026] We have released the **[CapRL-Video-QA-20K](https://huggingface.co/datasets/internlm/CapRL-Video-QA-20K)** dataset for CapRL++ training and
55
  the **[CapRL-Video-178K](https://huggingface.co/datasets/internlm/CapRL-Video-178K)** dataset (recaptioned by **[CapRL-Video-4B](https://huggingface.co/internlm/CapRL-Video-4B)** from LLaVA-Video-178K)!
56
- - πŸ”₯ [05/22/2026] **CapRL++** is coming! We have released the **[CapRL-Video-4B](https://huggingface.co/internlm/CapRL-Video-4B)** model designed for video captioning! Demo is [here](https://internlm.github.io/CapRL/demo/)
57
  - πŸ”₯ [04/16/2026] We have released the **[CapRL-QA-75K](https://huggingface.co/datasets/internlm/CapRL-QA-75K)** training dataset!
58
  - πŸ”₯ [2/9/2026] We release the CapRL training code.
59
  - πŸ”₯ [1/27/2026] CapRL is accepted by ICLR2026! We are working on cleaning training code, and will release everything as soon as possible!
@@ -67,41 +89,88 @@ the **[CapRL-Video-178K](https://huggingface.co/datasets/internlm/CapRL-Video-17
67
 
68
 
69
  ## Introduction
70
- 🌈We are excited to introduce <strong>CapRL-3B</strong>, a lightweight 3B image captioner that achieves perception capabilities comparable to Qwen2.5-VL-72B.
71
- By employing CapRL training framework, initializing with the Qwen2.5-VL-3B model, and using a carefully filtered 75K QA dataset as the training set, we obtained a highly capable captioner, CapRL-3B.
72
-
73
 
 
74
 
75
- </p>
76
-
77
- <a href="">
78
- <img src="assets/teaser.png" alt="Logo" >
79
- </a>
80
- <a href="">
81
- <img src="assets/performance_caprl2_0.png" alt="Logo" >
82
- </a>
83
-
84
 
85
 
86
 
87
  ## πŸ’‘ Highlights
88
- - πŸ”₯ **Remarkable visual understanding for Chart, Infographics and Document**: CapRL-3B achieves perception accuracy and visual information coverage comparable to Qwen2.5-VL-72B.
89
- - πŸ”₯ **Well-organized output**: The outputs of CapRL-3B are relatively well-structured, making them clear and easy to understand.
90
- - πŸ”₯ **Detailed description for natural images**: The outputs of CapRL-3B can perfectly cover all valid visual information while containing fewer hallucinations.
 
 
91
 
92
  ## Model Card
93
  - Based on the same recipe as CapRL-3B, we used InternVL3.5-8B as the policy model and obtained CapRL-InternVL3.5-8B through CapRL.
94
  - CapRL-3B-GGUF is static quants version, and CapRL-3B-i1-GGUF is weighted/imatrix quants version. Thanks for their contribution!
 
95
 
96
 
97
  ## πŸ‘¨β€πŸ’» Todo
98
 
99
  - βœ… Release 75k QA dataset.
100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  ## πŸ› οΈ Setup
102
 
103
  ### Installation
104
 
 
 
105
  ```bash
106
  git clone https://github.com/InternLM/CapRL.git
107
  cd CapRL/CapRL_Training
@@ -114,6 +183,23 @@ The `setup.sh` will sequentially:
114
  1. Install key dependencies with pinned versions (torch, transformers, vllm, deepspeed, flash-attn, ray, etc.)
115
  2. Install the OpenRLHF-based training framework and remaining dependencies via `pip install -e .`
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  ## ⭐️ Quick Start
118
  If you want to use **CapRL-3B** for captioning, you can directly follow the exact same inference approach as in [Qwen2.5-VL-series](https://github.com/QwenLM/Qwen3-VL/tree/d2240f11656bfe404b9ba56db4e51cd09f522ff1).
119
 
@@ -121,6 +207,12 @@ The prompt we use for training and evaluation is `Please describe this image in
121
 
122
  We recommend using **vLLM** to speed up inference.
123
 
 
 
 
 
 
 
124
 
125
 
126
  ### Start an OpenAI API Service
@@ -277,6 +369,7 @@ The model used for answering questions based on captions is [CapRL-Eval-3B](http
277
 
278
  You can specify `--reward-model-path` as the path to **CapRL-Eval-3B** in `Eval_CapRL.py`.
279
 
 
280
  ## πŸ“„ License
281
  ![Code License](https://img.shields.io/badge/Code%20License-Apache_2.0-green.svg) ![Data License](https://img.shields.io/badge/Data%20License-CC%20By%20NC%204.0-red.svg)
282
 
 
21
  <a href="https://scholar.google.com/citations?user=5bInRDEAAAAJ&hl=zh-CN"><strong>Feng Wu</strong></a> Β·
22
  <a href="http://dahua.site/"><strong>Dahua Lin</strong></a>
23
 
24
+ <h2 align="center">CapRL++: Unified Reinforcement Learning with Verifiable Rewards for Dense Image and Video Captioning</h2>
25
+ <p align="center">
26
+ <a href="https://yph22.github.io/"><strong>Penghui Yang*</strong></a>
27
+ Β·
28
+ <a href="https://github.com/Cooperx521"><strong>Long Xing*</strong></a>
29
+ Β·
30
+ <a href="https://lightdxy.github.io/"><strong>Xiaoyi Dong</strong></a>
31
+ Β·
32
+ <a href="https://yuhangzang.github.io/"><strong>Yuhang Zang</strong></a>
33
+ Β·
34
+ <a href="https://scholar.google.com/citations?user=sJkqsqkAAAAJ"><strong>Yuhang Cao</strong></a>
35
+ Β·
36
+ <a href="https://scholar.google.com/citations?user=P4yNnSkAAAAJ&hl=zh-TW"><strong>Jianze Liang</strong></a>
37
+ Β·
38
+ <a href="https://github.com/shikiw"><strong>Qidong Huang</strong></a>
39
+ Β·
40
+ <a href="https://myownskyw7.github.io/"><strong>Jiaqi Wang</strong></a>
41
+ Β·
42
+ <a href="http://dahua.site/"><strong>Dahua Lin</strong></a>
43
+ </p>
44
+
45
+ πŸ“–<a href="https://arxiv.org/abs/2509.22647">Paper</a> | 🏠<a href="https://github.com/InternLM/CapRL">Github</a> | πŸ€—<a href="https://huggingface.co/collections/long-xing1/caprl-68d64ac32ded31596c36e189">CapRL Collection</a> | πŸ€—<a href="https://huggingface.co/papers/2509.22647">Daily Paper</a>
46
 
 
47
 
48
  #### CapRL Series Model & Dataset
49
  | Series | Models & Resources |
50
  | :--- | :--- |
51
+ | **CapRL 3.0 Series (CapRL++)** | [πŸ€— CapRL-Video-4B](https://huggingface.co/internlm/CapRL-Video-4B) \|[πŸ“Š CapRL-Video-178K Dataset](https://huggingface.co/datasets/internlm/CapRL-Video-178K) \|
52
  | **CapRL 2.0 Series** | [πŸ€— CapRL-Qwen3VL-2B](https://huggingface.co/internlm/CapRL-Qwen3VL-2B) \| [πŸ€— CapRL-Qwen3VL-4B](https://huggingface.co/internlm/CapRL-Qwen3VL-4B) \| [πŸ“¦ CapRL-Qwen3VL-2B-GGUF](https://huggingface.co/internlm/CapRL-Qwen3VL-2B-GGUF) \| [πŸ“¦ CapRL-Qwen3VL-4B-GGUF](https://huggingface.co/internlm/CapRL-Qwen3VL-4B-GGUF) \| [🌈CapRL-Qwen3VL-4B Space](https://huggingface.co/spaces/yuhangzang/CapRL-Qwen3VL-4B)
53
  | **CapRL 1.0 Series** | [πŸ€— CapRL-Qwen2.5VL-3B](https://huggingface.co/internlm/CapRL-3B) \| [πŸ€— CapRL-InternVL3.5-8B](https://huggingface.co/yuhangzang/CapRL-InternVL3.5-8B) \| [πŸ“Š CapRL-2M Dataset](https://huggingface.co/datasets/internlm/CapRL-2M) \| [πŸ“¦ CapRL-3B-GGUF](https://huggingface.co/mradermacher/CapRL-3B-GGUF) \| [πŸ“¦ CapRL-3B-i1-GGUF](https://huggingface.co/mradermacher/CapRL-3B-i1-GGUF) \| [🌈CapRL-Qwen2.5VL-3B Space](https://huggingface.co/spaces/yuhangzang/caprl)
54
 
55
+ **CapRL 3.0 series (CapRL++)**: **CapRL-Video-4B** has been released! CapRL++ extends the original image-caption RL framework to a unified image and video captioning paradigm with verifiable rewards.
56
 
57
  We are excited to release the **CapRL 2.0 series**: **CapRL-Qwen3VL-2B** and **CapRL-Qwen3VL-4B**. These models feature fewer parameters while delivering even more powerful captioning performance.
58
  Notably, **CapRL-Qwen3VL-2B outperforms both CapRL-Qwen2.5VL-3B and Qwen2.5VL-72B in captioning tasks, while CapRL-Qwen3VL-4B further demonstrates a significant performance leap over the 2B version.**
 
65
  |-|-|-|
66
  |πŸ€—[CapRL-Qwen3VL-2B](https://huggingface.co/internlm/CapRL-Qwen3VL-2B)|2B|Speed, Efficiency|
67
  |πŸ€—[CapRL-Qwen3VL-4B](https://huggingface.co/internlm/CapRL-Qwen3VL-4B)|4B|High Performance, Advanced Captioning Ability|
68
+ |πŸ€—[CapRL-Video-4B](https://huggingface.co/internlm/CapRL-Video-4B)|4B|Extremely Dense Video Captioning|
69
 
70
  Now you can try out CapRL with your own images🎨!&nbsp;&nbsp;&nbsp;&nbsp;➑️&nbsp;&nbsp;&nbsp;&nbsp;[🌈CapRL-Qwen2.5VL-3B Space](https://huggingface.co/spaces/yuhangzang/caprl) and [🌈CapRL-Qwen3VL-4B Space](https://huggingface.co/spaces/yuhangzang/CapRL-Qwen3VL-4B).
71
 
72
 
73
  ## πŸ“’ News
74
  We are working on even stronger base models and upgrading our training recipe β€” stay tuned!
75
+ - πŸ”₯ [05/25/2026] We have released the training and evaluation code for CapRL++. See more in `CapRL++` folder.
76
  - πŸ”₯ [05/22/2026] We have released the **[CapRL-Video-QA-20K](https://huggingface.co/datasets/internlm/CapRL-Video-QA-20K)** dataset for CapRL++ training and
77
  the **[CapRL-Video-178K](https://huggingface.co/datasets/internlm/CapRL-Video-178K)** dataset (recaptioned by **[CapRL-Video-4B](https://huggingface.co/internlm/CapRL-Video-4B)** from LLaVA-Video-178K)!
78
+ - πŸ”₯ [05/22/2026] **CapRL++** is coming! We have released the **[CapRL-Video-4B](https://huggingface.co/internlm/CapRL-Video-4B)** model (trained on Qwen3-VL-4B) designed for video captioning! Demo is [here](https://internlm.github.io/CapRL/demo/).
79
  - πŸ”₯ [04/16/2026] We have released the **[CapRL-QA-75K](https://huggingface.co/datasets/internlm/CapRL-QA-75K)** training dataset!
80
  - πŸ”₯ [2/9/2026] We release the CapRL training code.
81
  - πŸ”₯ [1/27/2026] CapRL is accepted by ICLR2026! We are working on cleaning training code, and will release everything as soon as possible!
 
89
 
90
 
91
  ## Introduction
92
+ 🌈 We are excited to introduce the **CapRL series**, a family of dense captioning models trained with reinforcement learning rather than conventional supervised caption imitation.
 
 
93
 
94
+ The original **CapRL** framework focuses on dense image captioning. It optimizes an LVLM captioner with QA-derived rewards: a caption is considered high quality when a text-only model can answer visual questions using only that caption. With this recipe, the lightweight **CapRL-3B** achieves perception capabilities comparable to Qwen2.5-VL-72B.
95
 
96
+ **CapRL++** further generalizes this idea from static images to dynamic videos. It trains a Qwen3-VL-based captioner with a unified RLVR pipeline, where generated captions are evaluated by their downstream utility for multiple-choice visual question answering. For videos, CapRL++ adds timestamp-format rewards and length-aware regularization so the model learns dense, temporally grounded, and non-redundant descriptions.
 
 
 
 
 
 
 
 
97
 
98
 
99
 
100
  ## πŸ’‘ Highlights
101
+ - πŸ”₯ **Unified dense caption RL for images and videos**: CapRL++ applies the same QA-utility reward philosophy to both image and video captioning, avoiding dependence on a single reference caption.
102
+ - πŸ”₯ **Verifiable reward design**: CapRL++ combines visual utility reward, timestamp-format reward, and length-aware penalty to optimize accuracy, temporal structure, and information efficiency.
103
+ - πŸ”₯ **Strong temporal grounding**: CapRL-Video-4B generates explicit timestamped video descriptions and improves downstream video understanding when used as caption data.
104
+ - πŸ”₯ **Remarkable visual understanding for charts, infographics, and documents**: CapRL-3B achieves perception accuracy and visual information coverage comparable to Qwen2.5-VL-72B.
105
+ - πŸ”₯ **Well-organized dense output**: CapRL models generate structured captions that cover fine-grained objects, attributes, OCR content, relations, and events.
106
 
107
  ## Model Card
108
  - Based on the same recipe as CapRL-3B, we used InternVL3.5-8B as the policy model and obtained CapRL-InternVL3.5-8B through CapRL.
109
  - CapRL-3B-GGUF is static quants version, and CapRL-3B-i1-GGUF is weighted/imatrix quants version. Thanks for their contribution!
110
+ - CapRL-Video-4B is trained from Qwen3-VL-4B with CapRL++ for dense video captioning. It is designed to describe both spatial details and temporal event changes with timestamped structure.
111
 
112
 
113
  ## πŸ‘¨β€πŸ’» Todo
114
 
115
  - βœ… Release 75k QA dataset.
116
 
117
+ ## CapRL++: Unified Image and Video Caption RL
118
+
119
+ CapRL++ is the video-oriented extension of CapRL. It keeps the central principle of CapRL: **a caption should be rewarded by how useful it is for downstream visual question answering**. Instead of comparing a generated caption with a fixed reference, CapRL++ lets the policy model generate captions, then asks a separate vision-free LLM to answer curated multiple-choice questions using only those captions. The answer accuracy becomes a verifiable reward for RL training.
120
+
121
+ ### Reward Design
122
+
123
+ For a sampled caption `c`, CapRL++ uses a multidimensional reward:
124
+
125
+ ```text
126
+ R_total(c) = R_acc(c) + alpha * R_format(c) + beta * R_len(c)
127
+ ```
128
+
129
+ - **Visual utility reward (`R_acc`)**: measures whether a text-only LLM can answer image/video MCQs from the generated caption alone. Options are shuffled and sampled multiple times to reduce answer-position bias.
130
+ - **Temporal format reward (`R_format`)**: used for video captions. It encourages valid timestamp brackets and chronological ordering, helping the model produce temporally grounded narratives.
131
+ - **Length-aware reward (`R_len`)**: discourages reward hacking through overly long or repetitive captions, pushing the model toward high information density.
132
+
133
+ ### Static-to-Dynamic Bootstrapping
134
+
135
+ CapRL++ uses **S2D-Boot**, a two-stage image-to-video training recipe:
136
+
137
+ 1. **Image stage**: train on static images with visual utility and length rewards to strengthen fine-grained spatial perception, OCR, attributes, and relation extraction.
138
+ 2. **Video stage**: initialize from the image-stage checkpoint and train on video data with the full reward space, including timestamp-format reward, so optimization can focus on event ordering and temporal localization.
139
+
140
+ This progressive strategy preserves strong image captioning ability while improving video understanding.
141
+
142
+ ### CapRL++ Datasets
143
+
144
+ - **[CapRL-Video-QA-20K](https://huggingface.co/datasets/internlm/CapRL-Video-QA-20K)**: multiple-choice video QA data for CapRL++ reward training.
145
+ - **[CapRL-Video-178K](https://huggingface.co/datasets/internlm/CapRL-Video-178K)**: LLaVA-Video-178K videos recaptioned by **[CapRL-Video-4B](https://huggingface.co/internlm/CapRL-Video-4B)** with dense, timestamped descriptions.
146
+
147
+ ### Code Entry Points
148
+
149
+ The CapRL++ implementation is in [`CapRL++`](CapRL++):
150
+
151
+ ```text
152
+ CapRL++/
153
+ β”œβ”€β”€ train/
154
+ β”‚ β”œβ”€β”€ scripts/ # reward service and verl training launch scripts
155
+ β”‚ └── verl/ # bundled verl backend with video caption RL recipe
156
+ └── eval/
157
+ β”œβ”€β”€ scripts/ # Prism video evaluation scripts
158
+ β”œβ”€β”€ tools/ # benchmark judge helpers
159
+ └── README.md
160
+ ```
161
+
162
+ For details, see:
163
+
164
+ - [`CapRL++/README.md`](CapRL++/README.md)
165
+ - [`CapRL++/train/scripts/README.md`](CapRL++/train/scripts/README.md)
166
+ - [`CapRL++/eval/README.md`](CapRL++/eval/README.md)
167
+
168
  ## πŸ› οΈ Setup
169
 
170
  ### Installation
171
 
172
+ For CapRL image training and evaluation:
173
+
174
  ```bash
175
  git clone https://github.com/InternLM/CapRL.git
176
  cd CapRL/CapRL_Training
 
183
  1. Install key dependencies with pinned versions (torch, transformers, vllm, deepspeed, flash-attn, ray, etc.)
184
  2. Install the OpenRLHF-based training framework and remaining dependencies via `pip install -e .`
185
 
186
+ For CapRL++ video training and evaluation:
187
+
188
+ ```bash
189
+ cd CapRL/CapRL++/train
190
+ conda create -n caprl python=3.10 -y
191
+ conda activate caprl
192
+ pip install -r scripts/requirements.txt
193
+ pip install -e ./verl
194
+ ```
195
+
196
+ Video Prism evaluation dependencies are installed separately:
197
+
198
+ ```bash
199
+ cd CapRL/CapRL++/eval
200
+ pip install -r requirements.txt
201
+ ```
202
+
203
  ## ⭐️ Quick Start
204
  If you want to use **CapRL-3B** for captioning, you can directly follow the exact same inference approach as in [Qwen2.5-VL-series](https://github.com/QwenLM/Qwen3-VL/tree/d2240f11656bfe404b9ba56db4e51cd09f522ff1).
205
 
 
207
 
208
  We recommend using **vLLM** to speed up inference.
209
 
210
+ For **CapRL-Video-4B**, use the Qwen3-VL video inference interface or the Prism evaluation scripts under `CapRL++/eval`. A typical video caption prompt is:
211
+
212
+ ```text
213
+ Please describe this video in detail.
214
+ ```
215
+
216
 
217
 
218
  ### Start an OpenAI API Service
 
369
 
370
  You can specify `--reward-model-path` as the path to **CapRL-Eval-3B** in `Eval_CapRL.py`.
371
 
372
+
373
  ## πŸ“„ License
374
  ![Code License](https://img.shields.io/badge/Code%20License-Apache_2.0-green.svg) ![Data License](https://img.shields.io/badge/Data%20License-CC%20By%20NC%204.0-red.svg)
375