pub struct QuantConfig {
pub weight_type: DType,
pub scale_type: DType,
pub group_size: usize,
pub global_scale_type: DType,
}Expand description
Quantization configuration for a weight tensor.
Fields§
§weight_type: DTypeWeight storage type (e.g., E2M1 for NVFP4)
scale_type: DTypeScale factor type (e.g., FP8E4M3 for NVFP4 block scales)
group_size: usizeNumber of weights per scale factor (block size)
global_scale_type: DTypeGlobal scale factor type (FP32 for NVFP4)
Implementations§
Trait Implementations§
Source§impl Clone for QuantConfig
impl Clone for QuantConfig
Source§fn clone(&self) -> QuantConfig
fn clone(&self) -> QuantConfig
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 QuantConfig
impl Debug for QuantConfig
Source§impl<'de> Deserialize<'de> for QuantConfig
impl<'de> Deserialize<'de> for QuantConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QuantConfig
impl RefUnwindSafe for QuantConfig
impl Send for QuantConfig
impl Sync for QuantConfig
impl Unpin for QuantConfig
impl UnwindSafe for QuantConfig
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