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

[Issue] Mismatch in tensor dimensions between 'input_ids' and 'output_ids' at the specified dimension. #18

Open
tarekdawey opened this issue Jun 12, 2024 · 2 comments

Comments

@tarekdawey
Copy link

Describe the issue

Hi ,
Thanks for your great work. I am trying to run the quick start as specified in the repository but facing this issue:

Traceback (most recent call last):
File "/media/local/tdawey/ViP-LLaVA/quick_start.py", line 17, in
eval_model(args)
File "/media/local/tdawey/ViP-LLaVA/llava/eval/run_llava.py", line 128, in eval_model
n_diff_input_output = (input_ids != output_ids[:, :input_token_len]).sum().item()
RuntimeError: The size of tensor a (53) must match the size of tensor b (16) at non-singleton dimension 1

Could you please look into this and explain why this is happening and help me resolve it?

@mu-cai
Copy link
Collaborator

mu-cai commented Jun 12, 2024

Hi taredawey, this is due to the transformers version mismatch.

I have updated run_llava.py, can you pull and test again?

@tarekdawey
Copy link
Author

Thanks a lot for your prompt response! It works now. I really appreciate you help.

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