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 struct
Struct_matmul_weight_only_block_scaled_apple
struct Struct_matmul_weight_only_block_scaled_apple
Apple M5 weight-only NVFP4 (W4A16) matmul: out = a @ dequant(b)^T.
Unlike matmul.dynamic.block.scaled (the NVIDIA SM100 path), the
activation a stays in bf16 (NOT dynamically quantized to FP4) and the
weight block scales are PLAIN rank-2 [N, K // 16] (NOT the SM100 rank-5
TCGEN05 interleave). The FP4 weight is dequantized to bf16 in-register at
the MMA loader seam (enqueue_apple_fp4_matmul); weights stay packed in
DRAM. The NVFP4 per-tensor weight_scale_2 scalar is applied at the graph
level by the caller (a post-matmul multiply), so it is NOT an input here.
Implemented traitsโ
Methodsโ
executeโ
static def execute(c: T, a: T, b: T, b_scales: T, context: DeviceContext)