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
decode_fp6_to_bf16
def decode_fp6_to_bf16[width: SIMDLength, //, fmt: FP6Format](code: SIMD[DType.uint8, width]) -> SIMD[DType.bfloat16, width]
Decodes FP6 codes to bfloat16.
Every FP6 value carries at most 3 mantissa bits and lives well inside bfloat16's exponent range, so the float32 decode followed by a bfloat16 cast is exact -- the cast never rounds.
Parameters:
- โwidth (
SIMDLength): SIMD width (lane count) of the code vector. - โfmt (
FP6Format): The FP6 encoding of the input codes.
Args:
- โcode (
SIMD[DType.uint8, width]): One FP6 code per lane in the low 6 bits (0..63).
Returns:
SIMD[DType.bfloat16, width]: The decoded values as SIMD[DType.bfloat16, width].