Skip to content

Revert "[AMD][Quantization] Online MXFP4 quantization 2/N - FP8 to MXFP4 requantization on AMD GPUs" - #28213

Merged
merrymercy merged 1 commit into
mainfrom
revert-18182-fp8-to-mxfp4
Jun 14, 2026
Merged

merrymercy merged 1 commit into
mainfrom
revert-18182-fp8-to-mxfp4

Conversation

@merrymercy

@merrymercy merrymercy commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Reverts #18182

it breaks the ci
https://github.com/sgl-project/sglang/actions/runs/27494298180/job/81265388307#step:6:260

See a correct fix here #28191


CI States

Latest PR Test (Base): 🚫 Run #27511029332
Latest PR Test (Extra): ❌ Run #27511029236

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the online requantization feature from FP8 to MXFP4, simplifying the codebase by deleting unused dequantization utilities, removing requantization configuration options, and refactoring the weight creation methods in FP8 and Quark quantization schemes. A critical issue was identified in quark_w4a4_mxfp4_moe.py where calling scale_param.weight_loader inside the online weight loader causes infinite recursion and crashes model loading, which can be resolved by calling original_weight_loader directly.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +214 to +216
scale_param.weight_loader(
scale_param, weight_scale, scale_weight_name, shard_id, expert_id
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

In online_mxfp4_moe_weight_loader, calling scale_param.weight_loader results in infinite recursion and a crash during model loading. This is because extra_weight_attrs["weight_loader"] was overwritten with the online weight loader (online_mxfp4_moe_weight_loader) before the scale parameters were registered, meaning scale_param.weight_loader points back to online_mxfp4_moe_weight_loader itself.\n\nTo fix this, call original_weight_loader directly to load the scale parameter, bypassing the online quantization wrapper.

            original_weight_loader(\n                scale_param, weight_scale, scale_weight_name, shard_id, expert_id\n            )

@mintlify

mintlify Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
lmsysorg 🟢 Ready View Preview Jun 14, 2026, 8:33 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@merrymercy

Copy link
Copy Markdown
Contributor Author

/tag-and-rerun-ci

@merrymercy
merrymercy merged commit f18d38d into main Jun 14, 2026
107 of 140 checks passed
@merrymercy
merrymercy deleted the revert-18182-fp8-to-mxfp4 branch June 14, 2026 20:34
Chronostasys pushed a commit to MindLab-Research/sglang that referenced this pull request Aug 24, 2026
jakki-amd pushed a commit to jakki-amd/sglang that referenced this pull request Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation quant LLM Quantization run-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant