Skip to content

feat(modelopt): add format-general real-quant vLLM rollout - #3945

Draft
mxinO wants to merge 67 commits into
mainfrom
mxin/general-real-quant-refit
Draft

feat(modelopt): add format-general real-quant vLLM rollout#3945
mxinO wants to merge 67 commits into
mainfrom
mxin/general-real-quant-refit

Conversation

@mxinO

@mxinO mxinO commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds format-general ModelOpt real-quant rollout to NeMo-RL.

  • builds the vLLM deployment configuration from the calibrated policy before generation startup
  • streams ModelOpt-packed weights and format-owned sidecars through the Megatron-Bridge export plan
  • supports per-layer and mixed schemas without format tables in NeMo-RL
  • resolves grouped Hugging Face MoE mappings to native per-expert refit tensors through Megatron-Bridge
  • uses vLLM native layerwise reload for repeated real-quant refits
  • removes the prior custom NVFP4 packing, scale mapping, and quantization-method path
  • retains one narrow vLLM 0.25.1 compatibility backport that makes shared NVFP4 MoE scale storage writable during reload
  • shares real-quant orchestration across GRPO and distillation while leaving fake-quant generation unchanged

A rollout format is qualified when ModelOpt can export its canonical tensors and the pinned vLLM ModelOpt loader selects the intended native method for that exact schema. NeMo-RL does not translate unsupported schemas. Depending on vLLM, they may be rejected or may select an unquantized fallback, so representative native methods must be inspected before qualification.

Dependencies

The temporary Megatron-Bridge gitlink targets the dependency branch. Release pins will be updated after both dependency APIs land.

Online refit call flow

ModelOpt real-quant online refit caller path

Collective refit replaces the IPC/ZMQ transport calls with broadcast_weights_for_collective() and update_weights_from_collective(); the export and native vLLM reload paths are unchanged.

Validation

  • focused NeMo-RL real-quant unit suites and branch linters passed
  • dense W4A16 native-loader functional training completed repeated refits with finite loss and KL
  • matched Qwen3-8B runs completed 150 steps for BF16-attention control and MXFP8-attention treatment, both with NVFP4 W4A16 MLP
  • a four-node Qwen3.5 grouped-MoE W4A4 job completed two GRPO steps and repeated native vLLM refits with finite loss, KL, and reward

This remains a draft while dependency APIs land and release pins are finalized.

Qwen3-8B mixed-format qualification

The matched training comparison covers common steps 31-150:

  • control: BF16 attention + NVFP4 W4A16 MLP
  • treatment: MXFP8 attention + NVFP4 W4A16 MLP
  • final validation reward/accuracy: 0.2168 control, 0.2012 treatment

Qwen3-8B training and validation reward comparison

MXFP8 attention projection speed

GB200, vLLM 0.25.1, Qwen3-8B TP2 QKV/O shapes, measured as one CUDA graph over 36 distinct layers and 72 projections. Values above 1.0 mean MXFP8 is faster.

Decode rows M MXFP8 speed vs BF16
1 0.649x
32 0.645x
128 0.666x
512 0.881x
1024 0.956x
2048 1.194x
4096 1.285x

The current FlashInfer CuTeDSL MXFP8 path is slower at the rollout decode sizes and crosses over only at prefill-scale batches.

mxinO added 14 commits August 15, 2026 09:11
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
…nt-refit

Signed-off-by: Meng Xin <mxin@nvidia.com>

# Conflicts:
#	tests/unit/algorithms/test_grpo.py
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the Documentation Improvements or additions to documentation label Sep 1, 2026
@mxinO mxinO changed the title refactor(modelopt): generalize real-quant vLLM refit feat(modelopt): add format-general real-quant vLLM rollout Sep 1, 2026
mxinO added 13 commits August 31, 2026 19:49
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
This reverts commit 7a06b82.

Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
…nto mxin/refit-export-groups

Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: ebce1a1 (PR #3945 from mxin/general-real-quant-refit)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

Signed-off-by: Meng Xin <mxin@nvidia.com>
Signed-off-by: Meng Xin <mxin@nvidia.com>
@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 02d35a1 (PR #3945 from mxin/general-real-quant-refit)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

Signed-off-by: Meng Xin <mxin@nvidia.com>
@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 84ef399 (PR #3945 from mxin/general-real-quant-refit)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

Signed-off-by: Meng Xin <mxin@nvidia.com>
@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 46d845c (PR #3945 from mxin/general-real-quant-refit)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 79954dd (PR #3945 from mxin/general-real-quant-refit)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

Signed-off-by: Meng Xin <mxin@nvidia.com>
@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: a883a3e (PR #3945 from mxin/general-real-quant-refit)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

Signed-off-by: Meng Xin <mxin@nvidia.com>
@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 6b169e8 (PR #3945 from mxin/general-real-quant-refit)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

Signed-off-by: Meng Xin <mxin@nvidia.com>
@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 0918406 (PR #3945 from mxin/general-real-quant-refit)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

Signed-off-by: Meng Xin <mxin@nvidia.com>
@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 7158121 (PR #3945 from mxin/general-real-quant-refit)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@mxinO mxinO added CI:L2 Run doctests, unit tests, functional tests, and convergence tests CI:L1 Run doctests, unit tests, and functional tests and removed CI:L2 Run doctests, unit tests, functional tests, and convergence tests labels Sep 10, 2026
Signed-off-by: Meng Xin <mxin@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:L1 Run doctests, unit tests, and functional tests Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant