fix(dflash): isolate replicated draft cache groups - #519
Conversation
Group DCP-replicated speculative draft caches independently from sharded target caches. Hybrid targets retain their native MLA and state-cache page geometry, so CUDA-graph memory profiling and runtime allocation do not attempt unsupported cross-model page padding. Add coverage for an MLA-plus-Mamba target paired with an incompatible replicated sliding-window draft page.
|
Warning Review limit reachedNext included review available in 59 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The cache-group isolation in #519 is the correctness prerequisite for the independently reviewed capacity optimization in #520. Pull request #520 keeps backend-selected DFlash geometry during model KV-spec construction, then aligns the replicated sliding-window group with the sharded target physical block only when the planner proves that pool stride and scheduler LCM do not grow. On the qualified GLM-5.3 TP4/DCP4 runtime, that changes group-aware 12 GiB capacity from 5,688,681 to 5,974,904 tokens (+5.03%) without a measurable normalized decode or 32k prefill regression. |
|
@coderabbitai review |
|
Status
Implemented. Qualified in the GLM-5.3-Flash TP4/DCP4 integration described below.
Behavior
DCP-replicated speculative cache groups are grouped independently from DCP-sharded target cache groups. Each partition then uses the existing vLLM grouping logic.
This preserves the native MLA and Mamba page geometry of a hybrid target while preserving the DCP1 allocation geometry of a replicated DFlash draft cache. It prevents cross-model page-size unification from padding or resizing an incompatible target cache.
The behavior changes only a cache specification containing both
dcp_replicated=Trueand non-replicated groups. Cache specifications with one replication mode retain the existing grouping path.Dependency
This pull request is stacked on #513 at
e5e7bf99182833c6ce25042c29252bbb4107539c. The base branchdeps/pr513-dflash-dcpis an exact mirror of that revision so the review diff contains only the two files changed here.Merge order: #513, then this pull request. Retarget this pull request to
dev/jovian-judgementafter #513 is present there.Reproducer
With #513 and without this commit:
NotImplementedError: Layer model.mla: page size is not divisible by the maximum page size and cannot be paddedduring KV-cache grouping;The regression tests model both the MLA-only and MLA-plus-Mamba cases.
Validation
Exact pull-request tree
dd361d82253fc1df223ec02e15027cc7c0fc4f8f:2 passedfor the two added grouping regressions in a source-overlay test image whose staged vLLM tree matched that hash.66 passed, 22 failed; every failure was an existing test constructingDeviceConfig(device="auto")without an available device. No implementation or assertion failure was observed outside that environment limitation.Composed GLM-5.3-Flash integration tree
89e9e3c6cda543e53b950e4034f115dbd7543ec0:113 passedacross DFlash replicated-cache, DCP compatibility, mixed slot-mapping, and KV-cache grouping tests.sha256:5d98788110b15f3e14c5668250d846da2cf819cf850d436d26aca1a1c5a52737completed model loading, KV allocation, B12X warmup, and target plus DFlash2 CUDA graph capture without source bind mounts.local-inference-lab/GLM-5.3-Flash-NVFP4@520de24eabf507659eaef7c70f14fd584527facc.local-inference-lab/GLM-5.3-Flash-DFlash2-MXFP8@b6d33aa93fc1ac5b23a88251a1c0ce0bfe2ad17c.d56c1163b6e019d828ed24f135c2efd05fdca6ea.FULL_DECODE_ONLY, so prefill remains outside a full graph.Review requirement
OpenAI Codex assisted with analysis, implementation, testing, and pull-request text. Every changed line requires human review before merge.