Skip to main content

quantize_model

Function quantize_model 

Source
pub fn quantize_model(
    tensors: &[(&str, &Tensor<f32>)],
    quant_type: QuantType,
) -> QuantResult<Vec<(String, QuantizedTensor)>>
Expand description

Quantizes a model (collection of named tensors).

§Arguments

  • tensors - Named tensors to quantize
  • quant_type - The target quantization type

§Returns

A map of quantized tensors