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
Collaborator

@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
Collaborator Author

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Jun 14, 2026
@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

This branch was successfully deployed

1 active deployment
staging - docs_new — 053dd738 Deployed Jun 14, 2026 by mintlify[bot]
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 CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant