Skip to main content

QuantKind

Enum QuantKind 

Source
pub enum QuantKind {
Show 21 variants Q8_0, Q4_0, Q4K, Q5K, Q6K, Q2K, Q3K, Q4_1, Q5_0, Q5_1, Q8_1, IQ4NL, IQ4XS, IQ1S, IQ2XXS, IQ3XXS, IQ2XS, IQ2S, IQ3S, IQ1M, Mxfp4Gguf,
}

Variants§

§

Q8_0

§

Q4_0

§

Q4K

The dominant real-world GGUF quantization formats (most published checkpoints ship as Q4_K_M or similar K-quant mixes, not the legacy Q4_0/Q8_0 formats above). See ferrox_quant’s module docs for the block layout and independent Python cross-validation.

§

Q5K

§

Q6K

§

Q2K

The two more-aggressive K-quant tiers, used in Q2_K/Q3_K_M/ Q3_K_L-style quant mixes (the far more common Q4_K_M/Q5_K_M mixes only combine with Q6_K, already covered above). See ferrox_quant’s module docs and independent Python cross-validation.

§

Q3K

§

Q4_1

Legacy, largely-obsolete-for-new-releases formats, still occasionally encountered. See ferrox_quant’s module docs; byte layouts verified against real ggml-common.h source.

§

Q5_0

§

Q5_1

§

Q8_1

§

IQ4NL

Non-linear (“codebook”) quants: a 4-bit index maps through a shared 16-entry signed lookup table instead of a linear nibble*scale+min transform. See ferrox_quant’s module docs and independent Python cross-validation.

§

IQ4XS

§

IQ1S

The codebook-grid low-bit formats used throughout published “Dynamic” low-bit GGUFs of large MoE models (grid-table magnitudes + shared sign patterns; scalar kernels only so far). See ferrox_quant’s module docs and the ggml-cross-validated independent Python reference.

§

IQ2XXS

§

IQ3XXS

§

IQ2XS

The second codebook-grid tier (ggml tags 17/21/22/29), which the published UD-* recipes reach for when the _XXS tier is too lossy – IQ3_S especially, since it is most of what an IQ3_M mix contains. Scalar kernels only; goldens are the real compiled ggml dequantizers’ own output, asserted bit-exactly.

§

IQ2S

§

IQ3S

§

IQ1M

§

Mxfp4Gguf

GGUF block-MXFP4 (17-byte interleaved blocks, ggml tag 39) – not the same layout as WeightMatrix::Mxfp4’s two-buffer safetensors form, though the math is identical. Scalar kernel only so far.

Implementations§

Source§

impl QuantKind

Source

pub const ALL: &'static [QuantKind]

Every variant, so exhaustiveness can be tested rather than trusted. The kernel-coverage tests below iterate this; adding a variant without adding it here fails to compile (the match in Self::name is exhaustive and this list is checked against it).

Source

pub fn name(self) -> &'static str

The GGUF-facing name. Also the key [ferrox_metal::gpu::matvec_launch_meta] is looked up by, which is why it is one function and not a Debug impl.

Trait Implementations§

Source§

impl Clone for QuantKind

Source§

fn clone(&self) -> QuantKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for QuantKind

Source§

impl Debug for QuantKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for QuantKind

Source§

impl Hash for QuantKind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for QuantKind

Source§

fn eq(&self, other: &QuantKind) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for QuantKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.