pub struct RepetitionAdaptation {
pub rep_threshold: f32,
pub cool_factor: f32,
pub heat_factor: f32,
}Expand description
Adapt temperature based on repetition rate.
- High repetition → cool down (reduce temperature) to break out of loops.
- Low repetition with high entropy → heat up slightly to encourage diversity.
Fields§
§rep_threshold: f32Repetition rate above which cooling is applied (0..1).
cool_factor: f32Multiply temperature by this factor when repeating (< 1.0 to cool).
heat_factor: f32Multiply temperature by this factor when stuck (> 1.0 to heat).
Implementations§
Trait Implementations§
Source§impl AdaptiveStrategy for RepetitionAdaptation
impl AdaptiveStrategy for RepetitionAdaptation
Source§fn adjust(
&self,
state: &GenerationState,
base: &SamplingParams,
) -> SamplingParams
fn adjust( &self, state: &GenerationState, base: &SamplingParams, ) -> SamplingParams
Given the current generation state and base params, return adjusted params.
Auto Trait Implementations§
impl Freeze for RepetitionAdaptation
impl RefUnwindSafe for RepetitionAdaptation
impl Send for RepetitionAdaptation
impl Sync for RepetitionAdaptation
impl Unpin for RepetitionAdaptation
impl UnsafeUnpin for RepetitionAdaptation
impl UnwindSafe for RepetitionAdaptation
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> 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