Skip to content

[AMD] Recalibrate the Quark MXFP4 MoE GSM8K threshold 0.92 -> 0.89 - #35477

Closed
kangwangamd wants to merge 3 commits into
sgl-project:mainfrom
kangwangamd:amd/quark-mxfp4-moe-gsm8k-threshold
Closed

kangwangamd wants to merge 3 commits into
sgl-project:mainfrom
kangwangamd:amd/quark-mxfp4-moe-gsm8k-threshold

Conversation

@kangwangamd

@kangwangamd kangwangamd commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

test_quark_mxfp4.py::TestFP8ToMXFP4MOETP1::test_gsm8k fails most nights on stage-b-test-1-gpu-small-amd-mi35x-rocm720 (example):

AssertionError: 0.912 not greater than 0.92

The 0.92 threshold was set in #18182 given unquant FP8 ref abt ~0.948, an assumed quant buffer

Measure offline by MI355X m12-17

10 repeat runs
image rocm/sgl-dev:v0.5.17-rocm720-mi35x-20260818,
serving Qwen/Qwen3-30B-A3B-Instruct-2507-FP8 with same args
(--quantization quark_mxfp4 --context-length 3000 --tensor-parallel-size 1) and
same run_eval call (500 questions, 8-shot, 512 max tokens, para 128):

see res below

0.8980  0.9200  0.9160  0.9260  0.9140
0.9180  0.9200  0.9180  0.9120  0.9180

mean 0.9160   std 0.0070   min 0.8980   max 0.9260

in short Only 1 / 10 runs above 0.92.
Two runs hit on 0.9200, since the test uses assertGreater these 2 fail as well

0.89 clears the observed minimum with a small margin. The repo's measured - 0.05 convention would give 0.866, which is also defensible if a looser gate is preferred; I picked the tighter of the two so the test still catches a real regression.

Scope

This is threshold calibration only, no behaviour change. The accuracy itself looks healthy for MXFP4 — 0.916 against a 0.948 bf16 reference is about 3 points of quantization loss, which is in line with the other classes in this file.

Measured on MI355X because that is the runner for this job. The same cluster is also reported on pr-test-amd; if that leg runs different hardware the distribution there is unverified.

Checklist

cc @fxmarty-amd (#18182 set this threshold) @ColinZ22


CI States

Latest PR Test (Base): ❌ Run #32243903869
Latest PR Test (Extra): ❌ Run #32243903752

TestFP8ToMXFP4MOETP1 scores mean 0.916 (min 0.898, max 0.926) over 10 runs
on MI355X, so the 0.92 gate passes only about 1 run in 10. The original
value was derived from the unquantized FP8 reference (~0.948) rather than
measured on the requantized path.
@kangwangamd

Copy link
Copy Markdown
Contributor Author

Close — already applied in PR #41980

@kangwangamd kangwangamd closed this Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant