Add support for chunked attention#597
Merged
michalkuligowski merged 3 commits intoNov 20, 2025
Merged
Conversation
Signed-off-by: Jan Kaniecki <jkaniecki@habana.ai> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jan Kaniecki <jkaniecki@habana.ai>
Signed-off-by: Jan Kaniecki <jan.kaniecki@intel.com>
Signed-off-by: Jan Kaniecki <jan.kaniecki@intel.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for chunked attention mechanisms, cherry-picked from the vllm-gaudi repository. The implementation introduces the ability to process attention in fixed-size chunks, which can improve memory efficiency for certain model architectures.
Key Changes
- Added
_set_attn_bias_for_chunked_attentionmethod to compute attention biases for chunked attention patterns - Extended metadata structures to include chunked attention-specific fields (block mappings, usage, groups)
- Modified attention flow to conditionally use chunked attention based on model configuration
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| vllm_gaudi/v1/worker/hpu_model_runner.py | Main implementation of chunked attention support including metadata updates, block mapping logic, and model configuration detection |
| vllm_gaudi/v1/attention/backends/hpu_attn.py | Extended decode metadata factory method to accept chunked attention parameters |
| vllm_gaudi/attention/backends/hpu_attn.py | Added chunked attention metadata fields and conditional logic in attention forward pass |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
✅ CI PassedAll checks passed successfully against the following vllm commit: |
michalkuligowski
approved these changes
Nov 20, 2025
6feb010
into
vllm-project:releases/v0.11.1
38 checks passed
jkaniecki
added a commit
to jkaniecki/vllm-gaudi
that referenced
this pull request
Nov 21, 2025
Cherry-pick of vllm-project@6e1be4e --------- Signed-off-by: Jan Kaniecki <jkaniecki@habana.ai> Signed-off-by: Jan Kaniecki <jan.kaniecki@intel.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
wpyszka
pushed a commit
that referenced
this pull request
Nov 21, 2025
jkaniecki
added a commit
to jkaniecki/vllm-gaudi
that referenced
this pull request
Dec 4, 2025
Cherry-pick of vllm-project@6e1be4e --------- Signed-off-by: Jan Kaniecki <jkaniecki@habana.ai> Signed-off-by: Jan Kaniecki <jan.kaniecki@intel.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jkaniecki
added a commit
to jkaniecki/vllm-gaudi
that referenced
this pull request
Dec 4, 2025
Cherry-pick of vllm-project@6e1be4e --------- Signed-off-by: Jan Kaniecki <jkaniecki@habana.ai> Signed-off-by: Jan Kaniecki <jan.kaniecki@intel.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jkaniecki
added a commit
to jkaniecki/vllm-gaudi
that referenced
this pull request
Dec 4, 2025
Cherry-pick of vllm-project@6e1be4e --------- Signed-off-by: Jan Kaniecki <jkaniecki@habana.ai> Signed-off-by: Jan Kaniecki <jan.kaniecki@intel.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
kfojcik-intel
pushed a commit
to kfojcik-intel/vllm-gaudi
that referenced
this pull request
Jan 13, 2026
Cherry-pick of vllm-project@6e1be4e --------- Signed-off-by: Jan Kaniecki <jkaniecki@habana.ai> Signed-off-by: Jan Kaniecki <jan.kaniecki@intel.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
mgawarkiewicz-intel
pushed a commit
that referenced
this pull request
Jan 15, 2026
Cherry-pick of 6e1be4e --------- --------- Signed-off-by: Jan Kaniecki <jkaniecki@habana.ai> Signed-off-by: Jan Kaniecki <jan.kaniecki@intel.com> Signed-off-by: Katarzyna Fojcik <kfojcik@habana.ai> Co-authored-by: Jan Kaniecki <jkaniecki@habana.ai> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Iryna Boiko <iboiko@habana.ai>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Cherry-pick of 6e1be4e