pub enum Activations {
Exact,
Int8,
Int8TwoPass,
}Expand description
How the reference’s projections by quantized weights read their activations. Exact is the model’s arithmetic; the others are the activations a quantized matmul reads under llama.cpp’s rule — a quantized weight reads a quantized activation — computed as the GPU lane’s kernels compute them, so a lane can be held to its own precision.
Variants§
Exact
As computed, in f64.
Int8
Rounded to f32, then each 32 values one int8 word over a shared scale max|v| / 127 (1 for a zero block),
rounded to the nearest, ties to even.
Int8TwoPass
The high word as Int8 (the scale’s floor 1e-30, clamped to −128..127) and a low int8 word holding the
remainder v − hi·s at a 128th of the scale.
Trait Implementations§
Source§impl Clone for Activations
impl Clone for Activations
Source§fn clone(&self) -> Activations
fn clone(&self) -> Activations
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 Activations
impl Debug for Activations
Source§impl Default for Activations
impl Default for Activations
Source§fn default() -> Activations
fn default() -> Activations
Returns the “default value” for a type. Read more
Source§impl PartialEq for Activations
impl PartialEq for Activations
impl Copy for Activations
impl Eq for Activations
impl StructuralPartialEq for Activations
Auto Trait Implementations§
impl Freeze for Activations
impl RefUnwindSafe for Activations
impl Send for Activations
impl Sync for Activations
impl Unpin for Activations
impl UnsafeUnpin for Activations
impl UnwindSafe for Activations
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<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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&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
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.