[Fix] Land the decode mamba checkpoint depth on the tree page under DCP (#35412)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Ke Bao <ispobaoke@gmail.com>
This commit is contained in:
Khoa Pham
2026-08-20 12:15:42 -07:00
committed by GitHub
co-authored by Claude Opus 5 Ke Bao
parent 308bc1228b
commit eac91ac362
9 changed files with 60 additions and 19 deletions
+8
View File
@@ -1490,6 +1490,14 @@ def mamba_checkpoint_grid(tree_page: int) -> int:
return math.lcm(mamba_cache_chunk_size(), tree_page)
def mamba_track_grid(tree_page: int) -> int:
"""The same granularity for a decode-donated checkpoint, which additionally
has to land on the requested ``mamba_track_interval``."""
return math.lcm(
mamba_checkpoint_grid(tree_page), get_exec().mamba.mamba_track_interval
)
def max_speculative_num_draft_tokens() -> int | None:
"""The largest draft-token count speculative decoding may use.