[Core][Mamba] Remove leftovers of mamba_cache_mode="all" (#60043)

Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
Signed-off-by: Jiangyun Zhu <zhujiangyun@inferact.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Jiangyun Zhu
2026-10-13 00:58:59 -07:00
committed by GitHub
co-authored by Claude Opus 5.5 mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent bc3ddb198a
commit 2cc2e68d1c
33 changed files with 161 additions and 344 deletions
+15 -3
View File
@@ -453,6 +453,12 @@ _LOG_CONFIG_FILE_DEPRECATION_MESSAGE = (
)
_MAMBA_CACHE_MODE_DEPRECATION_MESSAGE = (
"--mamba-cache-mode is deprecated and will be removed in v0.33.0. "
"It has no effect: Mamba prefix caching follows --enable-prefix-caching."
)
_DISABLE_CASCADE_ATTN_DEPRECATION_MESSAGE = (
"--disable-cascade-attn is deprecated and has no effect since cascade "
"attention has been removed. It will be removed in v0.33.0."
@@ -798,7 +804,7 @@ class EngineArgs:
mamba_ssm_cache_dtype: MambaDType = CacheConfig.mamba_ssm_cache_dtype
mamba_block_size: int | None = get_field(CacheConfig, "mamba_block_size")
prefix_match_unit: int | None = get_field(CacheConfig, "prefix_match_unit")
mamba_cache_mode: MambaCacheMode = CacheConfig.mamba_cache_mode
mamba_cache_mode: MambaCacheMode | None = None
enable_mamba_shared_prefix_checkpoint: bool = (
CacheConfig.enable_mamba_shared_prefix_checkpoint
)
@@ -1403,7 +1409,12 @@ class EngineArgs:
"--prefix-match-unit", **cache_kwargs["prefix_match_unit"]
)
cache_group.add_argument(
"--mamba-cache-mode", **cache_kwargs["mamba_cache_mode"]
"--mamba-cache-mode",
**{
**cache_kwargs["mamba_cache_mode"],
"default": None,
"help": _MAMBA_CACHE_MODE_DEPRECATION_MESSAGE,
},
)
cache_group.add_argument(
"--enable-mamba-shared-prefix-checkpoint",
@@ -2263,6 +2274,8 @@ class EngineArgs:
assert self.enable_prefix_caching is not None, (
"enable_prefix_caching must be set by this point"
)
if self.mamba_cache_mode is not None:
logger.warning_once(_MAMBA_CACHE_MODE_DEPRECATION_MESSAGE)
cache_config = CacheConfig(
block_size=self.block_size, # type: ignore[arg-type]
@@ -2282,7 +2295,6 @@ class EngineArgs:
mamba_ssm_cache_dtype=self.mamba_ssm_cache_dtype,
mamba_block_size=self.mamba_block_size,
prefix_match_unit=self.prefix_match_unit,
mamba_cache_mode=self.mamba_cache_mode,
enable_mamba_shared_prefix_checkpoint=(
self.enable_mamba_shared_prefix_checkpoint
),