-
-
Notifications
You must be signed in to change notification settings - Fork 11.7k
[V1] Support any head size for FlexAttention backend #20467
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f045e7a
[V1] Support any head size for FlexAttention backend
DarkLight1337 b552f38
Update v0_only
DarkLight1337 aa84091
Merge branch 'main' into v1-head-size
DarkLight1337 c6ba4ac
Avoid running out of shared memory
DarkLight1337 701df01
Check if importing metadata can pass the tests
DarkLight1337 31859db
Merge branch 'main' into v1-head-size
DarkLight1337 5fff602
Remove v0_only from tests
DarkLight1337 0b6e08c
Handle flex attention in MHA
DarkLight1337 909cc96
Fix initialization tests
DarkLight1337 b446359
Make classmethod
DarkLight1337 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,9 +33,6 @@ | |
| os.environ["VLLM_USE_TRITON_FLASH_ATTN"] = "0" | ||
|
|
||
| REQUIRES_V0_MODELS = [ | ||
| # V1 Test: no way to fall back for head_dim = 80 | ||
| # https://github.com/vllm-project/vllm/issues/14524 | ||
| "qwen_vl", | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This model actually has head size 128 |
||
| # V1 Test: not enough KV cache space in C1. | ||
| "fuyu", | ||
| ] | ||
|
|
@@ -221,8 +218,7 @@ | |
| marks=[large_gpu_mark(min_gb=32)], | ||
| ), | ||
| "blip2": VLMTestInfo( | ||
| # TODO: Change back to 2.7b once head_dim = 80 is supported | ||
| models=["Salesforce/blip2-opt-6.7b"], | ||
| models=["Salesforce/blip2-opt-2.7b"], | ||
| test_type=VLMTestType.IMAGE, | ||
| prompt_formatter=lambda img_prompt: f"Question: {img_prompt} Answer:", | ||
| img_idx_to_prompt=lambda idx: "", | ||
|
|
@@ -340,8 +336,7 @@ | |
| "h2ovl": VLMTestInfo( | ||
| models = [ | ||
| "h2oai/h2ovl-mississippi-800m", | ||
| # TODO: Re-enable once head_dim = 80 is supported | ||
| # "h2oai/h2ovl-mississippi-2b", | ||
| "h2oai/h2ovl-mississippi-2b", | ||
| ], | ||
| test_type=(VLMTestType.IMAGE, VLMTestType.MULTI_IMAGE), | ||
| prompt_formatter=lambda img_prompt: f"<|prompt|>{img_prompt}<|end|><|answer|>", # noqa: E501 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Fix the out-of-date documentation