pub struct Yarn {
pub factor: f32,
pub original_max_position_embeddings: f32,
pub beta_fast: f32,
pub beta_slow: f32,
pub mscale: f32,
pub mscale_all_dim: f32,
}Expand description
RopeScaling::Yarn’s parameters (mlx-lm’s defaults; Hugging Face’s truncate is
ignored, as by mlx-lm).
Fields§
§factor: f32The context’s scale (factor).
original_max_position_embeddings: f32The context length the model was trained with.
beta_fast: f32Rotations above which frequencies are kept (beta_fast).
beta_slow: f32Rotations below which frequencies are interpolated (beta_slow).
mscale: f32mscale.
mscale_all_dim: f32mscale_all_dim.
Trait Implementations§
impl Copy for Yarn
impl StructuralPartialEq for Yarn
Auto Trait Implementations§
impl Freeze for Yarn
impl RefUnwindSafe for Yarn
impl Send for Yarn
impl Sync for Yarn
impl Unpin for Yarn
impl UnsafeUnpin for Yarn
impl UnwindSafe for Yarn
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> Boilerplate for T
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<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