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

[Core] Support all head sizes up to 256 with FlashAttention backend #8910

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

Conversation

njhill
Copy link
Member

@njhill njhill commented Sep 27, 2024

We were previously restricting to specific sizes, but the native FA kernels pad and support arbitrary sizes up to 256.

We were previously restricting to specific sizes, but the native FA kernels pad and support arbitrary sizes up to 256.
@njhill njhill requested a review from WoosukKwon September 27, 2024 17:37
Copy link
Collaborator

@tlrmchlsmth tlrmchlsmth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some unit tests? Looks like we may be able to just extend this list here🤞

# FlashAttention forward only supports head dimension at most 128
# https://github.com/ROCmSoftwarePlatform/flash-attention/blob/3d2b6f5d037782cc2c906909a46fb7e2e1b48b25/csrc/flash_attn_rocm/flash_api.cpp#L62
HEAD_SIZES = [64, 80, 96, 112, 120, 128, 192, 256]

@vllm-project vllm-project deleted a comment from github-actions bot Sep 27, 2024
@njhill
Copy link
Member Author

njhill commented Sep 27, 2024

Looks like we need to build flash without the FLASHATTENTION_DISABLE_UNEVEN_K flag, have opened vllm-project/flash-attention#21 ... @WoosukKwon wdyt?

Copy link

This pull request has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this pull request should remain open. Thank you!

@github-actions github-actions bot added the stale Over 90 days of inactivity label Feb 25, 2025
Copy link

mergify bot commented Feb 25, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @njhill.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Feb 25, 2025
@github-actions github-actions bot added unstale Recieved activity after being labelled stale and removed stale Over 90 days of inactivity labels Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase unstale Recieved activity after being labelled stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants