Repository navigation
feat(sglang): back native DeepSeek-V4 C4 and packed indexer pages - #567
Draft
shipiyouniao wants to merge 10 commits into
Draft
shipiyouniao wants to merge 10 commits into
shipiyouniao wants to merge 10 commits into
Conversation
Co-authored-by: 石皮幼鸟 <2960474346@qq.com>
Co-authored-by: 石皮幼鸟 <2960474346@qq.com>
Co-authored-by: 石皮幼鸟 <2960474346@qq.com>
shipiyouniao
force-pushed
the
feat/sglang-dsv4-c4-indexer
branch
from
October 14, 2026 05:50
d515398 to
dfc73e3
Compare
Co-authored-by: 石皮幼鸟 <2960474346@qq.com>
Co-authored-by: 石皮幼鸟 <2960474346@qq.com>
Co-authored-by: 石皮幼鸟 <2960474346@qq.com>
shipiyouniao
force-pushed
the
feat/sglang-dsv4-c4-indexer
branch
from
October 14, 2026 10:03
dfc73e3 to
3c67bf6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds KVCached backing for ordinary DeepSeek-V4 C4 KV and CUDA packed FP8/FP4 indexer storage on SGLang 0.5.20. Native full-page IDs drive every selected compressed pool. An allocation miss rolls back new backing leases and native pages before mapping publication; SWA retirement preserves compressed history, while full-page free, grouped free and clear release it.
Depends on #566 and its #570/#400/#565/#376/#539 stack; this adds one C4/indexer commit. Dynamic backing requires TP=1 and PP=1 and managed SWA. Distributed or unknown topology retains native storage/accounting until a cross-rank transaction exists. HiSparse uses separate device IDs and retains native backing. Split AITER FP4, unified/unsupported layouts, compressor state, small pools and shared-draft storage also remain native.
All selected backing managers finish initialization before any resize or reclamation starts. This includes the exact-ID readiness and HiSparse manager-discovery corrections from #570. Regression tests hold each side pool pending and verify that no mapping or resize is published early.
ENABLE_KVCACHED is checked before runner-ownership validation: unset, false, and 0 retain native pools, including direct compressed-pool construction. Native runner tests cover enabled and disabled construction.
Validation at
3c67bf6: 452 targeted CPU tests, GPU-free C++, all-file pre-commit, MyPy 3.10–3.13 and private Codex review passed. A single T4 passed 12 native SGLang storage/runner cases and 4 exact-ID shrink/regrowth cases, with no skips. Tests cover packed byte layouts, reads/writes, rollback and lifetimes using a fixed small budget, without weights, attention/compressor execution or graph capture.Complete DSV4/MTP serving validation has not been run for this revision. Dynamic TP/PP backing needs asymmetric multi-rank failure/recovery tests. Performance remains unmeasured: compare with native on identical hardware/model/workload for throughput, TTFT, TPOT, tail latency, memory and allocation/reclamation overhead. The T4 pool tests are functional evidence only; no performance target or threshold is claimed.