-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
[Attention][DBO] Add support for "splitting" the CommonAttentionMetadata #21153
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
Conversation
Signed-off-by: Sage Moore <[email protected]>
Signed-off-by: Sage Moore <[email protected]>
Signed-off-by: Sage Moore <[email protected]>
Signed-off-by: Sage Moore <[email protected]>
Signed-off-by: Sage Moore <[email protected]>
Signed-off-by: Sage Moore <[email protected]>
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
Signed-off-by: Sage Moore <[email protected]>
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.
Code Review
This pull request introduces a mechanism to split CommonAttentionMetadata
, which is a prerequisite for dual batch overlap. The changes are well-contained and include new unit tests. I've identified a critical issue where the code could crash due to an unhandled edge case when creating a metadata slice for zero requests. A fix is suggested to prevent this runtime error.
Signed-off-by: Sage Moore <[email protected]>
Signed-off-by: Sage Moore <[email protected]>
Signed-off-by: Sage Moore <[email protected]>
Signed-off-by: Sage Moore <[email protected]>
Signed-off-by: Sage Moore <[email protected]>
Signed-off-by: Sage Moore <[email protected]>
Signed-off-by: Sage Moore <[email protected]>
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.
Overall looks good to me! Thanks for all the unit tests! Clean 🙂. Left a couple comments.
Signed-off-by: Sage Moore <[email protected]>
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.
LGTM!
Can you merge from main to see if the CI failures are fixed? |
…ata (vllm-project#21153) Signed-off-by: Sage Moore <[email protected]>
…ata (vllm-project#21153) Signed-off-by: Sage Moore <[email protected]> Signed-off-by: Jinzhen Lin <[email protected]>
…ata (vllm-project#21153) Signed-off-by: Sage Moore <[email protected]> Signed-off-by: Noam Gat <[email protected]>
…ata (vllm-project#21153) Signed-off-by: Sage Moore <[email protected]> Signed-off-by: Paul Pak <[email protected]>
…ata (vllm-project#21153) Signed-off-by: Sage Moore <[email protected]> Signed-off-by: Diego-Castan <[email protected]>
…ata (vllm-project#21153) Signed-off-by: Sage Moore <[email protected]>
…ata (vllm-project#21153) Signed-off-by: Sage Moore <[email protected]>
Purpose
Note: the infrastructure in this PR is currently unused outside of unit tests.
The purpose of this PR is to add a "splitting" mechanism to the
CommonAttentionMetadata
class. This PR is a prerequisite for Dual Batch Overlap (#20448 ) support in vllm. Splitting, in this context, means slicing a batch of requests along some mid point and generating two newCommonAttentionMetadata
instances. One for each "micro" batch.Test Plan
I added a number of unit tests to
test_attention_splitting.py
. These tests are largely focused on decode-only batches for now since that's all Dual Batch Overlap will initially support, but this infrastructure should support prefills and mixed batches without any issue.