[multi-lora] 1/n - 8, fix: skip base-weight update session for LoRA sync - #2715
Open
yushengsu-thu wants to merge 1 commit into
Open
[multi-lora] 1/n - 8, fix: skip base-weight update session for LoRA sync#2715yushengsu-thu wants to merge 1 commit into
yushengsu-thu wants to merge 1 commit into
Conversation
yushengsu-thu
requested review from
Shi-Dong,
Zhichenzzz,
fzyzcjy,
maocheng23 and
yueming-yuan
as code owners
August 22, 2026 21:54
Collaborator
Author
|
@claude review |
yushengsu-thu
added a commit
that referenced
this pull request
Aug 24, 2026
…uted sync LoRA sync sends only adapter tensors and never refills base weights; opening the session anyway makes begin/end_weight_update restore and re-pack the quantized base buffers with nothing loaded in between, corrupting the frozen base (reproduced on Kimi-K2.5 W4A16, TP8). Also re-adds the update_weight_version abort_all_requests=False wire pin so main #2589's no-abort behavior cannot silently regress. Absorbed from closed PRs #2715 and #2713.
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
begin_weight_update/end_weight_updatefor LoRA-only distributed syncThis is intentionally a small PR against
main; the stacked Multi-LoRA PR #2273 can rebase onto it.Why
The distributed LoRA path sends only adapter tensors (
lora_A/lora_B). It never refills base-model weights, so it must not open a base-weight update session.On W4A16 MoE models, SGLang's
begin_weight_updaterestores the quantized base buffers to checkpoint shapes, whileend_weight_updateruns post-load packing again. With no base weights loaded between those calls, already-packed Marlin bytes/scales are interpreted and packed a second time, corrupting the frozen base model. A zero-initialized LoRA does not prevent this because the corruption happens in the base session itself.Full-model reproduction
Reproduced on the official full
moonshotai/Kimi-K2.5checkpoint (61 layers, W4A16), currentsglang-miles@cb05a44f35a7, TP8 on 8x H200:2218b65dab1fa8c0ba4139e47ba30407eab0c9002ba3459bce2556b1c28b08a4.q_a_projin all 61 layers (lora_B=0) without a base-weight session. The checksum and deterministic bare generation were unchanged.begin_weight_update -> end_weight_updatesession. The checksum changed tob17b4e8b6e0066480873dd373ba2cb039deba301a6f7180aeb1ab945b0e9c400, and bare generation immediately became repeatedPythontokens.Across all eight TP ranks, exactly 240 tensors changed: layers 1-60 x
{w13_weight_packed, w13_weight_scale, w2_weight_packed, w2_weight_scale}. No tensor changed in the LoRA-only control.Validation
Run on an H200 Linux devbox:
tests/fast/backends/megatron_utils: 263 passed