pub enum Precision {
F16,
F32,
Int8,
}Expand description
The number format. The CPU computes in FP32 for both float settings.
Variants§
F16
FP16 weights and GEMM inputs with FP32 accumulation, as Laya’s autocast runs on a GPU.
F32
FP32 throughout, closest to Laya on the CPU.
Int8
INT8 weights and activations in the encoder and decision head GEMMs on the CPU, with the scorer in FP32. Faster, and further from Laya than FP32: see spec/10-cpu.md for the gate a checkpoint has to pass. Not on GPUs yet.
Trait Implementations§
impl Copy for Precision
impl Eq for Precision
impl StructuralPartialEq for Precision
Auto Trait Implementations§
impl Freeze for Precision
impl RefUnwindSafe for Precision
impl Send for Precision
impl Sync for Precision
impl Unpin for Precision
impl UnsafeUnpin for Precision
impl UnwindSafe for Precision
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.