A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 9, 11:15 UTC
[Bugfix] Add missing encoder only guard for do_kv_cache_update (#33269)
Signed-off-by: Gregory Shtrasberg <Gregory.Shtrasberg@amd.com>
Gregory Shtrasberg committed
Jan 28, 2026 at 15:25 UTC
ab597c869a78530fe6495ccda2bdc03f6f5c712e
1 file changed
+4
vllm/v1/attention/backends/triton_attn.py
+4
@@ -572,6 +572,10 @@ class TritonAttentionImpl(AttentionImpl):
572
kv_cache: torch.Tensor,
573
slot_mapping: torch.Tensor,
574
):
575
+ if self.attn_type in (AttentionType.ENCODER_ONLY, AttentionType.ENCODER):
576
+ # For encoder attention,
577
+ # we use direct Q, K, V tensors without caching
578
+ return
579
# For decoder and cross-attention, use KV cache as before
580
key_cache, value_cache = kv_cache.unbind(1)
581