Skip to main content

quantize_weights

Function quantize_weights 

Source
pub fn quantize_weights(
    weights: &[Tensor],
    mode: QuantMode,
) -> Vec<QuantizedTensor>
Expand description

Quantize all weight tensors in a model checkpoint for storage/inference.

Returns (quantized_weights, original_shapes) for each weight tensor.