pub struct CompressedTensorsFormat {
pub format: String,
pub ignore_modules: Vec<String>,
}Expand description
compressed-tensors NVFP4 checkpoint.
Fields§
§format: Stringformat string from config (e.g. "nvfp4-pack-quantized"). Log only.
ignore_modules: Vec<String>Module-path globs that stay BF16 rather than NVFP4.
Implementations§
Trait Implementations§
Source§impl Debug for CompressedTensorsFormat
impl Debug for CompressedTensorsFormat
Source§impl QuantFormat for CompressedTensorsFormat
impl QuantFormat for CompressedTensorsFormat
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 CompressedTensorsFormat
impl RefUnwindSafe for CompressedTensorsFormat
impl Send for CompressedTensorsFormat
impl Sync for CompressedTensorsFormat
impl Unpin for CompressedTensorsFormat
impl UnwindSafe for CompressedTensorsFormat
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