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 module
fp6_quantization
MXFP6 activation quantization.
Converts bfloat16 activations to packed MXFP6 (four 6-bit codes per three
bytes) with one E8M0 scale per 32 elements, the layout the CDNA4 f8f6f4
block-scaled MFMA consumes and dequant_mxfp6 reverses.
The FP4/FP8 sibling (block_scaled_quantization.quantize_mx_amd) gives each scale group
to four cooperating threads, since 32 FP4 elements are only 16 bytes. FP6 keeps
one whole MX block per thread instead: 32 elements are exactly 24 bytes and one
scale, so the group reduction stays in registers and the store is three aligned
8-byte writes with no cross-lane traffic and no partial-byte ownership.
comptime valuesβ
BYTES_PER_THREADβ
comptime BYTES_PER_THREAD = 24
ELEMENTS_PER_THREADβ
comptime ELEMENTS_PER_THREAD = MXFP6_SF_VECTOR_SIZE
Functionsβ
- β
quantize_mxfp6_amd: Quantizes bfloat16 activations to MXFP6 with E8M0 block scales.