Fix AttributeError in Gemma3ForConditionalGeneration and Gemma3ForSequenceClassification when config.return_dict=False#45277
Conversation
zucchini-nlp
left a comment
There was a problem hiding this comment.
Interesting, can_return_tuple already would force-set return_dict=True before calling the forward. Could you provide a reproducer?
pip install transformers==5.5.0 Error log - apr7_gemma3_v5_5_0.log |
zucchini-nlp
left a comment
There was a problem hiding this comment.
Huh indeed, i guess I am confusing it with another helper. Could you mark PR as ready for review?
I think there might be more models so if you have bandwidth, would be great to fix all at once. Dont worry if not :)
|
and run |
db6c323 to
6c20ba1
Compare
Sorry, I don’t have the bandwidth to look into other models at the moment. However, if I come across similar issues in other models in the future, I’ll make sure to raise a PR to fix them as well. Thanks for the review! |
|
To fix CI with |
…uenceClassification when config.return_dict=False
6c20ba1 to
f1b2e19
Compare
|
[For maintainers] Suggested jobs to run (before merge) run-slow: gemma3 |
|
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. |
…uenceClassification when config.return_dict=False (huggingface#45277) Co-authored-by: ctr-kkannan <ctr-kkannan@ext.tenstorrent.com> Co-authored-by: Raushan Turganbay <raushan@huggingface.co>

What does this PR do?
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@zucchini-nlp this is related to the
Gemma3Modelwrapper introduced in #37033, would appreciate your review!