pub enum GgmlDType {
Show 29 variants
F32,
F16,
BF16,
Q4_0,
Q4_1,
Q5_0,
Q5_1,
Q8_0,
Q8_1,
Q2K,
Q3K,
Q4K,
Q5K,
Q6K,
Q8K,
IQ4_NL,
IQ4_XS,
MXFP4,
IQ2_XXS,
IQ2_XS,
IQ3_XXS,
IQ1_S,
IQ3_S,
IQ2_S,
IQ1_M,
TQ1_0,
TQ2_0,
NVFP4,
Q1_0,
}Variants§
F32
F16
BF16
Q4_0
Q4_1
Q5_0
Q5_1
Q8_0
Q8_1
Q2K
Q3K
Q4K
Q5K
Q6K
Q8K
IQ4_NL
IQ4_XS
MXFP4
IQ2_XXS
IQ2_XS
IQ3_XXS
IQ1_S
IQ3_S
IQ2_S
IQ1_M
TQ1_0
TQ2_0
NVFP4
Q1_0
Implementations§
Source§impl GgmlDType
impl GgmlDType
Sourcepub fn to_u32(self) -> u32
pub fn to_u32(self) -> u32
GGML type id for this dtype. Single source of truth (generated from the
for_each_quant! table); cross-crate callers (e.g. hanzo-quant UQFF
serialization) use this instead of hand-rolled id maps that drift.
Sourcepub fn cpu_zeros(&self, elem_count: usize) -> Box<dyn QuantizedType>
pub fn cpu_zeros(&self, elem_count: usize) -> Box<dyn QuantizedType>
The block dtype
pub fn from_data(&self, data: Cow<'_, [u8]>) -> Box<dyn QuantizedType>
Sourcepub fn block_size(&self) -> usize
pub fn block_size(&self) -> usize
The block size, i.e. the number of elements stored in each block.
Trait Implementations§
impl Copy for GgmlDType
impl Eq for GgmlDType
impl StructuralPartialEq for GgmlDType
Auto Trait Implementations§
impl Freeze for GgmlDType
impl RefUnwindSafe for GgmlDType
impl Send for GgmlDType
impl Sync for GgmlDType
impl Unpin for GgmlDType
impl UnsafeUnpin for GgmlDType
impl UnwindSafe for GgmlDType
Blanket Implementations§
impl<T> Boilerplate for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<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.impl<T> ErasedDestructor for Twhere
T: 'static,
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