pub struct MlxQuantConfig {
pub bits: u32,
pub group_size: u32,
}Expand description
Quantization metadata parsed from the model’s config.json.
Both top-level quantization and quantization_config blocks are
recognised — MLX exports the same data under both keys.
Fields§
§bits: u32§group_size: u32Implementations§
Source§impl MlxQuantConfig
impl MlxQuantConfig
Sourcepub fn from_config(config: &JsonValue) -> Option<Self>
pub fn from_config(config: &JsonValue) -> Option<Self>
Look for quantization (or quantization_config as fallback)
at the top level of config.json. Returns None if either
the block is missing or the bits/group_size keys are absent —
non-MLX checkpoints flow through other detection paths.
Trait Implementations§
Source§impl Clone for MlxQuantConfig
impl Clone for MlxQuantConfig
Source§fn clone(&self) -> MlxQuantConfig
fn clone(&self) -> MlxQuantConfig
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 MlxQuantConfig
impl Debug for MlxQuantConfig
impl Copy for MlxQuantConfig
Auto Trait Implementations§
impl Freeze for MlxQuantConfig
impl RefUnwindSafe for MlxQuantConfig
impl Send for MlxQuantConfig
impl Sync for MlxQuantConfig
impl Unpin for MlxQuantConfig
impl UnwindSafe for MlxQuantConfig
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