From b2f7d2560ae66122bb90b670d8c626216dc48f5f Mon Sep 17 00:00:00 2001 From: Michael Goin Date: Tue, 14 Jul 2026 12:53:34 -0400 Subject: [PATCH] [Bugfix] Make MLA+SWA check the layer's backend, not the model config (#48520) Signed-off-by: mgoin --- vllm/model_executor/layers/attention/attention.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vllm/model_executor/layers/attention/attention.py b/vllm/model_executor/layers/attention/attention.py index db3dffa854..d8c4cf80ba 100644 --- a/vllm/model_executor/layers/attention/attention.py +++ b/vllm/model_executor/layers/attention/attention.py @@ -628,8 +628,8 @@ class Attention(nn.Module, AttentionLayerBase): assert self.attn_type == AttentionType.DECODER quant_mode = get_kv_quant_mode(self.kv_cache_dtype) if self.sliding_window is not None: - assert not vllm_config.model_config.use_mla, ( - "MLA is not supported for slidingwindow" + assert not self.attn_backend.is_mla(), ( + "MLA is not supported for sliding window" ) # SW chooses its own block_size, decoupled from the user's # ``--block-size`` (which only constrains primary attention).