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

Example of using key_padding_mask for flash attention v2 #530

Open
YJYJLee opened this issue Sep 8, 2023 · 1 comment
Open

Example of using key_padding_mask for flash attention v2 #530

YJYJLee opened this issue Sep 8, 2023 · 1 comment

Comments

@YJYJLee
Copy link

YJYJLee commented Sep 8, 2023

  1. Could anyone provide a good example of using key_padding_mask for flash attention v2?
    key_padding_mask is used to mask out the keys (shape [B, 1, 1, N])

  2. Is it possible to use key_padding_mask and causal mask together?

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

No branches or pull requests

2 participants