-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Fix incorrect attention mask truncate in WhisperFlashAttention2 #36477
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
Conversation
|
Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. When it is ready for review, please click the |
|
cc @eustlb |
Co-authored-by: Anton Vlasjuk <[email protected]>
|
It would be great to merge this fix! cc @eustlb |
eustlb
left a comment
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.
LGTM! Great catch, thanks a lot 🤗
|
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. |
What does this PR do?
Fixes incorrect attention calculation when training Whisper with Flash Attention 2 and passing
decoder_attention_maskwith some values set toFalse.This error might've been made when copying the same truncating code from the other attention implementations. The problem is that in
WhisperFlashAttention2the dimensions have been transposed.cc @sanchit-gandhi @ylacombe