pub enum SynthKind {
Codebook {
entry_dim: u32,
num_entries: u32,
},
}Expand description
Weight-synthesis strategy for Op::SynthMatMul — how a compact
stored representation is expanded into weight values inside the
matmul inner loop (never materialized in DRAM), generalizing
Op::DequantMatMul from fixed quant grids to learned functions.
Variants§
Codebook
Single-level vector quantization with a learned codebook. The
weight is stored transposed ([n, k], GGUF “bt” layout); each
contiguous entry_dim-length sub-vector along the contraction
axis k is replaced by a codebook centroid
codebook[index] ∈ ℝ^{entry_dim}. num_entries centroids; indices
are u8 (so num_entries ≤ 256). Requires k % entry_dim == 0.
Trait Implementations§
impl Copy for SynthKind
Source§impl<'de> Deserialize<'de> for SynthKind
impl<'de> Deserialize<'de> for SynthKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SynthKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SynthKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SynthKind
impl Serialize for SynthKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SynthKind
Auto Trait Implementations§
impl Freeze for SynthKind
impl RefUnwindSafe for SynthKind
impl Send for SynthKind
impl Sync for SynthKind
impl Unpin for SynthKind
impl UnsafeUnpin for SynthKind
impl UnwindSafe for SynthKind
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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