Skip to content

[Quantization] Introduce layer re-quantization API for linear layers (MXFP8 linear showcase) - #7

Closed
fxmarty-amd wants to merge 172 commits into
online-quant-compat-prequantizedfrom
online-quant-compat-prequantized-draft-requantize
Closed

[Quantization] Introduce layer re-quantization API for linear layers (MXFP8 linear showcase)#7
fxmarty-amd wants to merge 172 commits into
online-quant-compat-prequantizedfrom
online-quant-compat-prequantized-draft-requantize

Conversation

@fxmarty-amd

@fxmarty-amd fxmarty-amd commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Disclosure

AI assistance was used. The changes were reviewed and tested manually.

Purpose

Draft PR adapted from vllm-project#48427 integrating with vllm-project#51392 internal API.

This change lets --quantization-config.linear fp8_per_channel convert selected serialized ModelOpt MXFP8 linears to FP8 PTPC at load time, namely this relaxes online quantization to be available for pre-quantized layers if a dequantize_weights method is available in the base quant method.

The original checkpoint quantization config remains responsible for unselected linears and MoE.

The composition is handled by QuantizationConfig.get_effective_quant_method, so model implementations continue to receive their original checkpoint quantization config type.

Quantization methods expose an optional dequantize_weight hook, that:

  • raises NotImplementedError by default, or
  • dequantizes the quant method weights if implemented.

This draft implements it only for ModelOptMxFp8LinearMethod.

Such dequantize_weight methods can be shared across model producers (quark, modelopt, compressed-tensors, etc.). No model producer-specific code should be required.

The online linear base accepts a requantization source, while FP8 PTPC is the only target that consumes it in this draft.

TODO:

  • Validate rejection on non-linear layers

Test Plan

vllm serve mmangkad/Qwen3-4B-Instruct-2507-MXFP8 --quantization-config.linear "fp8_per_channel"

or

vllm serve MiniMaxAI/MiniMax-M3-MXFP8 \
  --tensor-parallel-size 4 \
  --attention-backend TRITON_ATTN \
  --moe-backend aiter \
  --linear-backend auto \
  --kv-cache-dtype fp8 \
  --no-enable-prefix-caching \
  --language-model-only \
  --quantization-config.linear fp8_per_channel

pytest tests/quantization/test_online_shared_expert_fusion.py -s -vvvvv

Test Result

Unit test passing, end-to-end eval to be added.

Alex-ai-future and others added 29 commits September 2, 2026 17:10
…54872)

Signed-off-by: Alex <jihui.huang@daocloud.io>
Co-authored-by: OpenAI Codex <noreply@openai.com>
…m-project#50883)

