[sglang-miles] exclude shared skip-topk layer indexer weights from RL weight check - #29339
Merged
yueming-yuan merged 1 commit intoJun 25, 2026
Merged
Conversation
…eight check On DSA cross-layer index-sharing models (e.g. GLM-5.2), skip-topk layers reuse the source computing layer's top-k and never run their own indexer, so their indexer weights are absent from the checkpoint and never loaded. The RL weight-update equality checker then flags those uninitialized params. Tag them with _skip_weight_check (already honored by WeightChecker) so the comparison skips them.
yueming-yuan
requested review from
Fridge003,
ch-wan,
fzyzcjy,
ispobock and
merrymercy
as code owners
June 25, 2026 22:55
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
yushengsu-thu
pushed a commit
to yushengsu-thu/sglang
that referenced
this pull request
Jun 27, 2026
nanjiangwill
pushed a commit
to nanjiangwill/sglang
that referenced
this pull request
Jul 7, 2026
yueming-yuan
added a commit
that referenced
this pull request
Jul 14, 2026
… from RL weight check (#29339)
yueming-yuan
added a commit
that referenced
this pull request
Jul 14, 2026
… from RL weight check (#29339)
yueming-yuan
added a commit
that referenced
this pull request
Jul 14, 2026
… from RL weight check (#29339)
yueming-yuan
added a commit
that referenced
this pull request
Jul 14, 2026
… from RL weight check (#29339)
yueming-yuan
added a commit
that referenced
this pull request
Jul 25, 2026
… from RL weight check (#29339)
yueming-yuan
added a commit
that referenced
this pull request
Jul 25, 2026
… from RL weight check (#29339)
yueming-yuan
added a commit
that referenced
this pull request
Jul 25, 2026
… from RL weight check (#29339)
yueming-yuan
added a commit
that referenced
this pull request
Jul 25, 2026
… from RL weight check (#29339)
Arist12
pushed a commit
to Arist12/sglang
that referenced
this pull request
Aug 27, 2026
… from RL weight check (sgl-project#29339)
Kh4L
pushed a commit
to Kh4L/sglang
that referenced
this pull request
Sep 8, 2026
… from RL weight check (sgl-project#29339) (cherry picked from commit 5d36347)
46 tasks
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.
Problem
On DSA models with cross-layer index sharing (
index_topk_freq > 1, e.g. GLM-5.2), "skip-topk" layers reuse the source computing layer's top-k indices and never run their own indexer —forward_mlagatesself.indexer(...)behindnot self.skip_topk. Those layers' indexer weights (wq_b/wk/k_norm/weights_proj) are therefore absent from the checkpoint and never loaded, so they keep uninitialized values.DeepseekV2AttentionMLAstill builds theIndexermodule on every DSA layer (uniform layout, correct for V3.2 where every layer computes). So on a sharing model the RL weight-update equality checker (WeightChecker) compares those never-loaded skip-layer indexer params and fails withmax_abs_err=nanon*.self_attn.indexer.wq_b/wk(andk_norm).This only surfaces on sharing models (GLM-5.2); plain DSA (DeepSeek-V3.2,
index_topk_freq=1) has an indexer on every layer and is unaffected.Fix
Tag the skip-layer indexer params with
_skip_weight_check(already honored byWeightChecker→ routed to non-fatalinfo). The weights are provably never read at forward, so excluding them from the equality check is safe and the per-layer module layout is unchanged.🤖 Generated with Claude Code
CI States
Latest PR Test (Base): ❌ Run #28205643775
Latest PR Test (Extra): ❌ Run #28205643694