Repository navigation
Fix pix2struct - #34374
Fix pix2struct#34374
Conversation
|
In transformers v4.46 generation for Pix2Struct fail when setting Code to reproduce this issue : https://huggingface.co/docs/transformers/v4.46.0/en/model_doc/pix2struct#transformers.Pix2StructForConditionalGeneration.forward.example with |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
ArthurZucker
left a comment
There was a problem hiding this comment.
Thanks! can you add the snippet as a test? 🤗
|
@ArthurZucker I added a small quick test |
|
there's one thing I don't understand, running the same test with T5 passes even without eval mode, but it was necessary to get it passing for pix2struct. |
ArthurZucker
left a comment
There was a problem hiding this comment.
Thanks, did not have the chance to approve but LGTM 🤗
* fix * fix and test use_cache test * style * remove atol
* fix * fix and test use_cache test * style * remove atol
What does this PR do?
In #34089 some stuff might have not being copied correctly from T5. In pix2struct case past_key_value was being overridden by the first attention block, resulting in failure in cross attention.
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.