[Bugfix][KV Cache] Don't route uniform-page-size MLA+SWA models into DeepseekV4 packing (#48256)

Signed-off-by: NickLucche <nicolo.lucchesi@mistral.ai>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Nicolò Lucchesi
2026-07-13 08:16:24 +00:00
committed by GitHub
co-authored by Claude
parent bea70c7cfc
commit 56a357ed33
2 changed files with 48 additions and 0 deletions
+5
View File
@@ -1535,6 +1535,11 @@ def group_and_unify_kv_cache_specs(
):
return None
# SlidingWindowMLASpec models with uniform page sizes don't need tuple packing.
page_sizes = {spec.page_size_bytes for spec in kv_cache_spec.values()}
if len(page_sizes) <= 1:
return None
mla_specs: dict[str, KVCacheSpec] = {}
grouped_swa_mla_specs: dict[tuple[int, int], dict[str, KVCacheSpec]] = defaultdict(
dict