pub struct EntropyCooling {
pub target_entropy: f32,
pub cooling_rate: f32,
pub min_temperature: f32,
}Expand description
Lower temperature when entropy is too high (generation is too random).
When mean_entropy > target_entropy, temperature is scaled down by
cooling_rate * excess_ratio, clamped to [min_temperature, base_temp].
Fields§
§target_entropy: f32Entropy level above which cooling begins (in nats).
cooling_rate: f32Fraction of the excess entropy translated into temperature reduction (0..1).
min_temperature: f32Minimum temperature floor.
Implementations§
Trait Implementations§
Source§impl AdaptiveStrategy for EntropyCooling
impl AdaptiveStrategy for EntropyCooling
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 EntropyCooling
impl RefUnwindSafe for EntropyCooling
impl Send for EntropyCooling
impl Sync for EntropyCooling
impl Unpin for EntropyCooling
impl UnsafeUnpin for EntropyCooling
impl UnwindSafe for EntropyCooling
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