pub struct EngineNumerics {
pub activations: Words,
pub scaling: ActScaling,
pub state: StateFormat,
pub cache: CacheFormat,
pub attention: AttentionMath,
pub flush: StateFlush,
pub fp_unit: FpUnit,
}Expand description
The knobs of the engine’s arithmetic.
Fields§
§activations: Words§scaling: ActScalingHow the activations a matrix reads are scaled: per 32 elements, or per the matrix format’s own block.
state: StateFormat§cache: CacheFormat§attention: AttentionMath§flush: StateFlushHow a Gated-DeltaNet memory is carried: rewritten every token, or held at its last flush with a log of the
tokens since, read through the log and flushed once every tokens, or a window of tokens behind (Replay).
fp_unit: FpUnitThe multiplier every f32 product is computed by: the engine’s own, or the card’s floating-point DSP block.
Implementations§
Source§impl EngineNumerics
impl EngineNumerics
Sourcepub fn precise() -> EngineNumerics
pub fn precise() -> EngineNumerics
The most precise knob point: two-word activations scaled per 32 elements, an f32 state, an f16 cache, attention on the vector units.
Sourcepub fn fastest() -> EngineNumerics
pub fn fastest() -> EngineNumerics
The fastest knob point the serving roofline prices: one-word activations scaled per weight block, an f16 state flushed every 16 tokens, a rotated int8 cache, attention on the array.
Sourcepub fn real_points() -> [EngineNumerics; 4]
pub fn real_points() -> [EngineNumerics; 4]
Sourcepub fn real_points_for(spec: &ModelSpec) -> [EngineNumerics; 4]
pub fn real_points_for(spec: &ModelSpec) -> [EngineNumerics; 4]
The knob points a real checkpoint of spec is held to: real_points when every attention
layer norms its queries and keys, and otherwise the same points with the two-word point’s int8 cache rotated and
the family’s fastest_for: un-normed keys carry outlier channels an unrotated int8 cache
loses and the rotation spreads. Measured on Llama-3.2-1B against llama.cpp’s runs of its corpus: two words on an
int8 cache followed the f32 run 458 steps to the shipped run’s 462, rotated 501.
Sourcepub fn fastest_for(spec: &ModelSpec) -> EngineNumerics
pub fn fastest_for(spec: &ModelSpec) -> EngineNumerics
The fastest knob point spec’s family is held to: fastest, its attention on the vector units
when a layer’s keys are not normed (Llama-3.2-1B’s logits after the prompt sat 0.098 from llama.cpp’s f32 run’s
on the vector units, within the shipped run’s 0.080 by two standard errors, and 0.112 on the array).
Sourcepub fn all() -> Vec<EngineNumerics>
pub fn all() -> Vec<EngineNumerics>
Every knob point the engine runs.
Trait Implementations§
Source§impl Clone for EngineNumerics
impl Clone for EngineNumerics
Source§fn clone(&self) -> EngineNumerics
fn clone(&self) -> EngineNumerics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EngineNumerics
impl Debug for EngineNumerics
Source§impl Hash for EngineNumerics
impl Hash for EngineNumerics
Source§impl PartialEq for EngineNumerics
impl PartialEq for EngineNumerics
impl Copy for EngineNumerics
impl Eq for EngineNumerics
impl StructuralPartialEq for EngineNumerics
Auto Trait Implementations§
impl Freeze for EngineNumerics
impl RefUnwindSafe for EngineNumerics
impl Send for EngineNumerics
impl Sync for EngineNumerics
impl Unpin for EngineNumerics
impl UnsafeUnpin for EngineNumerics
impl UnwindSafe for EngineNumerics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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
§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
key and return true if they are equal.