Repository navigation
Description
Is your feature request related to a problem? Please describe.
RL frameworks frequently synchronize training weights with inference engines. For low-precision inference, this requires exporting quantized values and their associated scales.
There are two common workflows:
- Reuse existing quantized weights. When training already stores compatible, MXFP8 params, export their values and scales directly.
- Quantize weights for inference. When training stores BF16 parameters or inference needs different quantization, quantize the exported weights, then extract the resulting values and scales.
Both workflows need access to TE’s quantized tensor components. Today, downstream frameworks handle storage details such as padding, scale layouts, and byte interpretation themselves.
For example, NVIDIA-NeMo/RL#3908 extracts native MXFP8 storage through TE metadata, while Miles accesses internal buffers after TE quantization.
Describe the solution you'd like
Provide a supported way to export a TE quantized tensor’s values, scales, and the metadata needed to interpret them outside TE, initially for MXFP8.
This should support both existing quantized training parameters and newly quantized tensors. The goal is to let downstream integrations consume these components without depending on TE’s internal storage conventions.
Where compatible quantized storage already exists, export should preserve that representation without unnecessary dequantization and requantization. Copying, layout conversion, and storage lifetime behavior should be clear to callers.
Model-level conversion and distributed mappings would remain in tools such as Megatron Bridge. Synchronization, transport, and inference-specific loading would remain in downstream RL frameworks.
Describe alternatives you've considered
- Read TE metadata or internal buffers downstream. This works today but requires each integration to understand and maintain TE-specific extraction logic.
- Always convert to BF16 and requantize. This adds unnecessary work when compatible quantized storage already exists.
Additional context
Examples of relevant work:
- NeMo RL #3908: exports existing native MXFP8 training weights.
- Miles MXFP8 helper: extracts components after quantizing weights with TE.
- Megatron-Bridge #5917: model-level native MXFP8 export support.
- Verl #8129: proposed TE-based MXFP8 quantization during rollout synchronization.
- Slime low-precision documentation: describes BF16 conversion and FP8 quantization during synchronization.
Activity
bhargavchintam commentedon Oct 31, 2026
Hi, first contribution here. If nobody has started on this yet, I'd like to take it.
NeMo RL #3908, Megatron-Bridge #5917 and the Miles helper all view
_rowwise_dataasfloat8_e4m3fnand cut the padded_rowwise_scale_invdown to[*shape[:-1], K/32]by hand. I'd make that the supported output, as views where possible, copying only to drop padded scale columns or unswizzleoptimize_for_gemmscales. If that's the wrong output, please say so. My first step is a test intest_quantized_tensor.pythat checks those bytes againstdequantize().I'm starting with a method on
MXFP8TensorStorage. Would you rather have one standalone function that can also quantize a BF16 weight first, so both workflows share one call?