pub struct LightningDecay {
pub slopes: Vec<f32>,
pub scale: f32,
}Expand description
The two numbers a layer’s decay is built from.
Split out because both are functions of the LAYER and the head
count rather than of the file: minimax-01.cpp:288 derives the
per-layer scale from the layer index, and the slopes are the
geometric ladder ALiBi uses. A file that carried them would be
carrying dead metadata.
Fields§
§slopes: Vec<f32>One slope per head, in head order.
scale: f32This layer’s scale on every slope.
Implementations§
Trait Implementations§
Source§impl Clone for LightningDecay
impl Clone for LightningDecay
Auto Trait Implementations§
impl Freeze for LightningDecay
impl RefUnwindSafe for LightningDecay
impl Send for LightningDecay
impl Sync for LightningDecay
impl Unpin for LightningDecay
impl UnsafeUnpin for LightningDecay
impl UnwindSafe for LightningDecay
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more