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 module
qmatmul
Provides CPU kernels for block-wise quantized int4 matrix multiplication.
comptime valuesβ
K_BATCH_SIZEβ
comptime K_BATCH_SIZE = 512
Defines the batch size of K used to pack A and unpack B weights.
Functionsβ
- β
matmul_qint4: Computes a matrix multiply of a float32 A matrix against block-wise quantized int4 B weights, producing a float32 result. - β
matmul_qint4_pack_b: Repacks block-wise quantized int4 weights into the tiled layout expected by thematmul_qint4kernels.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!