pub struct Int4Params {
pub scale: f32,
pub max_abs: f32,
}Expand description
Unstable: INT4 quantization internals; scale/bias scheme may change.
Quantization parameters for INT4 conversion.
Uses symmetric unsigned quantization: the float range [-max_abs, max_abs] is mapped to the integer range [0, 15].
Fields§
§scale: f32Unstable: scale factor; formula may change with quantization scheme update.
max_abs: f32Unstable: maximum absolute value; field may be removed.
Implementations§
Source§impl Int4Params
impl Int4Params
Sourcepub fn from_vector(vector: &[f32]) -> Self
pub fn from_vector(vector: &[f32]) -> Self
Unstable: quantization parameter computation; may be folded into Int4Vector::from_f32.
Trait Implementations§
Source§impl Clone for Int4Params
impl Clone for Int4Params
Source§fn clone(&self) -> Int4Params
fn clone(&self) -> Int4Params
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Int4Params
impl Debug for Int4Params
impl Copy for Int4Params
Auto Trait Implementations§
impl Freeze for Int4Params
impl RefUnwindSafe for Int4Params
impl Send for Int4Params
impl Sync for Int4Params
impl Unpin for Int4Params
impl UnsafeUnpin for Int4Params
impl UnwindSafe for Int4Params
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