-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
[V1] [Hybrid] Add new test to verify that hybrid views into KVCacheTensor are compatible #21300
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
[V1] [Hybrid] Add new test to verify that hybrid views into KVCacheTensor are compatible #21300
Conversation
Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
👋 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 🚀 |
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 adds a new test to verify the compatibility of hybrid attention/mamba views into the KVCacheTensor. To ensure full compatibility, the test should also verify that the mamba blocks retain their expected values after the attention blocks are written.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
eaba4fc
to
a95f4b5
Compare
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.
Thank you very much.
…nsor are compatible (vllm-project#21300) Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
…nsor are compatible (vllm-project#21300) Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com> Signed-off-by: qizixi <qizixi@meta.com>
…nsor are compatible (vllm-project#21300) Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
Essential Elements of an Effective PR Description Checklist
supported_models.md
andexamples
for a new model.Purpose
When running hybrid (attention/mamba) models in V1, the different types of layers share the same KVCacheTensor, by having different views into it. When implementing the support, care had to be taken to ensure that these two views are "compatible" in the sense that writing to a block in the mamba view will not corrupt the data in a different block in the attention view. I have found mistakes here are a bit tricky to catch since they don't necessarily show up until you start filling up all of the blocks. This PR adds a test to explicitly verify the compatibility of these views.
I would like to have this test in place before we verify the solution in #21123 to the large block size problem. It will also be helpful to have the test in place when we add the additional support for attention backends with (2, num_blocks) layout.
cc @heheda12345 @tlrmchlsmth
Test Plan
See diff
Test Result
Passing locally
(Optional) Documentation Update