pub struct LayerPrecision {
pub weight: Option<Operand>,
pub activation: Option<Operand>,
}Expand description
2026-09-28: What one linear layer declares. None means that operand is not quantized
(16-bit).
Fields§
§weight: Option<Operand>2026-09-28: The weight’s declared format.
activation: Option<Operand>2026-09-28: The input activations’ declared format.
Implementations§
Source§impl LayerPrecision
impl LayerPrecision
Sourcepub const UNQUANTIZED: LayerPrecision
pub const UNQUANTIZED: LayerPrecision
2026-09-28: 16-bit weights and activations.
Sourcepub fn activation_is_fp4(&self) -> bool
pub fn activation_is_fp4(&self) -> bool
2026-09-28: The activations are declared 4-bit float (W4A4 on an FP4 weight).
Sourcepub fn activation_is_fp8(&self) -> bool
pub fn activation_is_fp8(&self) -> bool
2026-09-28: The activations are declared 8-bit float.
Trait Implementations§
Source§impl Clone for LayerPrecision
impl Clone for LayerPrecision
Source§fn clone(&self) -> LayerPrecision
fn clone(&self) -> LayerPrecision
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 LayerPrecision
impl Debug for LayerPrecision
Source§impl PartialEq for LayerPrecision
impl PartialEq for LayerPrecision
impl Copy for LayerPrecision
impl Eq for LayerPrecision
impl StructuralPartialEq for LayerPrecision
Auto Trait Implementations§
impl Freeze for LayerPrecision
impl RefUnwindSafe for LayerPrecision
impl Send for LayerPrecision
impl Sync for LayerPrecision
impl Unpin for LayerPrecision
impl UnwindSafe for LayerPrecision
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.