pub struct QuantizationConfig {
pub quant_method: String,
pub format: String,
pub config_groups: HashMap<String, ConfigGroup>,
pub ignore: Vec<String>,
pub teenygrad_packed_int4: HashMap<String, PackedTensorInfo>,
}Expand description
The full quantization_config metadata blob embedded in the output .safetensors header.
Fields§
§quant_method: StringAlways "compressed-tensors".
format: String"int-quantized", "float-quantized", or "pack-quantized".
config_groups: HashMap<String, ConfigGroup>Named config groups (today, always a single "group_0").
ignore: Vec<String>Tensor names left unquantized (see should_quantize).
teenygrad_packed_int4: HashMap<String, PackedTensorInfo>teeny-quant extension: logical shape for each nibble-packed INT4 tensor.
Trait Implementations§
Source§impl Clone for QuantizationConfig
impl Clone for QuantizationConfig
Source§fn clone(&self) -> QuantizationConfig
fn clone(&self) -> QuantizationConfig
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 moreSource§impl Debug for QuantizationConfig
impl Debug for QuantizationConfig
Source§impl<'de> Deserialize<'de> for QuantizationConfig
impl<'de> Deserialize<'de> for QuantizationConfig
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 QuantizationConfig
impl RefUnwindSafe for QuantizationConfig
impl Send for QuantizationConfig
impl Sync for QuantizationConfig
impl Unpin for QuantizationConfig
impl UnsafeUnpin for QuantizationConfig
impl UnwindSafe for QuantizationConfig
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