quantize_vector

Function quantize_vector 

Source
pub fn quantize_vector<F>(
    vector: &ArrayView1<'_, F>,
    bits: u8,
    method: QuantizationMethod,
) -> (QuantizedVector, QuantizationParams)
Expand description

Quantize a floating-point vector to a lower precision representation

§Arguments

  • vector - The input vector to quantize
  • bits - The number of bits to use for quantization (typically 8)
  • method - The quantization method to use

§Returns

A tuple containing the quantized vector and the quantization parameters