pub struct RopeScaling {
pub factor: f32,
pub high_freq_factor: f32,
pub low_freq_factor: f32,
pub original_max_position_embeddings: usize,
pub rope_type: Option<String>,
}Expand description
RoPE scaling configuration for models with extended context (e.g. LLaMA 3.1+).
Fields§
§factor: f32Factor for scaling (typically 8.0 for LLaMA 3.1).
high_freq_factor: f32High frequency factor (typically 4.0).
low_freq_factor: f32Low frequency factor (typically 1.0).
original_max_position_embeddings: usizeOriginal max position embeddings before scaling (typically 8192).
rope_type: Option<String>RoPE type (e.g. “llama3”).
Trait Implementations§
Source§impl Clone for RopeScaling
impl Clone for RopeScaling
Source§fn clone(&self) -> RopeScaling
fn clone(&self) -> RopeScaling
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RopeScaling
impl Debug for RopeScaling
Source§impl<'de> Deserialize<'de> for RopeScaling
impl<'de> Deserialize<'de> for RopeScaling
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RopeScaling
impl RefUnwindSafe for RopeScaling
impl Send for RopeScaling
impl Sync for RopeScaling
impl Unpin for RopeScaling
impl UnsafeUnpin for RopeScaling
impl UnwindSafe for RopeScaling
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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