Signed-off-by: Mikhail Kostryukov <mike@triptrack.net>
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
…subsampling) (vllm-project#53829)

Signed-off-by: hungh <hungh@nvidia.com>
Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
…#54980)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
Signed-off-by: Felix Marty <Felix.Marty@amd.com>
Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Co-authored-by: mgoin <mgoin64@gmail.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
…h test (vllm-project#54957)

Signed-off-by: Stefan Koncarevic <stefan.koncarevic@amd.com>
…mm (vllm-project#54984)

Signed-off-by: Stefan Koncarevic <Stefan.Koncarevic@amd.com>
Signed-off-by: Stefan Koncarevic <stefan.koncarevic@amd.com>
…54989)

Signed-off-by: Sheral Kumar <shekumar@amd.com>
Co-authored-by: Andreas Karatzas <akaratza@amd.com>
…rs, 12%~81% kernel performance improvement (vllm-project#54565)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
…per message handling (vllm-project#54854)

Signed-off-by: reidliu41 <reid201711@gmail.com>
…project#55011)

Signed-off-by: Micah Williamson <micah.williamson@amd.com>
…3678)

Signed-off-by: Huanxing <huanxing.shen@intel.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
…6 and its arch aliases (vllm-project#55026)

Signed-off-by: khluu <khluu000@gmail.com>
Co-authored-by: Kimi Code <noreply@moonshot.cn>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
Co-authored-by: OpenAI Codex <codex@openai.com>
…5028)

Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
Signed-off-by: Kevin Luu <51931015+khluu@users.noreply.github.com>
vllm-project#55002)

Signed-off-by: Giuseppe Grossi <ggrossi@amd.com>
Co-authored-by: Andreas Karatzas <akaratza@amd.com>
…ct#46009)

Signed-off-by: bingzhaodong <aaab8b@gmail.com>
Co-authored-by: TJian <tunjian.tan@embeddedllm.com>
Co-authored-by: Zhaodong Bing <zhaobing@smc300x-ccs-aus-gpuf2c5.prov.aus.ccs.cpe.ice.amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Zhaodong Bing <zhaobing@smc300x-ccs-aus-gpuf2a0.prov.aus.ccs.cpe.ice.amd.com>
zupengwang and others added 24 commits September 6, 2026 13:28
…T2 (vllm-project#55461)

Signed-off-by: Wang Zupeng <zupenwang@gmail.com>
Co-authored-by: Codex <noreply@openai.com>
vllm-project#54362)

Signed-off-by: Will Hampson <whamp@ggl.slmail.me>
Co-authored-by: Will Hampson <whamp@ggl.slmail.me>
Co-authored-by: Or Ozeri <oro@il.ibm.com>
vllm-project#54288)

Signed-off-by: almogtavor <almogtavor@gmail.com>
Signed-off-by: Almog Tavor <70065337+almogtavor@users.noreply.github.com>
Co-authored-by: Or Ozeri <or@ozery.com>
…ct#55529)

Signed-off-by: aoshen02 <aoshen@inferact.ai>
Co-authored-by: Codex <noreply@openai.com>
…-project#54659)

Signed-off-by: zhouyou9505 <zhouyou9505@gmail.com>
Co-authored-by: Cursor Grok 4.6 <noreply@cursor.com>
…-project#55457)

Signed-off-by: khluu <khluu000@gmail.com>
Co-authored-by: Codex <noreply@openai.com>
…project#55455)

Signed-off-by: khluu <khluu000@gmail.com>
Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: Jee Jee Li <jeejeelee@inferact.ai>
Signed-off-by: Wenhua Cheng <wenhua.cheng@intel.com>
…uted experts (vllm-project#53161)

Signed-off-by: fai <fangzhouai@gmail.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
Co-authored-by: Cursor Agent <agent@cursor.com>
…llm-project#54975)

Signed-off-by: Big2Wheel <1404207590@qq.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
)

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
vllm-project#54797)

Signed-off-by: Juqi Li <2223621784@qq.com>
Signed-off-by: Isotr0py <Isotr0py@outlook.com>
Co-authored-by: Isotr0py <Isotr0py@outlook.com>
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
…ates (vllm-project#54022)

Signed-off-by: frankie <wangyongsheng686@gmail.com>
Co-authored-by: Trae Agent <noreply@trae.ai>
Signed-off-by: Zhu, Zufang <zufang.zhu@intel.com>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
…ect#55642)

Signed-off-by: Andreas Karatzas <Andreas.Karatzas@amd.com>
…rEngine (vllm-project#41567)

Signed-off-by: Teng Ma <sima.mt@alibaba-inc.com>
Signed-off-by: Tianyu Guo <guoty@inferact.ai>
Signed-off-by: Zhou ziheng <jiaranran2@gmail.com>
Signed-off-by: jiangkuaixue123 <jiangxiaozhou111@163.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Tianyu Guo <guoty@inferact.ai>
Co-authored-by: Zhou ziheng <jiaranran2@gmail.com>
Co-authored-by: jiangkuaixue123 <jiangxiaozhou111@163.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
…oject#55653)

Signed-off-by: Andreas Karatzas <Andreas.Karatzas@amd.com>
…llm-project#54643)

Signed-off-by: zhewenl <zhewenl@users.noreply.github.com>
Co-authored-by: zhewenl <zhewenl@users.noreply.github.com>
…r BF16 variant (vllm-project#53586)

Signed-off-by: Zihua Wu <zihuaw@nvidia.com>
Signed-off-by: Zihua Wu <13583761+lucifer1004@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
Co-authored-by: Yongye Zhu <zyy1102000@gmail.com>
@fxmarty-amd
fxmarty-amd force-pushed the online-quant-compat-prequantized-draft-requantize branch 2 times, most recently from b238695 to 05f86cf Compare September 7, 2026 08:30
Co-authored-by: vllmellm <vllm.ellm@embeddedllm.com>
Co-authored-by: Tan Pin Siang <tanpinsiang@gmail.com>
Signed-off-by: Felix Marty <Felix.Marty@amd.com>
@fxmarty-amd
fxmarty-amd force-pushed the online-quant-compat-prequantized-draft-requantize branch from 05f86cf to fc5805b Compare September 7, 2026 08:32
@fxmarty-amd

Copy link
Copy Markdown
Owner Author

See vllm-project#55684

@fxmarty-amd fxmarty-amd closed this Sep 7, 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.