Skip to content
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 sliding window attention #35691

Closed
wants to merge 2 commits into from
Closed

Conversation

pcuenca
Copy link
Member

@pcuenca pcuenca commented Jan 14, 2025

Fixes https://huggingface.co/google/paligemma2-10b-pt-896/discussions/4

Not visible on the 448 model because the input sequence is << than the sliding window.

This was lost in the big attention refactor. I'm not sure if we're supposed to deal with it differently.

@pcuenca pcuenca requested a review from ArthurZucker as a code owner January 14, 2025 11:17
@pcuenca pcuenca requested review from Cyrilvallez and ArthurZucker and removed request for ArthurZucker January 14, 2025 11:39
@HuggingFaceDocBuilderDev

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.

@Cyrilvallez
Copy link
Member

Hey @pcuenca! Thanks for looking into this! I noticed the issue yesterday and opened #35681 already (there is also a logic issue in the masking and slicing!)

@pcuenca
Copy link
Member Author

pcuenca commented Jan 14, 2025

Yes, saw it but was not sure if it fixed the same issue as the title mentioned Flash Attention and I saw no sliding_window arg being passed, IIRC (I see it's there now). Closing then!

@pcuenca pcuenca closed this Jan 14, 2025
@Cyrilvallez
Copy link
Member

Yes, I added it today! Thanks for double-checking!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants