Skip to content

[Bugfix][Humming] Fix per-tensor FP8 MoE w13 scale - #61412

Closed
lesj0610 wants to merge 2 commits into
vllm-project:mainfrom
lesj0610:fix/humming-fp8-tensor-w13-scale
Closed

lesj0610 wants to merge 2 commits into
vllm-project:mainfrom
lesj0610:fix/humming-fp8-tensor-w13-scale

Conversation

@lesj0610

@lesj0610 lesj0610 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Fixes the Humming load crash for per-tensor FP8 MoE checkpoints, which currently fails the Qwen3-30B-A3B-Fp8-v1-humming and Qwen3-30B-A3B-Fp8-v1-humming-act-fp8 LM Eval configs on main (seen in the B200 and H100 Humming jobs on #60948). Regressed in #56997.

Claims

  • Per-tensor FP8 MoE with --moe-backend humming loads again instead of failing engine init with assert scale.size(0) == (num_experts or 1).
  • The fix covers every producer that requantizes w13 to one scale per expert (compressed-tensors, fp8, ModelOpt, online FP8). Block, channel and MXFP8 scales and non-gated MoE are unchanged.

Validation

nm-testing/Qwen3-30B-A3B-Fp8-v1 with --moe-backend humming --linear-backend humming --enforce-eager on SM80:

main this PR
Engine init AssertionError in humming/schema/base.py loads
Qwen3-30B-A3B-Fp8-v1-humming GSM8K (1319 q, 5-shot, threshold 0.86) crash 0.8787, passed
cd tests
pytest -s -v evals/gsm8k/test_gsm8k_correctness.py --config-list-file=<list containing Qwen3-30B-A3B-Fp8-v1-humming.yaml>

The -act-fp8 config needs FP8 activations, which Humming rejects on SM80 by design. Locally it now gets past the weight conversion (w13 converts to a channel scale) and stops at that input-schema check, so its accuracy is left to the H100/B200 Humming jobs.

Details

Since #56997, the Humming branch of convert_to_fp8_moe_kernel_format writes the processed tensors back to the layer before the Humming conversion. For per-tensor FP8, process_fp8_weight_tensor_strategy_moe has already requantized w13 to the max scale of each expert, so the layer now holds a [E] w13 scale. Humming's per-tensor schema expects one scale per gate/up shard: with two n-stacks it views the scale as (-1, 2, 1), which turns [E] into [E/2, 2, 1] and trips the assertion.

Dropping the write-back would bring back the old pairing of requantized weights with the per-shard checkpoint scales. Instead this repeats the requantized scale for both shards, which matches the requantized weight exactly. numel == num_experts only holds for per-tensor scales, and non-gated w13 keeps a single n-stack. The existing Humming LM Eval configs already cover this path, so no new test.


Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (Mandatory for agents, optional for humans).

  • AI assistance was used during the creation of this PR.

  • Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.

  • Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.

  • Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.

  • Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.

AI assistance: Claude

Per-tensor FP8 MoE requantizes w13 to one scale per expert before the
kernel conversion, but Humming's per-tensor schema splits the w13 scale
across the gate and up shards and asserts on the [E] tensor. Repeat the
scale per shard for gated w13.

Signed-off-by: lesj0610 <lesj0610@gmail.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added the bug Something isn't working label Oct 13, 2026
@wzhao18 wzhao18 added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 13, 2026
@wzhao18

wzhao18 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

/ci run

@github-actions

Copy link
Copy Markdown

✅ @lesj0610, CI is now available for this PR.

  • /ci run starts upstream CI; /amd-ci run starts AMD CI only.
  • Your branch must contain every commit currently on its upstream target branch. Merge or rebase onto the latest target branch, then rerun the command. Append --allow-stale to a run command to test an outdated branch at your own risk.
  • /ci retry retries failed jobs in the CI build for the current PR head. If the current head has no CI build, it starts a new CI build for the current head containing only jobs that failed in the latest earlier CI build for this PR.
  • /amd-ci retry retries failed jobs in AMD CI for the current PR head. Use /amd-ci run when the current head has no AMD CI build.
  • /ci cancel cancels scheduled or running CI builds for this PR branch; /amd-ci cancel does the same for AMD CI only.

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #94516 for commit ebaa1481a96b.

@wzhao18

wzhao18 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

@khluu Can you enable the humming-related lm eval tests which fail in main in the CI? so we verify this PR indeed fixes those issues.

@wzhao18

wzhao18 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

/ci retry

@github-actions

Copy link
Copy Markdown

✅ Queued 1 failed job(s) for retry in Buildkite CI #94516.

@mgoin

mgoin commented Oct 14, 2026

Copy link
Copy Markdown
Member

Should be fixed by humming bump in #61556

@mgoin mgoin closed this Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants