[Bugfix] Make MLA+SWA check the layer's backend, not the model config (#48520)

Signed-off-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
Michael Goin
2026-07-14 09:53:34 -07:00
committed by GitHub
parent 1ff9429655
commit b2f7d2560a
@@ -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).