Repository navigation
[Fix] moe: Quantize contiguous SiTU with the packed UE8M0 scale - #45856
Open
LingYi-Liang wants to merge 1 commit into
Open
LingYi-Liang wants to merge 1 commit into
LingYi-Liang wants to merge 1 commit into
Conversation
LingYi-Liang
requested review from
BBuf,
Edwardf0t1,
Fridge003,
HaiShaw,
Ying1123,
ch-wan,
ispobock and
merrymercy
as code owners
October 22, 2026 17:25
This branch has not been deployed
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.
Motivation
The contiguous SiTU path quantizes FP8 values using
amax / 448, then rounds only the scale up to UE8M0 before the down projection. The GEMM therefore reconstructs those values with a different scale.This affects SiTU activations when
DEEPGEMM_SCALE_UE8M0is enabled. It is separate from #43556, which fixes loading-time weight requantization.Modifications
Round the scale to a power of two before quantizing, and pass that same scale to the existing packing helper.
Add two registered GPU regressions: one checks 42 input/shape combinations through the compiled packing helper; the other runs the real contiguous runner with FP8 and MXFP4 experts and two native DeepGEMM projections. Both retain the existing SiTU error bound of
17 * scale.Accuracy Tests
Tested against
main@8cd3c494a3aa3ae56dfd76f51bab6912234914dcon RTX 5070 Ti (SM120), WSL2, PyTorch 2.14.1+cu130, Triton 3.8.0 and sgl-deep-gemm 0.2.3.These are kernel and runner tests. No checkpoint, full-model accuracy evaluation, dispatcher integration or B200 run was performed. Targeted formatting, lint and registration checks passed; full pre-commit was not run.
Speed Tests and Profiling
A warm-kernel microbenchmark used CUDA events and six alternating baseline/fixed pairs. At 128 rows × 3072 output columns, the median of the per-pair medians increased from 2.599 µs to 2.856 µs; individual pairs were 8.3–20.3% slower. This is the measured cost of the corrected rounding path. The 8 × 1024 measurements were too noisy to attribute a change.
The measurement excludes packing, GEMMs, compilation and serving. End-to-end performance was not measured.
Checklist
Review and Merge Process
CI States
Latest PR Test (Base): ❌ Run #39822592010
Latest PR Test (Extra): ❌ Run #39822592146
Latest PR Test (AMD ROCm 10): ❌ Run #39822592040