Xingjian Zhang1*,
Siwei Wen1,2*,
Wenjun Wu1,2,3,
Lei Huang1,2,3,β
1SKLCCSE, Institute of Artificial Intelligence, Beihang University, Beijing, China
2Beijing Advanced Innovation Center for Future Blockchain and Privacy Computing, Beihang University,
3Hangzhou International Innovation Institute, Beihang University, Hangzhou, China
Xingjian Zhang1*, Siwei Wen1,2*, Wenjun Wu1,2,3, Lei Huang1,2,3,β
1SKLCCSE, Institute of Artificial Intelligence, Beihang University, Beijing, China
2Beijing Advanced Innovation Center for Future Blockchain and Privacy Computing, Beihang University,
3Hangzhou International Innovation Institute, Beihang University, Hangzhou, China
- [2025-04] π Our arXiv paper TinyLLaVA-Video-R1: Towards Smaller LMMs for Video Reasoning is released!
- [2025-04] π Our TinyLLaVA-Video-R1 repository is released!
- TinyLLaVA-Video-R1 is a small-scale video reasoning model built upon the fully open-source TinyLLaVA-Video framework. Designed for researchers with limited computational resources, it leverages reinforcement learning to enhance reasoning abilities while maintaining a model size under 4B parameters.
- TinyLLaVA-Video-R1 demonstrates improved video question-answering performance and reflective reasoning behaviors ("aha moments").
- This repository provides the model, code, and experimental setups for easy replication. It requires about 30 Hours of training on 8 A100-40G GPUs under default settings. The training time mainly depends on the amount and length of responses.
- Clone this repository and navigate to the folder
git clone https://github.com/ZhangXJ199/TinyLLaVA-Video-R1.git
cd TinyLLaVA-Video-R1
- Create a conda environment, activate it and install Packages
conda create -n tinyllava_video python=3.10 -y
conda activate tinyllava_video
pip install --upgrade pip # enable PEP 660 support
pip install -e .
- Install additional packages
pip install flash-attn==2.7.3 --no-build-isolation
git pull
pip install -e .
The model we provided after training: TinyLLaVA-Video-R1
We select multiple choice questions from the NextQA subset of LLaVA-Video-178K as training data. To maintain manageable training time with limited computational resources, we only choose the subset of data with a duration of 0 to 30 seconds, which contains 5,496 samples. The training data can be downloaded from here.
Organize the files and annotation files as follows in path/to/your/dataset
:
dataset
βββ NextQA
β βββ NExTVideo
βββ nextqa_0-30s.jsonl
βββ nextqa-coldstart-16.json
Option1: You can directly download TinyLLaVA-Video-ColdStart.
Option2: You can train the model yourself:
Download the base model from TinyLLaVA-Video.
Replace data paths and model paths with yours in scripts/train/train_qwen2_coldstart.sh
bash scripts/train/train_qwen2_coldstart.sh
Replace data paths and output_dir with yours in scripts/train/train_qwen2_reason_nextqa.sh
bash scripts/train/train_qwen2_reason_nextqa.sh
We currently provide evaluations on 4 benchmarks, including Video-MME, MVBench, MLVU, MMVU.
- Download Video-MME and put it under
path/to/your/dataset/eval/Video-MME
. - Please change
MODEL_PATH
,MODEL_NAME
,EVAL_DIR
,conv-mode
andduration
inscripts/eval/videomme.sh
. There are three types ofduration
available for testing:short
,medium
, andlong
. - Please use the following command for single-gpu inference.
CUDA_VISIBLE_DEVICES=0 bash scripts/eval/videomme.sh
- Download MVBench and put it under
path/to/your/dataset/eval/MVBench
. - Please change
MODEL_PATH
,MODEL_NAME
,EVAL_DIR
andconv-mode
inscripts/eval/mvbench.sh
. - Please use the following command for single-gpu inference.
CUDA_VISIBLE_DEVICES=0 bash scripts/eval/mvbench.sh
- Download MLVU and put it under
path/to/your/dataset/eval/MLVU
. - Please change
MODEL_PATH
,MODEL_NAME
,EVAL_DIR
andconv-mode
inscripts/eval/mlvu.sh
. - Please use the following command for single-gpu inference.
CUDA_VISIBLE_DEVICES=0 bash scripts/eval/mlvu.sh
- Download MMVU and put it under
path/to/your/dataset/eval/MMVU
. - Please change
MODEL_PATH
,MODEL_NAME
,EVAL_DIR
andconv-mode
inscripts/eval/mmvu.sh
. - Please use the following command for single-gpu inference.
CUDA_VISIBLE_DEVICES=0 bash scripts/eval/mmvu.sh
- Please change
model_path
,prompt
andvideo_file
ineval.py
. - Please use the following command for single-gpu inference.
CUDA_VISIBLE_DEVICES=0 python eval.py
The performance of TinyLLaVA-Video-R1 on multiple benchmarks. "Option" indicates that the model only needs to answer with the selected choice, while "Reason" means the model must output both the answer and the reasoning process according to the format requirements. Here, MMVU is categorized as a video reasoning benchmark, the remaining benchmarks are designed for general-purpose video evaluation. The best results are indicated by boldface.
The performance of TinyLLaVA-Video-R1 is significantly higher than TinyLLaVA-Video-ColdStart, especially in benchmarks that test reasoning abilities such as MMVU. Moreover, it outperforms TinyLLaVA-Video-SFT across all benchmarks, highlighting the effectiveness of the reinforcement learning approach employed.
TinyLLaVA-Video-R1 exhibits "aha moments" where it revisits and refines its initial reasoning. As shown in the image below, the model self-corrects by evaluating different options and improving its responses, which enhances accuracy and interpretability. This reflective behavior distinguishes it from traditional models, offering greater transparency in the reasoning process.
If you find our work interesting and helpful, please consider giving our repo a star. Additionally, if you would like to cite our work, please use the following format:
@article{zhang2025tinyllava,
title={TinyLLaVA-Video-R1: Towards Smaller LMMs for Video Reasoning},
author={Zhang, Xingjian and Wen, Siwei and Wu, Wenjun and Huang, Lei},
journal={arXiv preprint arXiv:2504.09641},
year={2025}
}
If you have any questions or suggestions, please feel free to contact us at [email protected]
.
- This repository is based on TinyLLaVA-Video project.
- The implementation of the GRPO algorithm refers to the open-r1-multimodal project. Great work!