Skip to main content

Module nvfp4

Module nvfp4 

Source
Expand description

Compatibility exports for the canonical Etalon numerical implementation.

Enums§

Nvfp4Error
Error conditions during NVFP4 unpacking.

Constants§

E2M1_TABLE
Standard E2M1 FP4 lookup table (16 entries: 1 sign, 2 exp, 1 mantissa).
NVFP4_BLOCK_SIZE
NVFP4 block size: each scale factor governs 16 weights (8 packed bytes).
NVFP4_BYTES_PER_BLOCK

Functions§

dequantize_nvfp4_block
Dequantize a single 16-element block of NVFP4 weights.
dequantize_nvfp4_row
Dequantize a row of packed NVFP4 weights into caller-supplied out_row.
fp8_e4m3_to_f32
Convert an FP8 E4M3 byte to f32.
nvfp4_gemv_zero_heap
Compute Matrix-Vector multiplication $y = A \cdot x$ where $A$ is in NVFP4 format.