pub struct DeclaredPrecisionPlan {
pub source: PlanSource,
pub rules: Vec<Rule>,
pub ignore: Vec<Target>,
}Expand description
2026-09-28: The per-layer precision a checkpoint declares.
Fields§
§source: PlanSource2026-09-28: Dialect.
rules: Vec<Rule>2026-09-28: Schemes.
ignore: Vec<Target>2026-09-28: Modules left unquantized.
Implementations§
Source§impl DeclaredPrecisionPlan
impl DeclaredPrecisionPlan
Sourcepub const UNDECLARED: DeclaredPrecisionPlan
pub const UNDECLARED: DeclaredPrecisionPlan
2026-09-28: A plan that declares nothing (no quantization_config).
Sourcepub fn from_quantization_config(qc: &Value) -> Result<Self>
pub fn from_quantization_config(qc: &Value) -> Result<Self>
2026-09-28: Parse the quantization_config object (the value, not the whole
config.json). A ModelOpt hf_quant_config.json nested under "quantization" is
accepted as is.
Sourcepub fn resolve(&self, module: &str) -> LayerPrecision
pub fn resolve(&self, module: &str) -> LayerPrecision
2026-09-28: What module (a checkpoint module path such as
model.language_model.layers.3.mlp.gate_proj, no .weight suffix) declares.
Ignored modules are unquantized. Otherwise the compressed-tensors precedence
applies: exact names first, then patterns ordered by their text, then class
targets (Linear), and the first match wins.
Sourcepub fn is_undeclared(&self) -> bool
pub fn is_undeclared(&self) -> bool
2026-09-28: True when no module declares anything.
Trait Implementations§
Source§impl Clone for DeclaredPrecisionPlan
impl Clone for DeclaredPrecisionPlan
Source§fn clone(&self) -> DeclaredPrecisionPlan
fn clone(&self) -> DeclaredPrecisionPlan
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 DeclaredPrecisionPlan
impl Debug for DeclaredPrecisionPlan
Source§impl Default for DeclaredPrecisionPlan
impl Default for DeclaredPrecisionPlan
Source§fn default() -> DeclaredPrecisionPlan
fn default() -> DeclaredPrecisionPlan
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DeclaredPrecisionPlan
impl RefUnwindSafe for DeclaredPrecisionPlan
impl Send for DeclaredPrecisionPlan
impl Sync for DeclaredPrecisionPlan
impl Unpin for DeclaredPrecisionPlan
impl UnwindSafe for DeclaredPrecisionPlan
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