Repository navigation
Conversation
Route the official uniform-MXFP4 expert bank through AITER with clamped SwiGLU, explicit separated layout ownership, and checkpoint-driven MoE-to-mHC correctness coverage.
fab3f3d to
58a30de
Compare
Make the physical separated gate/up layout explicit for AITER and validate source FP8 routed, shared, and MTP experts alongside Quark MXFP4.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90e43ae781
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
2d7606b
into
sgl-project:xinyuan/glm-5.3-flash-support
|
Sorry @Raiden-Makoto , I just merged this PR by mistake. Can you please open this PR again, thanks |
Summary
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
Three production files:
fp8.py: record block-FP8's physical gate/up ordering after AITER preshuffle and forward it with the existing clamp/scales/padding metadata.quark_w4a4_mxfp4_moe.py: own AITER preshuffle, preserve separated ordering, and forward clamp/padding metadata.aiter.py: preserve a quantization method's explicit gate mode instead of overwriting it with the global default.Three test files cover CPU contracts, synthetic gfx950 FP8/MXFP4 numerics, and both real checkpoints. DSA, k-pool, MLA, mHC backend selection, model registration, CUDA graphs, EP/A2A, and full-model serving are untouched.
Shared experts are tested both separately and as a ninth uniform-precision expert slot. This PR validates the representation and math but does not turn on shared-expert fusion in the official launch recipe.
Test plan
Docker:
rocm/sgl-dev:v0.5.18-rocm720-mi35x-20260901.Base:
xinyuan/glm-5.3-flash-support@545bd6f839.Checkpoints:
zai-org/GLM-5.3-Flash@03eb536628andamd/GLM-5.3-Flash-Quark-MXFP4@b5688f2549.The same three new test files were run in both arms; the three production files are the only variables.
Synthetic gfx950 coverage uses Flash dimensions (
hidden_size=4096,intermediate_size=2048), block-FP8 and MXFP4 expert banks, token counts 1/8/17/32/64/128, top-1/top-8/top-9 routing, both activation-quantization formats, clamp-boundary inputs, deterministic top-1 output, and BF16-equivalent atomic reduction.Checkpoint coverage verifies and executes:
register_cpu_ci(suite="base-a-test-cpu"); gfx950 numerics useregister_amd_ci(suite="stage-b-test-1-gpu-small-amd-mi35x")CI States
Latest PR Test (Base): ❌ Run #33768400586
Latest PR Test (Extra): ❌ Run #33768400367
Latest PR Test (AMD ROCm 7.2): ❌ Run #33768400582