Use TransformerEngine for MXFP8 quantization - #1935
Open
zianglih wants to merge 1 commit into
Open
Conversation
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
zianglih
marked this pull request as ready for review
July 29, 2026 08:40
zianglih
requested review from
Shi-Dong,
Zhichenzzz,
fzyzcjy,
guapisolo,
jybsuper,
maocheng23,
yueming-yuan and
yushengsu-thu
as code owners
July 29, 2026 08:40
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
52 tasks
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.
@HumansAnd
Summary
mxfp8_group_quantizere-export and its CPU import stubImplementation
The shared helper lazily constructs the TransformerEngine 2.17
MXFP8Quantizerin rowwise-only mode. It flattens leading dimensions, pads rows to TE's 32-row requirement, and crops the quantized payload and UE8M0 scales back to the existing compact, unswizzled checkpoint contract.Existing layer selection, BF16 carve-outs, source block-FP8 handling, tensor names, and output layouts are unchanged.
Validation
pre-commit run --all-filesradixark/miles:dev-202607290235python3 docker/verify_transformer_engine.py transformer_engine_cu132.17.0CUDA_VISIBLE_DEVICES=0 python3 -m pytest tests/fast-gpu/test_mxfp8_quantizer.py -xvs(108 passed)CUDA_VISIBLE_DEVICES=0 python3 -m pytest tests/fast/backends/megatron_utils/test_hf_weight_iterator_direct.py -xvs(6 passed)PYTHONPATH=/root/miles python3 tests/e2e/megatron/model_scripts/test_deepseek_v32_5layer_mxfp8.py(passed)allow_quant_error=True;/weights_checkerreturned HTTP 200mixed_version_ratio=0.0raysubmit_UP189w1SijVshDUfsucceeded