For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
compute_mxfp6_even_scale
def compute_mxfp6_even_scale[fmt: FP6Format](max_val: Float32) -> Float8_e8m0fnu
Computes the OCP MXFP6 E8M0 scale using even-mode rounding.
The FP6 generalization of compute_mxfp4_even_scale: it rounds the block
maximum at the target's mantissa boundary before deriving the exponent, so
a block whose maximum is just under a power-of-two boundary does not waste
a whole binade of range on the other 31 elements.
Parameters:
- fmt (
FP6Format): The FP6 encoding the block will be quantized to.
Args:
- max_val (
Float32): The largest magnitude in the 32-element block.
Returns:
Float8_e8m0fnu: The E8M0 scale for the block.