Skip to content

feat(sglang): back native DeepSeek-V4 C4 and packed indexer pages - #567

Draft
shipiyouniao wants to merge 10 commits into
ovg-project:mainfrom
shipiyouniao:feat/sglang-dsv4-c4-indexer
Draft

shipiyouniao wants to merge 10 commits into
ovg-project:mainfrom
shipiyouniao:feat/sglang-dsv4-c4-indexer

Conversation

@shipiyouniao

@shipiyouniao shipiyouniao commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

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.

zou-zhiheng and others added 3 commits October 14, 2026 15:28
Co-authored-by: 石皮幼鸟 <2960474346@qq.com>
Co-authored-by: 石皮幼鸟 <2960474346@qq.com>
Co-authored-by: 石皮幼鸟 <2960474346@qq.com>
@shipiyouniao
shipiyouniao force-pushed the feat/sglang-dsv4-c4-indexer branch from dfc73e3 to 3c67bf6 Compare October 14, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants