Giter Site home page Giter Site logo

Idefics 2: shape mismatch: value tensor of shape [320, 4096] cannot be broadcast to indexing result of shape [0, 4096] about transformers HOT 6 CLOSED

EricLBuehler avatar EricLBuehler commented on July 20, 2024
Idefics 2: shape mismatch: value tensor of shape [320, 4096] cannot be broadcast to indexing result of shape [0, 4096]

from transformers.

Comments (6)

mdmev avatar mdmev commented on July 20, 2024 2

@zucchini-nlp I was able to solve the issue by setting "use_cache" to true in the generation_config.json. I'm not sure if this is the best solution for the model, but it works for now. Thanks! Please let me know if there is another way to fix it so I can share the model.

from transformers.

EricLBuehler avatar EricLBuehler commented on July 20, 2024

Perhaps #31377 would fix this?

from transformers.

mdmev avatar mdmev commented on July 20, 2024

Hello,
I am experiencing the same error. I recently upgraded the version of transformers as suggested in #31377. It works correctly when using the idefics-2 model from Hugging Face, but I still encounter the same error when using a fully fine-tuned model of my own. Do you have any suggestions on how to fix this?

from transformers.

zucchini-nlp avatar zucchini-nlp commented on July 20, 2024

@mdmev hey! If the error is only in custom-tuned model, it might be related to model's config/generation_config. Can you pls share the model you're using so that I can try to reproduce it?

from transformers.

zucchini-nlp avatar zucchini-nlp commented on July 20, 2024

@mdmev Oke, thanks! But actually Idefics2 should be able to generate without caching, so let me know which model and script you're using. I'll investigate it a bit

from transformers.

github-actions avatar github-actions commented on July 20, 2024

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

from transformers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.