pub struct UnifiedQuantizer { /* private fields */ }
Expand description
Unified Quantization Engine
Implementations§
Source§impl UnifiedQuantizer
impl UnifiedQuantizer
pub fn new(config: QuantizationConfig) -> Self
pub fn set_salience_weights(&mut self, weights: HashMap<usize, f32>)
pub fn quantize( &self, data: &[f32], ) -> Result<QuantizationResult, QuantizationError>
pub fn dequantize( &self, quantized: &[i32], params: &QuantizationParameters, ) -> Vec<f32>
Auto Trait Implementations§
impl Freeze for UnifiedQuantizer
impl RefUnwindSafe for UnifiedQuantizer
impl Send for UnifiedQuantizer
impl Sync for UnifiedQuantizer
impl Unpin for UnifiedQuantizer
impl UnwindSafe for UnifiedQuantizer
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