[mem_cache] Clean up SWA/Mamba radix cache leftovers and drop SGLANG_ENABLE_UNIFIED_RADIX_TREE (#40780)

This commit is contained in:
Liangsheng Yin
2026-09-22 15:40:57 -07:00
committed by GitHub
parent 19ee4b566b
commit d34f7b2326
37 changed files with 107 additions and 408 deletions
@@ -36,7 +36,6 @@ from sglang.srt.configs.hybrid_arch import (
)
from sglang.srt.configs.model_config import ModelImpl, is_deepseek_dsa
from sglang.srt.environ import envs
from sglang.srt.hardware_backend.mlx.runtime import use_mlx
from sglang.srt.managers.mm_schedule import init_mm_embedding_cache
from sglang.srt.mem_cache.base_swa_memory_pool import BaseSWAKVPool
from sglang.srt.mem_cache.cache_init_params import CacheInitParams
@@ -314,12 +313,6 @@ def build_kv_cache(
and get_disagg().disaggregation_mode == "decode"
):
if is_hybrid_swa:
if not (envs.SGLANG_ENABLE_UNIFIED_RADIX_TREE.get() or use_mlx()):
raise ValueError(
"--disaggregation-decode-enable-radix-cache with sliding "
"window attention (SWA) models requires the unified radix "
"tree (set SGLANG_ENABLE_UNIFIED_RADIX_TREE=1)."
)
if enable_hierarchical_cache:
raise ValueError(
"--disaggregation-decode-enable-radix-cache with sliding "