Skip to content

quant: add native mixed NVFP4/MXFP4 plus NF3 MoE serving - #104

Merged
lukealonso merged 2 commits into
dev/fathomless-firmamentfrom
codex/ff-nvfp4-nf3-hybrid-20260717
Jul 17, 2026
Merged

quant: add native mixed NVFP4/MXFP4 plus NF3 MoE serving#104
lukealonso merged 2 commits into
dev/fathomless-firmamentfrom
codex/ff-nvfp4-nf3-hybrid-20260717

Conversation

@voipmonitor

Copy link
Copy Markdown

Summary

Add native serving for per-expert mixed-precision MoE checkpoints such as madeby561/GLM-5.2-MXFP8-NVFP4-NF3-Hybrid: a high-saliency NVFP4 or MXFP4 tier and an NF3 tail selected by the checkpoint's hybrid_bit_map.

The method auto-detects modelopt-tagged hybrid checkpoints, demultiplexes expert weights into compact tier-local storage, and executes both tiers with preplanned B12X W4A16 launches sharing routing and scratch state. Layers absent from the map, including an MTP head, remain uniform NVFP4. An explicit incompatible --quantization selection is respected.

No environment variable or runtime monkey patch is required. This is the current-FF replacement for #92 and requires B12X master with merged NF3 support from local-inference-lab/b12x#31.

Validation

MadeBy561 and others added 2 commits July 17, 2026 08:52
A quantization method for per-expert mixed-precision MoE checkpoints:
high-saliency experts in NVFP4 (or MXFP4), a low-saliency tail in NF3
3-bit, both served through the b12x W4A16 fused MoE kernel as two
preplanned launches per layer sharing one route geometry and one
topk_sum (CUDA-graph-safe; TC-decode direct-topk path at M<=8).

Detection: a modelopt-tagged NVFP4 checkpoint whose quantization config
carries `hybrid_bit_map` (per-layer, per-expert bit widths; 4 = kept,
3 = NF3) selects this method automatically. `kept_format` optionally
switches the kept tier to MXFP4. No environment variables; scratch is
sized from max_num_batched_tokens.

Replaces the out-of-tree runtime graft that has served this
configuration in production since 2026-07-05. Requires b12x with the
nf3_2p1 W4A16 layout (local-inference-lab/b12x#31).

Co-authored-by: Claude (Fable 5) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@voipmonitor, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 09aa9ec9-7e90-47f3-b6fd-d5ddc99ee1c6

📥 Commits

Reviewing files that changed from the base of the PR and between e4879e1 and 7028ec1.

📒 Files selected for processing (4)
  • tests/quantization/test_nvfp4_nf3_hybrid.py
  • vllm/config/model.py
  • vllm/model_executor/layers/quantization/__init__.py
  • vllm/model_executor/layers/quantization/nvfp4_nf3_hybrid.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/ff-nvfp4-nf3-hybrid-20260717

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@voipmonitor

Copy link
Copy Markdown
Author

Canonical B12X pairing: merge local-inference-lab/b12x#31 (already on master) and #34 before production use of the hybrid checkpoint. #34 preserves the exact preplanned W4A16/NF3 tile geometry across the custom-op boundary. The current B12X master plus #28/#32/#34/#35 combined suite passed 120 tests (1 skipped) on SM120.

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.

3 participants