#[repr(u8)]pub enum BitWidth {
B1 = 1,
B2 = 2,
B4 = 4,
B8 = 8,
B16 = 16,
}Expand description
Supported per-tensor quantization bit widths.
Variants§
B1 = 1
1-bit binary sign quantization ({-1, +1} * row_scale).
B2 = 2
2-bit symmetric quantization (code - 1).
B4 = 4
4-bit symmetric quantization (code - 7).
B8 = 8
8-bit symmetric quantization (code - 127).
B16 = 16
Unscaled IEEE 754 float16 storage.
Implementations§
Trait Implementations§
impl Copy for BitWidth
Source§impl<'de> Deserialize<'de> for BitWidth
impl<'de> Deserialize<'de> for BitWidth
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for BitWidth
Source§impl Ord for BitWidth
impl Ord for BitWidth
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for BitWidth
impl PartialOrd for BitWidth
impl StructuralPartialEq for BitWidth
Auto Trait Implementations§
impl Freeze for BitWidth
impl RefUnwindSafe for BitWidth
impl Send for BitWidth
impl Sync for BitWidth
impl Unpin for BitWidth
impl UnsafeUnpin for BitWidth
impl UnwindSafe for BitWidth
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