[Attention] Make sliding-window support an explicit backend capability (#48011)

Signed-off-by: NickLucche <nicolo.lucchesi@mistral.ai>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
Nicolò Lucchesi
2026-07-13 01:07:56 -07:00
committed by GitHub
co-authored by Claude Opus 4.8 Andreas Karatzas
parent 75fe92a316
commit bea70c7cfc
10 changed files with 41 additions and 0 deletions
@@ -355,6 +355,7 @@ class Attention(nn.Module, AttentionLayerBase):
use_mm_prefix=self.use_mm_prefix,
use_per_head_quant_scales=use_per_head_quant_scales,
attn_type=attn_type,
has_sliding_window=sliding_window is not None,
)
else:
self.attn_backend = attn_backend