Repository navigation
Support MXFP8 batch invariance for inference and TE grouped training - #7302
Merged
Merged
Conversation
Signed-off-by: wdykas <wdykas@nvidia.com>
Contributor
Author
|
/ok to test af0f048 |
wdykas
commented
Sep 14, 2026
Signed-off-by: wdykas <wdykas@nvidia.com>
Signed-off-by: wdykas <wdykas@nvidia.com>
wdykas
force-pushed
the
mxfp8-batch-invariant-torch-vllm
branch
from
September 14, 2026 17:14
af0f048 to
1cd8d1f
Compare
Contributor
Author
|
/ok to test 1cd8d1f |
Contributor
Author
|
/ok to test 76f1d82 |
Signed-off-by: wdykas <wdykas@nvidia.com>
Signed-off-by: wdykas <wdykas@nvidia.com>
Contributor
Author
|
/claude review |
Signed-off-by: wdykas <wdykas@nvidia.com>
wdykas
commented
Sep 14, 2026
Signed-off-by: wdykas <wdykas@nvidia.com>
copy-pr-bot
Bot
force-pushed
the
pull-request/7300
branch
from
September 14, 2026 19:44
978a029 to
9055503
Compare
wdykas
force-pushed
the
mxfp8-batch-invariant-torch-vllm
branch
from
September 14, 2026 20:23
76f1d82 to
8782626
Compare
…ance changes Signed-off-by: wdykas <wdykas@nvidia.com>
Contributor
Author
|
/ok to test 860a43c |
Contributor
Author
|
/ok to test 860a43c |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/35391133567 |
This was referenced Oct 1, 2026
This was referenced Oct 12, 2026
Merged
6 of 9 tasks
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add MXFP8 batch-invariant inference for Torch/vLLM and FlashInfer, plus TE device-metadata grouped GEMM training. This PR targets
main; the selective-precision prerequisite #7300 has already merged.Summary
moe_use_grouped_tensor=True, with 256-row expert padding. Its full workspace is separate for TN/NN/NT layouts and gated to SM100 + cuBLASLt 13.5.1 with TE'sGroupedLinear(use_grouped_tensor=...)API. Dense and legacy grouped GEMMs retain restricted workspace. TE op fuser remains unsupported, and the legacy environment switch alone is insufficient.Validation
After merging current
mainin860a43c11, the diff contains only the original 17-file change. Sixteen files are identical to the previously reviewed versions;transformer_config.pyalso preserves the upstream MTP validation changes.Validation on
860a43c11: six focused configuration tests passed; the determinism coverage gate againstmain, Black, isort, Ruff, and diff checks passed. The GPU suite below was not repeated for this merge.Original implementation validation on
691d03eaa:GB200, PyTorch 2.11.0+cu130, TE
2.20.0.dev0+51317b4, cuBLASLt 13.5.1:atol=0, rtol=0, including TE device-metadata training versus Torch/vLLM-selected MXFP8 inference.The previous Qwen/Nano NeMo RL zero-logprob smoke results are documented in #7333. Those full-model RL runs were not repeated for this combination; kernel/layer regression results are not a general full-model parity guarantee.
Numerical scope
FlashInfer routed MXFP8 is bitwise invariant across batch composition, but its GEMM is not bitwise identical to the TE training-policy GEMM. The earlier direct two-rank comparison differed in approximately 96% of one-layer BF16 outputs with maximum absolute error 8.5449e-4. Use Torch/vLLM-selected MXFP8 inference for the validated exact training-policy comparisons.
Forward invariance does not promise identical gradients across different minibatches.