weight sync: add complete CPU-prepared delta updates on SGLang v0.5.16#70
Open
nanjiangwill wants to merge 6 commits into
Open
weight sync: add complete CPU-prepared delta updates on SGLang v0.5.16#70nanjiangwill wants to merge 6 commits into
nanjiangwill wants to merge 6 commits into
Conversation
nanjiangwill
marked this pull request as ready for review
July 25, 2026 23:29
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.
Summary
sglang-cache, and reserve CPU memory with(request, limit)tuplesDesign
Disk mode reconstructs and verifies a complete mutable checkpoint on host-local NVMe during
/pull_weights;/update_weights_from_diskthen performs a complete quantized reload.CPU mode retains one canonical checkpoint-layout image per host plus one complete rank-local runtime image per TP rank.
/pull_weightsstages the compressed delta once, applies XOR/overwrite operations and verifies publisher checksums in canonical tensor space, then runs every target through SGLang's ordinary loader and quantization hooks while generation continues./update_weights_from_cpuonly copies the prepared rank images into stable GPU storages.Checksums fail loudly before live GPU weights are touched. Every runtime storage is prepared and committed; the recorded 686 changed Kimi tensors describe this delta and are not an implementation sparsity assumption.
Post-load layout work is capability-gated per quantization method. GLM FP8 performs almost all layout work in host memory. ModelOpt NVFP4 retains bounded CUDA staging because its device transform is materially faster. MXFP4 has independent reload-safe layout handling.
SGLang fork
lmsysorg/sglang:v0.5.16modal-projects/sglang:stitch-sglang-v0.5.1647561f9f2d7ead3a74d54cf0175e5937fb81207cThe nine fork commits separate fastsafetensors transport, safe quantized disk reload, verified disk lineage materialization, CPU image preparation, async APIs, distributed hardening, checksum-only reseeding, MXFP4 reload safety, and host-vs-device postprocessing.
Validation
Local:
uv run pytest -q— 54 passeduv run python -m compileall -q cookbook tools/profiling srcgit diff --checkpre-commit run --all-files— passedGPU matrix, HiCache disabled, with fresh TP4 engines:
Every sample generated before, throughout preparation, and after commit; served the target version; changed from v0; and reproduced an exact deterministic token/text/logprob fingerprint after the update.
The CPU path meets the pause target: GLM commits in about one second and Kimi in 2.75–4.15 seconds. Kimi's complete CPU loop is 56–62 seconds with runc and 119–127 seconds with the default runtime. Disk reload remains dominated by rereading and transforming the complete checkpoint during the pause.