pub struct LongRope {
pub long_factor: Vec<f32>,
pub max_position_embeddings: f32,
pub original_max_position_embeddings: f32,
pub long_mscale: Option<f32>,
}Expand description
RopeScaling::LongRope’s parameters (mlx-lm’s defaults, long factors).
Fields§
§long_factor: Vec<f32>Per-pair factors (long_factor; one value applies to every pair).
max_position_embeddings: f32The maximum context length.
original_max_position_embeddings: f32The context length the model was trained with.
long_mscale: Option<f32>An explicit input scale (long_mscale).
Trait Implementations§
Source§impl Static for LongRope
impl Static for LongRope
Source§fn hash_static(&self, __h: &mut dyn Hasher)
fn hash_static(&self, __h: &mut dyn Hasher)
Feeds the value to
h.impl StructuralPartialEq for LongRope
Auto Trait Implementations§
impl Freeze for LongRope
impl RefUnwindSafe for LongRope
impl Send for LongRope
impl Sync for LongRope
impl Unpin for LongRope
impl UnsafeUnpin for LongRope
impl UnwindSafe for LongRope
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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