IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

matmul_qint4

def matmul_qint4[group_size: Int, elementwise_lambda_fn: Optional[def[dtype: DType, width: SIMDLength, *, alignment: Int = Int(1)](IndexList[Int(2)], SIMD[dtype, width]) capturing thin -> None] = None](a_tt: TileTensor[DType.float32, Storage=a_tt.Storage, linear_idx_type=a_tt.linear_idx_type], b_tt: TileTensor[DType.uint8, Storage=b_tt.Storage, linear_idx_type=b_tt.linear_idx_type], c_tt: TileTensor[DType.float32, Storage=c_tt.Storage, linear_idx_type=c_tt.linear_idx_type], ctx: Optional[DeviceContext] = None)

Computes a matrix multiply of a float32 A matrix against block-wise quantized int4 B weights, producing a float32 result.

Dispatches to an architecture-specific kernel (VNNI, AVX2, NEON i8mm, or NEON dotprod) at compile time.

Parameters:

Args: