[Bugfix] Make MLA+SWA check the layer's backend, not the model config (#48520)
Signed-off-by: mgoin <mgoin64@gmail.com>
Michael Goin committed
Jul 14, 2026 at 12:53 UTC
b2f7d2560ae66122bb90b670d8c626216dc48f5f
1 file changed
+2
-2
vllm/model_executor/layers/attention/attention.py
+2
-2
@@ -628,8 +628,8 @@ class Attention(nn.Module, AttentionLayerBase):
628
assert self.attn_type == AttentionType.DECODER
629
quant_mode = get_kv_quant_mode(self.kv_cache_dtype)
630
if self.sliding_window is not None:
631
- assert not vllm_config.model_config.use_mla, (
632
- "MLA is not supported for slidingwindow"
631
+ assert not self.attn_backend.is_mla(), (
632
+ "MLA is not supported for sliding window"
633
)
634
# SW chooses its own block_size, decoupled from the user's
635
# ``--block-size`` (which only constrains primary attention).