pub struct TritTransformer {
pub config: TritTransformerConfig,
pub tok_embeddings: TritMatrix,
pub layers: Vec<TritBlock>,
pub norm: Vec<f32>,
pub output: TritMatrix,
pub freq_cis: Vec<(f32, f32)>,
}Expand description
The full TritTransformer model.
Fields§
§config: TritTransformerConfig§tok_embeddings: TritMatrix§layers: Vec<TritBlock>§norm: Vec<f32>§output: TritMatrix§freq_cis: Vec<(f32, f32)>Implementations§
Source§impl TritTransformer
impl TritTransformer
Sourcepub fn from_coherence(
coherence: ModelCoherence,
config: TritTransformerConfig,
) -> Self
pub fn from_coherence( coherence: ModelCoherence, config: TritTransformerConfig, ) -> Self
Load a TritTransformer from a ModelCoherence container.
Auto Trait Implementations§
impl Freeze for TritTransformer
impl RefUnwindSafe for TritTransformer
impl Send for TritTransformer
impl Sync for TritTransformer
impl Unpin for TritTransformer
impl UnsafeUnpin for TritTransformer
impl UnwindSafe for TritTransformer
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