-
Notifications
You must be signed in to change notification settings - Fork 26.1k
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
Fix Gemma2 4d attention mask #31674
Fix Gemma2 4d attention mask #31674
Conversation
Gemma2 finetuning cannot work until merging huggingface/transformers#31674
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, with this we do avoid the overflow!
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. |
Update modeling_gemma2.py Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
The patch is out for this! Thanks again 🤗 https://pypi.org/project/transformers/4.42.2/ |
Gemma2 finetuning cannot work until merging huggingface/transformers#31674
Thank you all for your hard work. I've been dealing with this issue recently as well. |
Gemma2 finetuning cannot work until merging huggingface/transformers#31674
What does this PR do?
(Might) continuation of #31670
Fixes #31673
The attention mask here should be a 4d mask, while the current implementation mistakenly treated it as a 2d mask. Additionally, the mask needs to be inverted to prevent label leakage.
Before this pr:
After this pr:
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@ArthurZucker