pub fn quantize_matrix<F>(
matrix: &ArrayView2<'_, F>,
bits: u8,
method: QuantizationMethod,
) -> (QuantizedMatrix, QuantizationParams)
Expand description
Quantize a floating-point matrix to a lower precision representation
§Arguments
matrix
- The input matrix to quantizebits
- The number of bits to use for quantization (typically 8)method
- The quantization method to use
§Returns
A tuple containing the quantized matrix and the quantization parameters
§Notes
For per-channel quantization, use quantize_matrix_per_channel
instead.