pub enum WeightFormat {
Nvfp4,
Fp8BlockScaled,
Bf16Dense,
}Expand description
Checkpoint weight format, detected from safetensors metadata.
Determines how raw weight bytes are interpreted and transformed into the runtime NVFP4 format used by Atlas GEMM kernels.
Variants§
Nvfp4
NVFP4 E2M1 on disk (nvidia ModelOpt or compressed-tensors).
Weights load directly into QuantizedWeight with no conversion.
Fp8BlockScaled
FP8 E4M3 block-scaled on disk (e.g. quant_method: "fp8" with weight_block_size).
Each weight tensor has a weight_scale_inv (BF16 per-block) companion.
At load time: FP8 -> BF16 -> NVFP4 (runtime quantization).
Bf16Dense
BF16 dense on disk (unquantized, e.g. attention Q/K/V in Standard NVFP4 models). At load time: BF16 -> NVFP4 (runtime quantization).
Implementations§
Source§impl WeightFormat
impl WeightFormat
Sourcepub fn detect(store: &WeightStore, config: &ModelConfig) -> Self
pub fn detect(store: &WeightStore, config: &ModelConfig) -> Self
Detect the weight format from a WeightStore by probing key names.
Trait Implementations§
Source§impl Clone for WeightFormat
impl Clone for WeightFormat
Source§fn clone(&self) -> WeightFormat
fn clone(&self) -> WeightFormat
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 WeightFormat
impl Debug for WeightFormat
Source§impl PartialEq for WeightFormat
impl PartialEq for WeightFormat
impl Copy for WeightFormat
impl Eq for WeightFormat
impl StructuralPartialEq for WeightFormat
Auto Trait Implementations§
impl Freeze for WeightFormat
impl RefUnwindSafe for WeightFormat
impl Send for WeightFormat
impl Sync for WeightFormat
impl Unpin for WeightFormat
impl UnwindSafe for WeightFormat
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.