Repository navigation
Enable unified cache out-of-window slot freeing by default - #34653
Conversation
|
/rerun-test test/registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_hybrid_bitexact.py |
|
Results for 🚀 |
|
/rerun-test test/registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_swa.py |
|
/rerun-test test/registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_full.py |
|
/rerun-test test/registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_mamba.py |
|
Results for 🚀 |
|
Results for 🚀 |
|
Results for 🚀 |
|
/rerun-test test/registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_full.py |
|
Results for 🚀 |
|
/tag-and-rerun-ci |
|
/rerun-test test/registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_full.py |
|
Results for 🚀 |
…ault The hook mirrored the reference launcher's SGLANG_OPT_UNIFIED_CACHE_FREE_OUT_OF_WINDOW_SLOTS=0, but with the switch off the SWA pool retains window KV for every cached prompt, so a few long conversations exhaust it and prefix matches - which need live SWA at the branch point - stop matching (sgl-project#50416: 0.1% vs 96.9% cache hit on one node). Leave the switch to the global default (True since sgl-project#34653). Signed-off-by: wuyaole <[email protected]>
Motivation
SGLANG_OPT_UNIFIED_CACHE_FREE_OUT_OF_WINDOW_SLOTSreleases SWA slots that have already left the sliding window while a chunked prefill is being cached, instead of holding them until the request finishes. It has been opt-in since it landed; this makes it the default.This is a default flip, so it changes behavior for every server running the unified radix cache with an SWA component. The single consumer is the chunked-prefill caching path in
unified_radix_cache.py, gated behindSGLANG_ENABLE_UNIFIED_RADIX_TREE; passingFalserestores the old behavior.The risk worth calling out is not the freeing itself but what it does to prefix reuse: how much SWA data stays resident decides how deep a later request can match, since a hit needs a full window of live SWA below the match point. Freeing earlier could in principle shorten that and silently cost cache hits.
Accuracy
test_unified_radix_cache_kl_hybrid_bitexact.pyis the sharpest check available for this: it asserts prefill and decode score every token identically (kl_divfloor 1e-9, measured exactly 0), and its hicache case additionally asserts the reused prefix length per request. One H200 (SM90, same architecture as the1-gpu-largeCI runner), both fixes in, flag defaulted on:The per-request
cached_tokensassertion in the multi-turn case passes unchanged, so the reusable prefix does not shrink.Two things this does not cover, and I would rather say so than imply otherwise: only the hybrid SWA + mamba configuration was measured, not the SWA-only or mamba-only models in the same directory, and the reason it originally shipped opt-in is not recorded anywhere I could find (the introducing commit carries no rationale). Running the full
unified_radix_tree/suite on this PR would close the first gap.CI States
Latest PR Test (Base): ✅ Run #31661339455
Latest PR Test (Extra): ✅ Run #31661339489