Repository navigation
[Unified Cache][5/N]: Integrate external linker mode end to end - #37381
Conversation
Co-authored-by: 晟海 <[email protected]>
|
/rerun-test test/registered/radix_cache/unified_radix_tree/linker/test_unified_cache_linker_kl_dsv4.py |
|
Results for 🚀 |
|
/rerun-test test/registered/radix_cache/unified_radix_tree/linker/test_unified_cache_linker_kl_glm52.py |
|
/rerun-group radix_cache/unified_radix_tree |
|
Results for 🚀 |
|
Results for 🚀 🚀 🚀 🚀 🚀 |
Wires the Mooncake direct external linker (PR sgl-project#37205 backend, sgl-project#37307 translator passthrough) into the serving stack as an opt-in direct-L3 mode for UnifiedRadixCache, with no host cache tier: - server_args: --enable-unified-cache-external-linker (default FALSE, runtime stays off unless explicitly enabled) + --unified-cache-external-linker-backend {mooncake}. - arg_groups/hicache_hook: mutual-exclusion guard against --enable-hierarchical-cache and --hicache-storage-backend; linker mode skips hicache normalization entirely. - registry: route to _create_unified_radix_cache under the flag and attach MooncakeDirectLinker via init_cache_linker, registering its layer-done counter with the kv cache and tp worker. - scheduler: consolidate aborted-request cache-state release into _release_aborted_request (fires for hicache storage or the external linker); poll linker events, and gate NO_TOKEN / hicache-consumer batch behavior under the linker flag. - kv_cache_builder: forward attn_cp_rank / attn_cp_size into CacheInitParams (consumed by the storage config suffix). - kv_cache_configurator: keep the DSA indexer-K cache under the linker. - full_component: honor the PREPARE phase of ExternalLinkerLoadPhase (return the transfer unmodified; assert COMMIT after it). - tests: MooncakeTestServices lifecycle helper, DSV4-Flash and GLM-5.2 direct-linker KL E2E suites (registered as extra-b CUDA CI), plus the unit-test fixtures for the new scheduler/registry fields. Applied cleanly over the local branch (no textual conflicts; scheduler abort consolidation coexists with the local chunked-prefill abort re-dispatch and fail-soft changes). Default-off runtime behavior is preserved per the port-but-don't-switch decision. (cherry picked from commit d2ade53, PR sgl-project#37381)
|
Ran this in production for a couple hours (DeepSeek-V4-Flash, TP4, Mooncake L3, ~21M keys / 1.4TB master memory) and hit a crash worth sorting out before merge. What happened
Suggestion Don't treat a partial batch failure as fatal. Keys that fail session start could be dropped from the load and re-prefilled — same idea as the vLLM mooncake connector (#50984, #48216): failed get -> load error -> scheduler recomputes. Right now two bad keys out of 32 take down the engine. We're testing a patch along these lines on our side and can send it here if that's the direction you want. |
thanks you! how about provide anothor pr after this pr merged? |
|
/rerun-group radix_cache/unified_radix_tree |
|
Results for 🚀 🚀 🚀 🚀 🚀 |
|
/rerun-group hicache |
|
Results for 🚀 🚀 🚀 🚀 ⛔ |
|
/rerun-test registered/radix_cache/unified_radix_tree/linker/test_unified_cache_linker_kl_dsv4.py registered/radix_cache/unified_radix_tree/test_unified_radix_cache_hicache_pp_kl.py registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_cp.py |
|
Results for 🚀 |
|
/rerun-test registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_mamba.py registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_dsv4.py |
|
Results for 🚀 |
|
The CI runs for both unified cache and hicache have completed; |
|
/rerun-test test_disaggregation_decode_radix_cache.py test_mimo_v2.py |
|
Results for 🚀 🚀 |
Motivation
Motivation
Unified Radix Cache manages heterogeneous model states, including full-attention KV, SWA KV, and model-specific sidecars.
On GB platforms, deployments may need to aggregate larger memory regions into a shared Global Memory pool. This requires an efficient way for Unified Radix Cache to access remote memory directly without overhead on the inference critical path.
This PR adds an optional external-cache linker mode. It allows the tree to access a Global Memory pool through backends such as Mooncake or UMBP .. while retaining ownership of allocation, insertion, component consistency, and cache-node lifetime.
The existing hierarchical cache path remains unchanged. The linker is an opt-in alternative for deployments that need a larger shared memory pool while preserving inference performance.
This is the fifth PR split from #35687. It completes the Mooncake external-linker path.
Previous splits: #37091, #37098, #37151, and #37205.
Modifications
Tests
CI States
Latest PR Test (Base): 🚫 Run #33710527281
Latest PR Test (Extra): ✅ Run #33777698559
Latest PR Test (AMD ROCm 7.2): ⏳ Run #33710527160