Repository navigation
Conversation
Signed-off-by: Meng Xin <[email protected]>
|
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. |
Propagate deferred cache-wake failures and keep failed synchronizations stale. Permit native MXFP8 with FP8 KV only when ModelOpt owns the attention-scale lifecycle, retaining the legacy safety guards. Cover the failure paths and native quantization registry bindings. Signed-off-by: Meng Xin <[email protected]>
Require remote error propagation in the Gloo checks, cover both KV transport wrappers and their fatal-error state, and start the transfer-failure regression from current weights. Clarify simulated versus native KV recipes and native post-load scale validation. Signed-off-by: Meng Xin <[email protected]>
Remove the immediate-recapture fallback with no production caller. Use explicit callbacks in lifecycle tests and replace the unused NVFP4 metadata-field assertion with mixed-config attention-method selection. Signed-off-by: Meng Xin <[email protected]>
Signed-off-by: Meng Xin <[email protected]>
End-to-end KV-cache training check (with #5427's Bridge pin)Setup
Results. vLLM starts with the native cache the policy config selects:
Root cause: a 6× scale-convention mismatch for NVFP4 KV.
One-GPU check. I quantized the same K/V-shaped tensors with ModelOpt's TensorQuantizer (NVFP4, dynamic block-16) and with FlashInfer's native append kernel, then dequantized the cache:
Constant and calibrated amax give the same picture. With constant amax, 44% of V block scales also land in E4M3's subnormal range today (2.9% with So Where the fix goes. The The fix has to cover both cache writes and decode reads, which use the same global scale. The FP8 KV path is unaffected and looks ready. |
What and why
Follow up to #3945: add the NeMo RL consumer for ModelOpt's native FP8/NVFP4 KV caches, including KV-only recipes and combined weight+KV recipes.
ModelOpt remains responsible for quantization and scale semantics. Bridge emits Q/K/V scale companions in its existing QKV export groups. NeMo RL uses the existing IPC/collective refit stream and vLLM's native scale storage, validating coverage and preserving buffer addresses. Changed scales refresh cached attention coefficients and CUDA graphs after KV wake-up; fused attention/output quantization refreshes after every refit because it also caches weight-side scales.
Depends on #5427: that PR bumps the Bridge pin to one that includes both Bridge PRs listed below. Main's current pin rejects KV quantizers, so this does not work end to end until #5427 merges. This PR adds no dependency upgrades, new tensor transport, attention kernels, or study-specific behavior. Learner P-QDQ remains deferred; standard attention is targeted, with MLA rejected.
Issues
Follow-up to #3945.
Convergence / perf / functionality proof
3c815f8(0.49.0rc1.dev40). Scoped Pyrefly also passes in that container.docs/guides/quantization-aware-rl.md.Needs upstream changes
1ec9ce8b0), which brings in Megatron-Bridge #6726 (online Q/K/V scale export) and #7057 (KV-aware export validation). Both Bridge PRs have merged. The current pinae0a1b02rejects enabled KV quantizers, so this PR needs ci: bump MBridge to 1ec9ce8b0 #5427 to merge first.3c815f8db9717cb7f4cf44821e8e395edbb24c2b; no additional ModelOpt bump is needed here.PR commands and CI
CI:Lfast: the default for most PRs. Runs a fast test subset.CI:L1: dependency or container changes (pyproject.toml,uv.lock,Dockerfile) or broad core changes. Builds a new image and runs unit and functional tests.CI:docs: docs-only changes. Runs doc tests only./ok to test <full-commit-sha>: start CI for that commit. Post again after each push./nightly-ci test-case=<test>: run NVIDIA's nightly CI for the PR head; eligible teams only./review: automated review comments. Addmode=strictfor a stricter review,reset=truefor a fresh full review./resolve-conflict: Autobot mergesmaininto this PR and resolves the conflicts. PRs from forks must allow edits by maintainers./review-pr-team <pr-number>for a team review before you ask for human review.