pub enum Granularity {
Tensor,
Channel,
Token,
Group(u32),
TensorGroup(u32),
Block(u32, u32),
Unstated,
}Expand description
2026-09-28: How many values share one scale.
Variants§
Tensor
2026-09-28: One scale for the whole tensor.
Channel
2026-09-28: One scale per output channel (weights).
Token
2026-09-28: One scale per token (activations).
Group(u32)
2026-09-28: One scale per n consecutive values along K.
TensorGroup(u32)
2026-09-28: One scale per n values plus a per-tensor global scale
(compressed-tensors tensor_group, ModelOpt NVFP4).
Block(u32, u32)
2026-09-28: One scale per [rows, cols] block (weights).
Unstated
2026-09-28: Not stated by the checkpoint.
Trait Implementations§
Source§impl Clone for Granularity
impl Clone for Granularity
Source§fn clone(&self) -> Granularity
fn clone(&self) -> Granularity
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 Granularity
impl Debug for Granularity
Source§impl PartialEq for Granularity
impl PartialEq for Granularity
impl Copy for Granularity
impl Eq for Granularity
impl StructuralPartialEq for Granularity
Auto Trait Implementations§
impl Freeze for Granularity
impl RefUnwindSafe for Granularity
impl Send for Granularity
impl Sync for Granularity
impl Unpin for Granularity
impl UnwindSafe for Granularity
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
Checks if this value is equivalent to the given key. Read more
§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.