pub enum LinearFormat {
Dense,
Affine(AffineQuantization),
MxFp4,
GgufIQuant {
ggml_type: GgmlType,
endian: Endian,
},
E4M3BlockFp8(BlockFp8Format),
}Expand description
Complete physical encoding selected for one linear matrix.
Unlike WeightQuantization, this type includes dense and block-FP8
storage, so a neural-layer specification never needs an architecture-owned
format enum or an out-of-band quantization flag.
Variants§
Dense
Ordinary floating-point matrix storage.
Affine(AffineQuantization)
Per-group affine integer storage.
MxFp4
Microscaling FP4 with E2M1 values and E8M0 scales.
GgufIQuant
Checkpoint-native GGML blocks.
Fields
E4M3BlockFp8(BlockFp8Format)
E4M3 values with one inverse scale per two-dimensional block.
Implementations§
Source§impl LinearFormat
impl LinearFormat
Sourcepub fn validate(self) -> Result<(), Error>
pub fn validate(self) -> Result<(), Error>
Validates the selected physical encoding and its geometry.
Sourcepub const fn weight_quantization(self) -> Option<WeightQuantization>
pub const fn weight_quantization(self) -> Option<WeightQuantization>
Returns the packed-quantization descriptor when this format is represented by the standard affine/GGUF materializer.
Trait Implementations§
Source§impl Clone for LinearFormat
impl Clone for LinearFormat
Source§fn clone(&self) -> LinearFormat
fn clone(&self) -> LinearFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LinearFormat
Source§impl Debug for LinearFormat
impl Debug for LinearFormat
impl Eq for LinearFormat
Source§impl From<Option<WeightQuantization>> for LinearFormat
impl From<Option<WeightQuantization>> for LinearFormat
Source§fn from(value: Option<WeightQuantization>) -> Self
fn from(value: Option<WeightQuantization>) -> Self
Converts to this type from the input type.
Source§impl From<WeightQuantization> for LinearFormat
impl From<WeightQuantization> for LinearFormat
Source§fn from(value: WeightQuantization) -> Self
fn from(value: WeightQuantization) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LinearFormat
impl PartialEq for LinearFormat
impl StructuralPartialEq for LinearFormat
Auto Trait Implementations§
impl Freeze for LinearFormat
impl RefUnwindSafe for LinearFormat
impl Send for LinearFormat
impl Sync for LinearFormat
impl Unpin for LinearFormat
impl UnsafeUnpin for LinearFormat
impl UnwindSafe for LinearFormat
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