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 incorrect attention mask truncate in WhisperFlashAttention2 #36477

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

OliBomby
Copy link

@OliBomby OliBomby commented Feb 28, 2025

What does this PR do?

Fixes incorrect attention calculation when training Whisper with Flash Attention 2 and passing decoder_attention_mask with some values set to False.

This error might've been made when copying the same truncating code from the other attention implementations. The problem is that in WhisperFlashAttention2 the dimensions have been transposed.

cc @sanchit-gandhi @ylacombe

@github-actions github-actions bot marked this pull request as draft February 28, 2025 14:24
Copy link

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 Ready for review button (at the bottom of the PR page).

@OliBomby OliBomby marked this pull request as ready for review February 28, 2025 14:25
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.

1 participant