Repository navigation
[PD] Preserve decode KV across retraction in HiCache - #34801
Conversation
|
/tag-and-rerun-ci |
|
/tag-and-rerun-ci |
|
Acceptance gate calibration: canonical EAGLE3 batch runs measured 1.4286, 1.4286, and 1.4085 (run 26970481008, run 27383114776, run 27389842523); the existing 1.3 EAGLE3 gate leaves 7-9% headroom. Historical MooncakeSpec runs were only about 1.07-1.10 because #21794 switched to EAGLE3 checkpoints but retained |
a7493ae to
37db4bb
Compare
Co-authored-by: cctry <[email protected]>
resume_retracted_reqs now reads the retraction backend off the disagg bag, so the case has to publish a config instead of injecting one through a SimpleNamespace server_args.
The offload manager builds its own decode host pool, so pairing it with the host_pool retraction backend double-books host memory. It also routes the decode server to UnifiedRadixCache, whose protected_size is a read-only property, crashing the offload manager's release path. Auto-resolution now skips host_pool when offload is on, and an explicit --disaggregation-decode-retraction-backup=host_pool is rejected.
|
In my project like 14P6D ,we enabled Hisparse to improve our concurrency , the whole kv cache were stored in host pool . In this scenario , this commit optimization seems to conflict with Hisparse? |
I am not familiar with Hisparse but before this PR retraction with Hisparse will crash the engine? Also, it is expected that the whole KI will be backed up so that the decode can resume. |
Yep,PD retraction triggers crashes of D-node in our production environment, so we rolled out fixes targeting this issue. However, these fixes introduced more side effects, including performance regression and the need for manual maintenance of the preallocation queue. Seems Hisparse is not good enough in SGLang sofar :) |
Motivation
PD decode retraction currently preserves KV in per-request CPU tensors. Reusing HiCache host pools avoids a second host-memory path and also lets speculative draft KV survive retraction.
Modifications
cpu_tensor/host_poolretraction backends behind--disaggregation-decode-retraction-backup.ServerArgs.__post_init__. The resolved value lands on the config bags viaget_context().override(...), and every reader goes throughget_disagg()—server_argsstays the pristine read-only record.--hicache-ratioOptionaland give it its default at that same point (1.0for host-pool retraction,2.0otherwise), so a decode server can size the host pool 1:1 with the device pool. Thehicache_ratioreads inhiradix_cache.pyandhybrid_pool_assembler.pymove toget_memory()accordingly — that is the only reason those two files appear in the diff.Accuracy Tests
Run on the current revision:
_EXPOSED/_OVERRIDDEN_AND_READpin sets intest_supplied_instance_exposure_ratchet.pyare unchanged by this PR, and the mutation / global-config-read ratchets stay at their zero baselinesRun on an earlier revision of this branch, before the rebase onto post-#34793 main:
test_decode_queue_cleanup.pytest_runtime_context_override.pytest_runtime_context_config_bags.pyThe CUDA target/draft round-trip and the PD EAGLE3 integration test have not been executed locally (no GPU on the dev host). They are registered in CI.
Speed Tests and Profiling
Not run. The new transfers execute only when decode requests are retracted; the steady-state decode path is unchanged.
Checklist
CI States
Latest PR Test (Base): ✅ Run #31984438697
Latest PR Test (Extra): ❌ Run #31984438611