pub struct SamplerStatePayload {
pub rng_state: u64,
pub mirostat_mu: f32,
pub temperature: f32,
pub top_k: usize,
pub top_p: f32,
pub min_p: f32,
pub repetition_penalty: f32,
pub repetition_penalty_window: usize,
pub seed: Option<u64>,
pub mirostat_mode: u8,
pub mirostat_tau: f32,
pub mirostat_eta: f32,
}Expand description
Serializable sampler state for snapshot/resume.
Fields§
§rng_state: u64Raw Xorshift64 PRNG state (0 is remapped to 1 on restore).
mirostat_mu: f32Mirostat-v2 running surprise estimate (mu).
temperature: f32Temperature for logit scaling.
top_k: usizeTop-K (0 = disabled).
top_p: f32Top-P / nucleus threshold.
min_p: f32Min-P threshold.
repetition_penalty: f32Repetition penalty factor (1.0 = no penalty).
repetition_penalty_window: usizeWindow size for repetition penalty.
seed: Option<u64>Optional fixed RNG seed.
mirostat_mode: u8Mirostat mode: 0 = disabled, 2 = Mirostat v2.
mirostat_tau: f32Mirostat target surprise (tau).
mirostat_eta: f32Mirostat learning rate (eta).
Trait Implementations§
Source§impl Clone for SamplerStatePayload
impl Clone for SamplerStatePayload
Source§fn clone(&self) -> SamplerStatePayload
fn clone(&self) -> SamplerStatePayload
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 SamplerStatePayload
impl Debug for SamplerStatePayload
Source§impl Decode for SamplerStatePayload
impl Decode for SamplerStatePayload
Auto Trait Implementations§
impl Freeze for SamplerStatePayload
impl RefUnwindSafe for SamplerStatePayload
impl Send for SamplerStatePayload
impl Sync for SamplerStatePayload
impl Unpin for SamplerStatePayload
impl UnsafeUnpin for SamplerStatePayload
impl UnwindSafe for SamplerStatePayload
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