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 seq_len for padding sequences #318

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

madamczykhabana
Copy link

Before the fix we used seq_len=0 for padding samples. This was later translated to an empty attention_mask (since we don't have any tokens that we should include in calculations) and in turn caused NaNs in prompt attention (0 divided by 0). Those NaNs later got propagated to kv-cache causing issues in flat_pa.

@madamczykhabana madamczykhabana added the habana Issues or PRs submitted by Habana Labs label Sep 23, 2024
@michalkuligowski michalkuligowski merged commit aa507d4 into habana_main Sep 23, 2024
16 checks passed
@madamczykhabana madamczykhabana deleted the dev/madamczyk/fix_bs_padding_seq_len branch September 23, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
habana Issues or PRs submitted by Habana Labs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants