Skip to content

Fix flaky decode cache-hit check in Inkling test - #34405

Merged
ispobock merged 2 commits into
mainfrom
fix-flaky-decode-cache-hit-screen
Aug 11, 2026
Merged

ispobock merged 2 commits into
mainfrom
fix-flaky-decode-cache-hit-screen

Conversation

@ispobock

@ispobock ispobock commented Aug 11, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

test_input_output_logprobs_match_decode_cache_hit on TestInklingSmallNvfp4Deterministic reds intermittently with Too few decode cache hits: 16/32 while avg_kl_div stays 0.0. The hit count is not noise. A decode checkpoint is reusable only when a full sliding window of live SWA data survives below it, and out-of-window SWA slots are freed a page at a time, so the deepest reusable position is the last page boundary. With mamba_track_interval at its default 256 and --page-size 128 only every other page boundary carries a checkpoint, so a prompt hits iff (prompt_len + max_new_tokens) mod 256 < 128. That is half of them, an expected 16 of 32 against a screen needing 17, so the case has been one prompt away from red since it landed. Per-prompt agreement with that condition is 32/32, including the exact cached_tokens.

Matching the interval to the page size makes every page boundary a checkpoint, so the condition becomes an identity in the sequence length: 17/32 to 32/32 decode cache hits. min_cache_hit_ratio is then raised to require all 32, which turns a sampling floor into a guard and doubles what the case covers, since half the requests previously never reached decode-region state reuse.

4xB200, tp=4, only the interval changed:

test_input_output_logprobs_match ... ok
test_input_output_logprobs_match_decode_cache_hit ... avg_kl_div=0.0 ok
test_input_output_logprobs_match_prefill_cache_hit ... avg_kl_div=0.0 ok

Ran 3 tests in 320.719s

OK

CI States

Latest PR Test (Base): ❌ Run #31481873146
Latest PR Test (Extra): ✅ Run #31481987018

@github-actions github-actions Bot added the blackwell SM100/SM120 label Aug 11, 2026
@ispobock ispobock added run-ci CI: run the baseline test suite on this PR run-ci-extra CI: also run the extra suite (requires run-ci) bypass-fastfail labels Aug 11, 2026
@ispobock

Copy link
Copy Markdown
Collaborator Author

/rerun-test test/registered/models_e2e/test_inkling_small_nvfp4.py

@github-actions

github-actions Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Results for /rerun-test test/registered/models_e2e/test_inkling_small_nvfp4.py:

🚀 4-gpu-b200 (1 test): ❌ View workflow run

cd test/ && python3 registered/models_e2e/test_inkling_small_nvfp4.py

@ispobock

Copy link
Copy Markdown
Collaborator Author

/rerun-test test/registered/models_e2e/test_inkling_small_nvfp4.py

@github-actions

github-actions Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Results for /rerun-test test/registered/models_e2e/test_inkling_small_nvfp4.py:

🚀 4-gpu-b200 (1 test): ✅ View workflow run

cd test/ && python3 registered/models_e2e/test_inkling_small_nvfp4.py

@ispobock
ispobock merged commit b20c375 into main Aug 11, 2026
193 of 252 checks passed
@ispobock
ispobock deleted the fix-flaky-decode-cache-hit-screen branch August 11, 2026 13:47
@ispobock ispobock mentioned this pull request Aug 11, 2026
vstone-w pushed a commit to ClownBin/sglang that referenced this pull request Aug 12, 2026
saturn-acc pushed a commit to saturn-acc/sglang that referenced this pull request Aug 16, 2026
Atituiset pushed a commit to Atituiset/sglang that referenced this pull request Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blackwell SM100/SM120 bypass-fastfail run-ci CI: run the baseline test suite on this PR run-ci-extra CI: also run the extra suite (requires run-ci)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant