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
per_channel_grouped_4bit
Provides per-channel grouped 4-bit quantization and K-quant dequantization kernels.
Structsβ
- β
block_Q4_K: Represents a single Q4_K quantization block with grouped 4-bit values. - β
block_Q6_K: Represents a single Q6_K quantization block with grouped 6-bit values. - β
block_QK_K: Defines the element count per block shared by K-quant formats. - β
Q4sym: Q4sym: compresses values of typefloat_dtypeto 4bit unsigned integers which have been dynamically symmetrically quantized with the given scale factor.
Functionsβ
- β
calculate_symmetric_vector: Symmetrically quantizes the given SIMD vectordatawith input typeinput_dtypeandsimd_widthelements, assuming we want the results to fit in an unsigned integer of sizeoutput_bits. - β
q4_k_dequantize_impl: Dequantizes a Q4_K encoded tensor into a float32 output tensor. - β
q6_k_dequantize_impl: Dequantizes a Q6_K encoded tensor into a float32 output tensor. - β
scale_min_k4: Extracts the 6-bit quantized scale and min for groupgfrom a Q4_K block.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!