Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

processing_qwen2_vl IndexError: index 0 is out of bounds for dimension 0 with size 0 #967

Open
susht3 opened this issue Mar 18, 2025 · 1 comment

Comments

@susht3
Copy link

susht3 commented Mar 18, 2025

when i use grpo to train qwen2.5 vl model, i got thie error:
[rank3]: Traceback (most recent call last):
[rank3]: File "/mnt/afs/VLM-R1/src/open-r1-multimodal/src/open_r1/grpo_rdbp.py", line 514, in
[rank3]: main(script_args, training_args, model_args)
[rank3]: File "/mnt/afs/VLM-R1/src/open-r1-multimodal/src/open_r1/grpo_rdbp.py", line 503, in main
[rank3]: trainer.train()
[rank3]: File "/mnt/afs/conda/vlm-r1/lib/python3.10/site-packages/transformers/trainer.py", line 2241, in train
[rank3]: return inner_training_loop(
[rank3]: File "/mnt/afs/conda/vlm-r1/lib/python3.10/site-packages/transformers/trainer.py", line 2548, in _inner_training_loop
[rank3]: tr_loss_step = self.training_step(model, inputs, num_items_in_batch)
[rank3]: File "/mnt/afs/conda/vlm-r1/lib/python3.10/site-packages/transformers/trainer.py", line 3698, in training_step
[rank3]: loss = self.compute_loss(model, inputs, num_items_in_batch=num_items_in_batch)
[rank3]: File "/mnt/afs/mllm/VLM-R1/src/open-r1-multimodal/src/open_r1/trainer/grpo_trainer.py", line 433, in compute_loss
[rank3]: prompt_inputs = self.processing_class(
[rank3]: File "/mnt/afs/conda/vlm-r1/lib/python3.10/site-packages/transformers/models/qwen2_vl/processing_qwen2_vl.py", line 139, in call
[rank3]: self.image_token, "<|placeholder|>" * (image_grid_thw[index].prod() // merge_length), 1
[rank3]: IndexError: index 0 is out of bounds for dimension 0 with size 0

@LIRENDA621
Copy link

same error, How to fix it?

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

No branches or pull requests

2 participants