pub struct TritBlock {
pub wq: TritMatrix,
pub wk: TritMatrix,
pub wv: TritMatrix,
pub wo: TritMatrix,
pub w1: TritMatrix,
pub w2: TritMatrix,
pub w3: TritMatrix,
pub attention_norm: Vec<f32>,
pub ffn_norm: Vec<f32>,
}Expand description
A single Transformer block (Attention + FeedForward).
Fields§
§wq: TritMatrix§wk: TritMatrix§wv: TritMatrix§wo: TritMatrix§w1: TritMatrix§w2: TritMatrix§w3: TritMatrix§attention_norm: Vec<f32>§ffn_norm: Vec<f32>Auto Trait Implementations§
impl Freeze for TritBlock
impl RefUnwindSafe for TritBlock
impl Send for TritBlock
impl Sync for TritBlock
impl Unpin for TritBlock
impl UnsafeUnpin for TritBlock
impl UnwindSafe for TritBlock
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> 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