pub struct QuantizationUtils;Expand description
Utilities for working with quantization
Implementations§
Source§impl QuantizationUtils
impl QuantizationUtils
Sourcepub fn all_quantized_types() -> Vec<TensorType>
pub fn all_quantized_types() -> Vec<TensorType>
Get all supported quantization types
Sourcepub fn compare_formats(type_a: TensorType, type_b: TensorType) -> Ordering
pub fn compare_formats(type_a: TensorType, type_b: TensorType) -> Ordering
Compare two quantization formats
Sourcepub fn find_closest_quantization(target_bits: f32) -> TensorType
pub fn find_closest_quantization(target_bits: f32) -> TensorType
Get the most similar quantization to a target bit rate
Sourcepub fn get_quantization_family(tensor_type: TensorType) -> Option<&'static str>
pub fn get_quantization_family(tensor_type: TensorType) -> Option<&'static str>
Get the storage family for a supported tensor type.
Removed GGML types and the SDK-only IQ4_UNI variant return None.
Auto Trait Implementations§
impl Freeze for QuantizationUtils
impl RefUnwindSafe for QuantizationUtils
impl Send for QuantizationUtils
impl Sync for QuantizationUtils
impl Unpin for QuantizationUtils
impl UnsafeUnpin for QuantizationUtils
impl UnwindSafe for QuantizationUtils
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more