pub struct RotaryEmbeddingsConfig { /* private fields */ }Expand description
Configuration for rotary embeddings.
Implementations§
Source§impl RotaryEmbeddingsConfig
impl RotaryEmbeddingsConfig
Sourcepub fn build(
&self,
vb: VarBuilder<'_>,
) -> Result<RotaryEmbeddings, RotaryEmbeddingsError>
pub fn build( &self, vb: VarBuilder<'_>, ) -> Result<RotaryEmbeddings, RotaryEmbeddingsError>
Build a rotary embeddings module.
Sourcepub fn width(self, width: usize) -> Self
pub fn width(self, width: usize) -> Self
Width of the rotary embeddings.
The width must be even.
Default: 96
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RotaryEmbeddingsConfig
impl RefUnwindSafe for RotaryEmbeddingsConfig
impl Send for RotaryEmbeddingsConfig
impl Sync for RotaryEmbeddingsConfig
impl Unpin for RotaryEmbeddingsConfig
impl UnwindSafe for RotaryEmbeddingsConfig
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