[AMD] [GLM-5.3-Flash Day 0] Enable FP8 and Quark MXFP4 MoE on gfx950 - #38546
Open
Raiden-Makoto wants to merge 15 commits into
Open
Raiden-Makoto wants to merge 15 commits into
Raiden-Makoto wants to merge 15 commits into
Conversation
Raiden-Makoto
requested review from
1am9trash,
Alisehen,
AniZpZ,
BBuf,
Edwardf0t1,
FlamingoPg,
Fridge003,
HaiShaw,
OrangeRedeng,
Ying1123,
b8zhong,
ch-wan,
hubertlu-tw,
ispobock,
kkHuang-amd,
merrymercy,
mmangkad and
yichiche
as code owners
September 8, 2026 17:26
Raiden-Makoto
marked this pull request as draft
September 8, 2026 18:04
Raiden-Makoto
marked this pull request as ready for review
September 8, 2026 19:28
Raiden-Makoto
force-pushed
the
RM/glm53-moe-enablement-reopen
branch
from
September 8, 2026 19:37
c01b955 to
ef3955c
Compare
Route the official uniform-MXFP4 expert bank through AITER with clamped SwiGLU, explicit separated layout ownership, and checkpoint-driven MoE-to-mHC correctness coverage.
Make the physical separated gate/up layout explicit for AITER and validate source FP8 routed, shared, and MTP experts alongside Quark MXFP4.
Raiden-Makoto
force-pushed
the
RM/glm53-moe-enablement-reopen
branch
from
September 8, 2026 19:42
ef3955c to
73ed73c
Compare
This was referenced Sep 11, 2026
Closed
…ment-reopen # Conflicts: # python/sglang/srt/layers/quantization/fp8.py
Contributor
Author
|
/rerun-failed-ci |
This was referenced Sep 14, 2026
Open
Contributor
Author
|
/rerun-failed-ci |
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
Replacement for #38037, which GitHub closed when its deleted support base was merged into main.
Replacement for #37629, which was accidentally squash-merged and then reverted by #37880. This reapplies the same reviewed change on the current support-branch head.
GLM-5.3-Flash ships two gfx950 MoE checkpoint paths that share one model architecture but use different quantization contracts:
zai-org/GLM-5.3-Flash: routed, shared, and MTP experts use block FP8[128,128]with dynamic FP8 activations.amd/GLM-5.3-Flash-Quark-MXFP4: routed and shared experts in layers 3-44 use OCP MXFP4 1×32; MTP layer 45 remains block FP8.Both paths load gate and up projections into separate contiguous halves and require clamped SwiGLU (
swiglu_limit=10.0). The support branch preshuffles the weights but lets AITER infer gate/up semantics from the global interleave setting. Quark also drops clamp/padding metadata and does not make preshuffle ownership explicit.GateMode.SEPARATEDswiglu_limit=10.0Scope
Five production files:
fp8.py: preserve separated gate/up layout and forward block-FP8 clamp, scale, and padding metadata.quark_w4a4_mxfp4_moe.py: own AITER preshuffle and forward MXFP4 clamp/layout/padding metadata.aiter.py: preserve an explicitly selected gate mode.quark.py: map per-layer Quark configuration names and dispatch serialized block-FP8 linear/MoE layers through the existing FP8 methods.glm5_next.py: map Flash checkpoint names, including block-FP8weight_scaleto runtimeweight_scale_inv.Five test files cover CPU contracts, model-name/scale mapping, synthetic gfx950 numerics, and both real checkpoints. DSA, k-pool, MLA, mHC backend selection, CUDA graphs, EP/A2A, and scheduler policy are unchanged.
PR boundary: #39317 exclusively owns direct fused-module and per-expert Quark
excludehandling inquark/utils.py. This PR no longer modifies that file ortest_quark_utils.py. Fullamd/GLM-5.3-Flash-Quark-MXFP4serving requires both changes; they no longer duplicate code.Test plan
Combined main-based integration (
RM/glm53-day0-main-integration@22f233a853) on 4x MI355X/gfx950 usingrocm/sgl-dev:v0.5.19-rocm724-mi35x-20260910:amd/GLM-5.3-Flash-Quark-MXFP4@b5688f2549: 20/20 GSM8K (100.00%), 100.00% stop rate, zero truncations/errors.zai-org/GLM-5.3-Flash@03eb536628block FP8: 19/20 GSM8K (95.00%), 100.00% stop rate, zero truncations/errors.17 + 25(42).Recovery validation:
Checkpoint exclusion behavior is intentionally tested in #39317, not duplicated here.
CI States
Latest PR Test (Base): 🚫 Run #34794563024
Latest PR Test (Extra): ❌ Run #34794562943
Latest PR Test (AMD ROCm 10): ❌ Run #34794562968