pub enum QuantValue {
    Q8F,
    E5M2,
    E4M3,
    Q4F,
    E2M1,
    Q2F,
    Q8S,
    Q4S,
    Q2S,
}Expand description
Data type used to represent quantized values.
Variants§
Q8F
8-bit quantization with full range.
E5M2
8-bit floating point, e5m2 format.
E4M3
8-bit floating point, e4m3 format.
Q4F
4-bit quantization with full range.
E2M1
4-bit floating point, e2m1 format.
Q2F
2-bit quantization with full range.
Q8S
8-bit quantization with symmetric range.
Q4S
4-bit quantization with symmetric range.
Q2S
2-bit quantization with symmetric range.
Implementations§
Source§impl QuantValue
 
impl QuantValue
Sourcepub fn native_packing(&self) -> usize
 
pub fn native_packing(&self) -> usize
Packing factor for the native representation used for intermediate values. If > 1, values
should always be processed in native_packing sized chunks.
Sourcepub fn is_symmetric(&self) -> bool
 
pub fn is_symmetric(&self) -> bool
If the range of values is symmetric around zero.
Trait Implementations§
Source§impl Clone for QuantValue
 
impl Clone for QuantValue
Source§fn clone(&self) -> QuantValue
 
fn clone(&self) -> QuantValue
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 QuantValue
 
impl Debug for QuantValue
Source§impl<'de> Deserialize<'de> for QuantValue
 
impl<'de> Deserialize<'de> for QuantValue
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
Source§impl Hash for QuantValue
 
impl Hash for QuantValue
Source§impl Ord for QuantValue
 
impl Ord for QuantValue
Source§fn cmp(&self, other: &QuantValue) -> Ordering
 
fn cmp(&self, other: &QuantValue) -> Ordering
1.21.0 · 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
Source§impl PartialEq for QuantValue
 
impl PartialEq for QuantValue
Source§impl PartialOrd for QuantValue
 
impl PartialOrd for QuantValue
Source§impl Serialize for QuantValue
 
impl Serialize for QuantValue
impl Copy for QuantValue
impl Eq for QuantValue
impl StructuralPartialEq for QuantValue
Auto Trait Implementations§
impl Freeze for QuantValue
impl RefUnwindSafe for QuantValue
impl Send for QuantValue
impl Sync for QuantValue
impl Unpin for QuantValue
impl UnwindSafe for QuantValue
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<Q, K> Comparable<K> for Q
 
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.