Adopt the canonical MoE fold in the Qwen exact trainer combine (fixes trainer/sampler K3 divergence) - #56
Open
kiddyboots216 wants to merge 1 commit into
Open
Conversation
Broly Security ScanNote ✅ Clean scan Note Re-scan this PR anytime with
|
kiddyboots216
force-pushed
the
pr/qwen-moe-canonical-fold
branch
2 times, most recently
from
August 13, 2026 09:19
0d8482b to
981ba80
Compare
kiddyboots216
force-pushed
the
pr/gdn-cp-hybrid-u8
branch
from
August 13, 2026 09:19
62476b9 to
9799c6e
Compare
kiddyboots216
force-pushed
the
pr/qwen-moe-canonical-fold
branch
from
August 13, 2026 10:44
981ba80 to
6f1609b
Compare
kiddyboots216
force-pushed
the
pr/gdn-cp-hybrid-u8
branch
from
August 13, 2026 10:44
9799c6e to
7790d12
Compare
Use the serving-paired adjacent-tree fold for native-EP Qwen contributions and table-drive family and EP-size admission. Add arithmetic discrimination, gradient engagement, registry validation, and model-wiring tests.
kiddyboots216
force-pushed
the
pr/gdn-cp-hybrid-u8
branch
from
August 13, 2026 17:28
7790d12 to
f5023b9
Compare
kiddyboots216
force-pushed
the
pr/qwen-moe-canonical-fold
branch
from
August 13, 2026 17:28
6f1609b to
9f114d3
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.
Pair the Qwen exact MoE combine with the serving canonical fold
Stacked on #55. This PR contains production code and conventional tests only.
Root cause
The exact Qwen trainer still reduced exchanged expert contributors with a reverse-rank BF16 chain after serving moved to
canonical_moe_fold_v1, a balanced adjacent-pair BF16 tree. Matched per-rank partials were bitwise equal, but the two folds differed in 148,286/296,960 elements at the first MoE block, producing token-level K3 of 1.4e-3.Fix
canonical_moe_fold_v1.Gates
Generality follow-up
Native-EP combine qualification is a per-family registry of admitted EP sizes, with the existing Qwen validator retained as a compatibility shim. Canonical-MoE trainer admission is table-driven by exact-contract family, certified layer count, and topology. Historical GLM-5.2 cases retain identical validation, while unknown families and unqualified sizes fail closed; a new family requires an explicit registry entry plus byte evidence.