pub enum KvCacheType {
Show 33 variants
Unknown(ggml_type),
F32,
F16,
Q4_0,
Q4_1,
Q5_0,
Q5_1,
Q8_0,
Q8_1,
Q2_K,
Q3_K,
Q4_K,
Q5_K,
Q6_K,
Q8_K,
IQ2_XXS,
IQ2_XS,
IQ3_XXS,
IQ1_S,
IQ4_NL,
IQ3_S,
IQ2_S,
IQ4_XS,
I8,
I16,
I32,
I64,
F64,
IQ1_M,
BF16,
TQ1_0,
TQ2_0,
MXFP4,
}
Expand description
A rusty wrapper around ggml_type
for KV cache types.
Variants§
Unknown(ggml_type)
Represents an unknown or not-yet-mapped ggml_type
and carries the raw value.
When passed through FFI, the raw value is used as-is (if llama.cpp supports it,
the runtime will operate with that type).
This variant preserves API compatibility when new ggml_type
values are
introduced in the future.
F32
F16
Q4_0
Q4_1
Q5_0
Q5_1
Q8_0
Q8_1
Q2_K
Q3_K
Q4_K
Q5_K
Q6_K
Q8_K
IQ2_XXS
IQ2_XS
IQ3_XXS
IQ1_S
IQ4_NL
IQ3_S
IQ2_S
IQ4_XS
I8
I16
I32
I64
F64
IQ1_M
BF16
TQ1_0
TQ2_0
MXFP4
Trait Implementations§
Source§impl Clone for KvCacheType
impl Clone for KvCacheType
Source§fn clone(&self) -> KvCacheType
fn clone(&self) -> KvCacheType
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 KvCacheType
impl Debug for KvCacheType
Source§impl From<KvCacheType> for ggml_type
impl From<KvCacheType> for ggml_type
Source§fn from(value: KvCacheType) -> Self
fn from(value: KvCacheType) -> Self
Converts to this type from the input type.
Source§impl From<u32> for KvCacheType
impl From<u32> for KvCacheType
Source§impl PartialEq for KvCacheType
impl PartialEq for KvCacheType
impl Copy for KvCacheType
impl Eq for KvCacheType
impl StructuralPartialEq for KvCacheType
Auto Trait Implementations§
impl Freeze for KvCacheType
impl RefUnwindSafe for KvCacheType
impl Send for KvCacheType
impl Sync for KvCacheType
impl Unpin for KvCacheType
impl UnwindSafe for KvCacheType
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