Repository navigation
Conversation
alphabetc1
marked this pull request as ready for review
October 4, 2026 16:29
Collaborator
Author
|
/rerun-test -c |
Contributor
|
⛔ |
Collaborator
Author
|
/rerun-test test/registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_mamba.py |
Contributor
|
Collaborator
Author
|
/rerun-test test/registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_mamba.py |
Contributor
|
🚀 |
ispobock
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
TestUnifiedMambaHiCache.test_multiturn_logprobs_matchcan reject a valid checkpoint after KV-memory retraction. This CI job expected at least 4864 cached tokens but received 4839.Retraction discards the in-flight decode checkpoint. Resumed prefill saves states relative to the recovered prefix:
4391 + floor(491 / 64) * 64 = 4839. If generation ends before the next absolute decode checkpoint, that prefix-relative checkpoint is the one available for reuse. The same assertion failure reproduced twice on unmodified main withcached_tokens=4820.Modifications
Keep the shared Mamba decode-cache assertion strict by default. Add an explicit
max_checkpoint_lagoption and set it to 63 tokens (less than one 64-token prefill chunk) only forTestUnifiedMambaHiCache, whose 12,000-token KV pool and four concurrent requests can trigger retraction. Other callers and zero-output assertions keep their original bounds. The existing KL replay and threshold are unchanged. No retraction metadata plumbing is needed.Two files change: the assertion helper and the Mamba HiCache test configuration. No inference implementation or callback interface changes.
Accuracy Tests
4864 -> 4820; all four pass with the fix.TestUnifiedMambaHiCachetests in 313 seconds. GSM8K accuracy: 0.950. The three KL averages were 0.003134, 0.002697, and 0.003543, all below the unchanged 0.005 threshold. The log confirms a natural retraction during the prefill-branching test.cached_tokens=0andnum_retractions=0, 11 of 24 requests exceeded 0.005 in the aligned-dependency cold control. This per-request screening is stricter than the registered batch-average assertion; registered batch-average KL failures also occurred in the B300 matrices. These results do not establish retraction-specific state corruption, nor do they rule out subtler numerical issues. No KL threshold was relaxed. The constructed B300 pressure inputs differ from the original CI inputs.Speed Tests and Profiling
Not applicable: test-only change.
CI States
Latest PR Test (Base): ❌ Run #37409487107
Latest PR Test (Extra): ❌ Run #37409486896
Latest PR Test (AMD ROCm 10): ❌ Run #37409487157