Skip to content

[data, rollout, worker] feat: add Open-R1 multimodal and TinyLLaVA-Video-R1 preprocessing and training scripts#6849

Open
lihanwen7 wants to merge 1 commit into
verl-project:mainfrom
lihanwen7:feat/openr1mm-tinyllava
Open

[data, rollout, worker] feat: add Open-R1 multimodal and TinyLLaVA-Video-R1 preprocessing and training scripts#6849
lihanwen7 wants to merge 1 commit into
verl-project:mainfrom
lihanwen7:feat/openr1mm-tinyllava

Conversation

@lihanwen7

@lihanwen7 lihanwen7 commented Jun 25, 2026

Copy link
Copy Markdown

What does this PR do?

Add GRPO training support for two multimodal datasets:

  • lmms-lab/multimodal-open-r1-8k-verified — image math reasoning, <think>/<answer> format
  • Zhang199/TinyLLaVA-Video-R1-training-data — video multiple-choice QA

bugfixes included:

  • verl/workers/engine_workers.py — add maybe_fix_3d_position_ids inside train_mini_batch loop to fix _ragged_idx corruption

Checklist Before Starting

Test

Both datasets trained on GPU and NPU. NPU training curves:

lmms-lab/multimodal-open-r1-8k-verified:
image

Zhang199/TinyLLaVA-Video-R1-training-data:
image

API and Usage Example

# Preprocess
python examples/data_preprocess/openr1mm.py --local_save_dir ~/data/openr1mm
python examples/data_preprocess/tinyllava_video_r1.py \
    --data_dir ~/data/tinyllava-video-r1 --local_save_dir ~/data/tinyllava_video_r1

# Train
bash examples/grpo_trainer/run_qwen3_5_2b_openr1_fsdp.sh
bash examples/grpo_trainer/run_qwen3_5_2b_video_fsdp.sh

Design & Code Changes

  • examples/data_preprocess/openr1mm.py — HF dataset → verl parquet, image bytes preserved
  • examples/data_preprocess/tinyllava_video_r1.py — JSONL → verl parquet, video file paths
  • examples/grpo_trainer/run_qwen3_5_2b_openr1_fsdp.sh — training script for image dataset
  • examples/grpo_trainer/run_qwen3_5_2b_video_fsdp.sh — training script for video dataset
  • verl/workers/engine_workers.pymaybe_fix_3d_position_ids in train_mini_batch loop

Checklist Before Submitting

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds preprocessing scripts and GRPO training configurations for the Open-R1 multimodal math and TinyLLaVA-Video-R1 datasets, along with related fixes in the agent loop and engine workers. The review feedback highlights critical issues: the referenced custom reward score scripts are missing from the repository, and the Open-R1 preprocessing script needs to disable automatic image decoding and explicitly select columns to prevent saving large, decoded images in the output Parquet files.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread examples/grpo_trainer/run_qwen3_5_2b_openr1_fsdp.sh
Comment thread examples/grpo_trainer/run_qwen3_5_2b_video_fsdp.sh
Comment thread examples/data_preprocess/openr1mm.py
Comment thread examples/data_preprocess/openr1mm.py
@lihanwen7 lihanwen7 force-pushed the feat/openr1mm-tinyllava branch 2 times, most recently from 50fc30a to db5abb4 Compare June 26, 2026 10:41
@lihanwen7 lihanwen7 force-pushed the feat/openr1mm-tinyllava branch from db5abb4 to 555a539 Compare June 26, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant