pub struct QuantParamsI4 {
pub scale: f64,
pub zero_point: i8,
}Expand description
Quantization parameters for i4 (nibble-packed) tensors.
i4 values range from -8 to +7 (signed) or 0 to 15 (unsigned). Stored packed: two i4 values per byte (high nibble, low nibble).
Fields§
§scale: f64Scale factor.
zero_point: i8Zero point in i4 range [-8, 7].
Implementations§
Trait Implementations§
Source§impl Clone for QuantParamsI4
impl Clone for QuantParamsI4
Source§fn clone(&self) -> QuantParamsI4
fn clone(&self) -> QuantParamsI4
Returns a duplicate of the value. Read more
1.0.0 · 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 QuantParamsI4
impl Debug for QuantParamsI4
impl Copy for QuantParamsI4
Auto Trait Implementations§
impl Freeze for QuantParamsI4
impl RefUnwindSafe for QuantParamsI4
impl Send for QuantParamsI4
impl Sync for QuantParamsI4
impl Unpin for QuantParamsI4
impl UnsafeUnpin for QuantParamsI4
impl UnwindSafe for QuantParamsI4
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more