-
Notifications
You must be signed in to change notification settings - Fork 27.8k
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
Idefics 2 fixed bug shown up again #33763
Labels
Comments
aroun-coumar
added a commit
to aroun-coumar/transformers
that referenced
this issue
Sep 27, 2024
5 tasks
Hey @amyeroberts I have created a PR before you created and got a review approved Thanks |
#33766 This is the PR |
Hi @aroun-coumar, apologies for the duplicated work. I saw #33752 first, and so opened a PR for that issue. Your PR was opened first, so let's merge that one in. |
amyeroberts
pushed a commit
that referenced
this issue
Sep 30, 2024
Closed
4 tasks
ArthurZucker
pushed a commit
that referenced
this issue
Oct 7, 2024
BernardZach
pushed a commit
to BernardZach/transformers
that referenced
this issue
Dec 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System Info
transformers
version: 4.45.1Who can help?
@amyeroberts @qubvel
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Just run the official code from https://huggingface.co/HuggingFaceM4/idefics2-8b for idefics2-8b can reproduce the bug.
Expected behavior
File ~/miniconda3/envs/llava/lib/python3.10/site-packages/transformers/models/idefics2/modeling_idefics2.py:1296, in Idefics2Model.inputs_merger(self, input_ids, inputs_embeds, image_hidden_states)
1294 new_inputs_embeds = inputs_embeds.clone()
1295 reshaped_image_hidden_states = image_hidden_states.view(-1, vision_hidden_size)
-> 1296 new_inputs_embeds[special_image_token_mask] = reshaped_image_hidden_states
1297 return new_inputs_embeds
RuntimeError: shape mismatch: value tensor of shape [640, 4096] cannot be broadcast to indexing result of shape [0, 4096]
The bug was first reported in #31380. I can confirm it is fixed in
transformers
version: 4.45.0-dev. However, as I upgraded to 4.45.1, it shows up again.The text was updated successfully, but these errors were encountered: