Skip to content

[diffusion][feature] Add offline SVDQuant W4A4 support - #6162

Merged
hsliuustc0106 merged 7 commits into
vllm-project:mainfrom
lishunyang12:feat/minimax-h3-svdquant
Aug 27, 2026
Merged

hsliuustc0106 merged 7 commits into
vllm-project:mainfrom
lishunyang12:feat/minimax-h3-svdquant

Conversation

@lishunyang12

@lishunyang12 lishunyang12 commented Aug 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add reusable offline SVDQuant W4A4 checkpoint loading and execution for
vLLM-Omni diffusion models. MiniMax-H3 FL2VA is the first validated consumer,
and the quantization config plus linear method remain model-independent.

This PR now also covers the MiniMax-H3 encoder fallback path needed to make
text_encoder: fp8 work on top of the existing checkpoint transformer
quantization, without overwriting the checkpoint's transformer-side svdquant
settings.

The loader:

  • detects quant_method: svdquant from transformer checkpoint metadata;
  • loads packed NVFP4 weights, block scales, smoothing factors, and a BF16
    low-rank correction;
  • supports optional per-output scales, including fused Q/K/V projections;
  • preserves vLLM Column, Row, and QKV tensor-parallel sharding;
  • reuses compatible vLLM NVFP4 GEMM providers.

Runtime contract

  • Offline checkpoint only; no calibration or conversion at model load.
  • BF16 inputs with NVFP4 W4A4 base GEMM and BF16 rank correction.
  • SM103 is the currently validated and enabled target.
  • FlashInfer, CUTLASS, and FBGEMM NVFP4 tensor layouts are accepted.
  • A forced backend with a different tensor ABI fails during model loading with
    an actionable error instead of failing on the first inference request.
  • Each tensor-parallel input partition must be divisible by the NVFP4 block
    size of 16.

The checkpoint schema and tensor shapes are documented in
docs/user_guide/quantization/svdquant.md.

Validation

  • 16 passed: MiniMax-H3 quantization regression suite, including the new
    transformer checkpoint fallback for text_encoder: fp8.
  • 129 passed: MiniMax-H3 contract suite.
  • git diff --check: clean.
  • B300 e2e measurement on MiniMax-H3 FL2VA:
    • BF16 baseline: 36.84 s, 69,838 MiB peak
    • text_encoder: fp8 on top of checkpoint transformer svdquant:
      28.28 s, 48,158 MiB peak
    • speedup: 1.30x
    • peak memory reduction: 31.0%

This leaves the loader-only compatibility path intact, while also recording the
current encoder-FP8 result that is usable on B300.

@hsliuustc0106 hsliuustc0106 added diffusion codes related to diffusion models quantization Code related to quantization labels Aug 14, 2026
@hsliuustc0106

Copy link
Copy Markdown
Collaborator

This PR touches vllm_omni/quantization/, tests/diffusion/, benchmarks/diffusion/, examples/offline_inference/, vllm_omni/diffusion/ (12 files). Based on CODEOWNERS coverage of the changed files, the most-related reviewers appear to be:

@Isotr0py @david6666666 @NickCao

Could one of you take a look when you get a chance? Thanks!

@lishunyang12
lishunyang12 force-pushed the feat/minimax-h3-svdquant branch from 9ac2251 to 14f0f05 Compare August 14, 2026 23:37
@lishunyang12 lishunyang12 changed the title [Diffusion][Quantization] Support MiniMax H3 SVDQuant [Kernel][Model] Add MiniMax-H3 SVDQuant W4A4 on Blackwell Aug 14, 2026
@lishunyang12
lishunyang12 marked this pull request as ready for review August 14, 2026 23:40
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@vllm-omni-review-bot

Copy link
Copy Markdown

This PR appears to be related to model: MinimaxH3.

Model owners: @david6666666

@lishunyang12, please review your own changes and leave a short self-review comment describing what you checked. PRs without author self-review may not be assigned a reviewer.

Please take a look when you have a chance. If you would like an automated review, mention @vllm-omni-review-bot in a comment.

@lishunyang12
lishunyang12 marked this pull request as draft August 14, 2026 23:47
Comment thread vllm_omni/quantization/component_config.py Outdated
Comment thread vllm_omni/quantization/svdquant_config.py
Comment thread vllm_omni/quantization/svdquant_flashinfer.py Outdated
@lishunyang12
lishunyang12 force-pushed the feat/minimax-h3-svdquant branch 2 times, most recently from 3660543 to 87969b2 Compare August 15, 2026 17:12
@lishunyang12 lishunyang12 changed the title [Kernel][Model] Add MiniMax-H3 SVDQuant W4A4 on Blackwell [diffusion][feature] Add MiniMax-H3 SVDQuant W4A4 Aug 15, 2026
@lishunyang12
lishunyang12 force-pushed the feat/minimax-h3-svdquant branch from fce0ef0 to 6455b57 Compare August 15, 2026 20:15
@lishunyang12

Copy link
Copy Markdown
Collaborator Author

Author self-review after the H3-only rewrite:\n\n- Rebased the branch onto current main and collapsed it to one self-contained MiniMax-H3 SVDQuant commit.\n- Audited both the local patch and GitHub file list: no Z-Image model, example, benchmark, converter branch, CLI option, or documentation entry remains in the PR diff. Generic SVDQuant runtime files are retained only because MiniMax-H3 exercises them.\n- Ran the complete changed-file pre-commit suite: passed.\n- Reran converter/config/FlashInfer/H3-contract/encoder-routing tests on the final commit: 212 passed, 4 skipped.\n- DCO, pre-commit, and Python 3.11/3.12 wheel builds are green; ReadTheDocs is still pending at the time of this review.

Add an offline FL2VA converter and serialized SVDQuant runtime using vLLM's existing NVFP4 GEMM plus a BF16 rank correction. Keep the text encoder, AdaLN projections, and VAEs in BF16, and limit the compatibility backend to validated SM100/SM103 hardware without requiring a new FlashInfer API.

Co-authored-by: ultism <www913363043@gmail.com>

Signed-off-by: lishunyang12 <lishunyang12@163.com>
@lishunyang12
lishunyang12 force-pushed the feat/minimax-h3-svdquant branch from 8f15b35 to 521c04c Compare August 21, 2026 01:55
@lishunyang12
lishunyang12 marked this pull request as ready for review August 21, 2026 01:57
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

Signed-off-by: lishunyang12 <lishunyang12@163.com>
Signed-off-by: lishunyang12 <lishunyang12@163.com>
Signed-off-by: lishunyang12 <lishunyang12@163.com>
@lishunyang12 lishunyang12 changed the title [diffusion][feature] Add MiniMax-H3 SVDQuant W4A4 [diffusion][quantization] Add offline SVDQuant W4A4 support Aug 22, 2026
Signed-off-by: lishunyang12 <lishunyang12@163.com>
@lishunyang12 lishunyang12 changed the title [diffusion][quantization] Add offline SVDQuant W4A4 support [diffusion][feature] Add offline SVDQuant W4A4 support Aug 22, 2026
Signed-off-by: lishunyang12 <lishunyang12@163.com>
@@ -0,0 +1,50 @@
# SVDQuant W4A4

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

update the feature design doc as well

Copy link
Copy Markdown
Collaborator

Reviewed c06c286b. I don't see a new code-level blocker: the implementation fits the current quantization architecture by adding an Omni factory override and vLLM QuantizationConfig/LinearMethod, while reusing the existing NVFP4 kernel ABI and preserving Column/Row/QKV TP loading.

I would still hold approval until the existing frozen-head BF16-vs-SVDQuant quality/performance request is addressed. Please also update both docs/design/feature/quantization.md and docs/user_guide/quantization/overview.md so the backend list, hardware matrix, model support, and component scope include SVDQuant/MiniMax-H3.

@hsliuustc0106 hsliuustc0106 added ready label to trigger buildkite CI cuda-test Used to trigger vllm-omni cuda CI separately. labels Aug 24, 2026

@hsliuustc0106 hsliuustc0106 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@hsliuustc0106
hsliuustc0106 merged commit 0e44fc7 into vllm-project:main Aug 27, 2026
6 checks passed
tzhouam added a commit that referenced this pull request Aug 27, 2026
The merge-with-main CI on #6606 (vllm-omni build 14192, Simple ·
Diffusion Test) failed with
  TypeError: is_layer_skipped() got an unexpected keyword argument
  'skip_with_substr'
in vllm_omni/quantization/svdquant_config.py.

The file arrived on main after this branch's rebase base via #6162
(offline SVDQuant W4A4), written against vLLM v0.27, whose
is_layer_skipped took skip_with_substr: bool. v0.28 replaced that flag
with match_mode: Literal["exact", "substring", "suffix"];
match_mode="substring" is the verbatim equivalent of the old
skip_with_substr=True (any ignored-layer name contained in the
prefix). Single call site; no other skip_with_substr use exists in the
tree.

Branch rebased onto main da4a08b to pick the file up (31 commits
replayed conflict-free; before/after net-diff oracle identical), then
the one-line adaptation applied on top.

Signed-off-by: tzhouam <tzhouam@connect.ust.hk>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
JoseCarlosGarcia95 pushed a commit to valendra-tech/vllm-omni that referenced this pull request Sep 5, 2026
…6162)

Signed-off-by: lishunyang12 <lishunyang12@163.com>
Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
khairulkabir1661 pushed a commit to khairulkabir1661/vllm-omni that referenced this pull request Sep 25, 2026
…6162)

Signed-off-by: lishunyang12 <lishunyang12@163.com>
Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda-test Used to trigger vllm-omni cuda CI separately. diffusion codes related to diffusion models quantization Code related to quantization ready label to trigger buildkite CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants