[Bugfix][Spec Decode] Cache the Mamba state at the block-grid position of EAGLE resume (#53945)

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
Signed-off-by: Adam Shaver <ashaver@nvidia.com>
Signed-off-by: akshaver <168006157+akshaver@users.noreply.github.com>
Co-authored-by: wzhao18 <wzhao18.sz@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: roikoren755 <26850796+roikoren755@users.noreply.github.com>
This commit is contained in:
akshaver
2026-09-08 09:59:58 -04:00
committed by GitHub
co-authored by wzhao18 Claude Opus 5 roikoren755
parent 414057a3d3
commit 263c4ff95f
12 changed files with 710 additions and 21 deletions
+10
View File
@@ -726,6 +726,9 @@ class EngineArgs:
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
enable_mamba_fine_grained_prefix_cache: bool = (
CacheConfig.enable_mamba_fine_grained_prefix_cache
)
replayssm_buffer_len: int = CacheConfig.replayssm_buffer_len
use_replayssm: bool = CacheConfig.use_replayssm
@@ -1287,6 +1290,10 @@ class EngineArgs:
cache_group.add_argument(
"--mamba-cache-mode", **cache_kwargs["mamba_cache_mode"]
)
cache_group.add_argument(
"--enable-mamba-fine-grained-prefix-cache",
**cache_kwargs["enable_mamba_fine_grained_prefix_cache"],
)
cache_group.add_argument(
"--replayssm-buffer-len", **cache_kwargs["replayssm_buffer_len"]
)
@@ -2072,6 +2079,9 @@ class EngineArgs:
mamba_block_size=self.mamba_block_size,
prefix_match_unit=self.prefix_match_unit,
mamba_cache_mode=self.mamba_cache_mode,
enable_mamba_fine_grained_prefix_cache=(
self.enable_mamba_fine_grained_prefix_cache
),
replayssm_buffer_len=self.replayssm_buffer_len,
use_replayssm=self.use_replayssm,
kv_offloading_size=self.kv_offloading_size,