-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
[v1][attention] Support Hybrid Allocator + FlashInfer #21412
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Chen Zhang <zhangch99@outlook.com>
Signed-off-by: Chen Zhang <zhangch99@outlook.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 🚀 |
Warning Gemini is unable to generate a review due to a potential policy violation. |
Signed-off-by: Chen Zhang <zhangch99@outlook.com>
@LucasWilkinson seems that we met the same problem when hybrid allocator is disabled as here. #21093 (comment) |
For models like Gemma 3, is it using flash-attn for global attn and flashinfer for sliding window attn? |
@WoosukKwon No, all layers are using flashinfer. Mixing flash-attn + flashinfer should be easy with the current design but prefer to put it into next pr if you think it is needed. |
@heheda12345 Great. I think we shouldn't mix the two. |
This pull request has merge conflicts that must be resolved before it can be |
Essential Elements of an Effective PR Description Checklist
supported_models.md
andexamples
for a new model.Purpose
Support hybrid allocator + flashinfer backend. Achieved by letting the attention backend know the set of layers that use this backend, and only performs plan for these layers.
Limitation:
For a model with both sliding window attention and full attention, when hybrid allocator is disabled, both the two types of layer use the same attention metadata builder, and flashinfer cannot handle this case. As a temporary solution, I add an error message to tell user to set disable_sliding_window manually. (This config was set automatically when using flashinfer backend before this PR).
Test Plan
Run basic.py with "google/gemma-3-1b-it"
Test Result
Not cap the max length to the sliding window size, and generate meaningful result
(Optional) Documentation Update