Closed tctrautman closed 2 months ago
@tctrautman Right, there was a bug in Idefics and I opened a PR to fix it.
Please update transformers
after it is merged with:
!pip install --upgrade git+https://github.com/huggingface/transformers.git
I just ran git clone
and installed with pip install -e .
. I can reproduce the error, is there a solution?
@EricLBuehler the PR is not merged yet, the error will be fixed as soon as it's merged.
A workround can be to use_cache=False
in generate()
, but that will result in a very slow generation so I'd recommend to wait for the PR merge :)
Ah, ok. I just opened #31380, so I'll close it when #31377 is merged.
Thank you, @zucchini-nlp!
System Info
The environment in the Idefics2 - Fine-tuning colab
Who can help?
@amyeroberts @zucchini-nlp
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Expected behavior
model.generate(...) should run without throwing
RuntimeError: shape mismatch: value tensor of shape [64, 4096] cannot be broadcast to indexing result of shape [0, 4096]