flashinfer.quantization.mxfp4_dequantize¶
- flashinfer.quantization.mxfp4_dequantize(a_fp4, a_sf, sfLayout: SfLayout = SfLayout.layout_128x4)¶
Dequantize MXFP4 packed weights back to float32.
- Parameters:
a_fp4 (torch.Tensor) – Quantized tensor of shape
[M, K/2]with dtypeuint8(FLOAT4_E2M1X2).a_sf (torch.Tensor) – UE8M0 scale-factor tensor (
uint8); shape depends onsfLayout.sfLayout (SfLayout) – Scale-factor layout used by
a_sf. Defaults toSfLayout.layout_128x4.
- Returns:
Dequantized tensor of shape
[M, K]with dtypefloat32.- Return type:
torch.Tensor