pub struct ModeloptFormat {
pub algo: String,
pub ignore_modules: Vec<String>,
}Expand description
ModelOpt-style NVFP4 checkpoint.
Fields§
§algo: Stringquant_algo declared in config ("NVFP4", "FP8", …). Used for
diagnostic logging — the actual dispatch uses base_variant.
ignore_modules: Vec<String>Module-path globs to load as dense BF16 rather than NVFP4.
Implementations§
Trait Implementations§
Source§impl Debug for ModeloptFormat
impl Debug for ModeloptFormat
Source§impl QuantFormat for ModeloptFormat
impl QuantFormat for ModeloptFormat
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Human-readable name for logs (
"modelopt", "compressed-tensors",
"fp8-blockscaled").Source§fn base_variant(&self) -> Nvfp4Variant
fn base_variant(&self) -> Nvfp4Variant
The
Nvfp4Variant that this format maps to in the existing
weight_map.rs dispatch. Allows the trait to co-exist with the
legacy variant-based call sites during incremental migration.Source§fn is_ignored(&self, module_path: &str) -> bool
fn is_ignored(&self, module_path: &str) -> bool
Is
module_path in the format’s ignore list (should be loaded
as dense BF16 rather than quantized)? module_path is the tensor
name with the trailing .weight_scale_2 / .weight_packed /
etc. stripped — i.e. the prefix passed to
weight_map::quantized_any.Source§fn variant_for(&self, module_path: &str) -> Nvfp4Variant
fn variant_for(&self, module_path: &str) -> Nvfp4Variant
Effective variant for a specific module: the base variant, or
Bf16Raw if the module is in the ignore list. Loaders should
consult this instead of base_variant when loading per-module.Auto Trait Implementations§
impl Freeze for ModeloptFormat
impl RefUnwindSafe for ModeloptFormat
impl Send for ModeloptFormat
impl Sync for ModeloptFormat
impl Unpin for ModeloptFormat
impl UnwindSafe for ModeloptFormat
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