pub struct SamplingParams {
pub temperature: f32,
pub top_k: usize,
pub top_p: f32,
pub repetition_penalty: f32,
pub repetition_token_ids: Vec<u32>,
pub repetition_token_freqs: Vec<u32>,
pub rng_seed: u32,
}Expand description
Sampling parameters for GPU-side token sampling.
Fields§
§temperature: f32§top_k: usize§top_p: f32§repetition_penalty: f32§repetition_token_ids: Vec<u32>Token IDs that have appeared in context (for repetition penalty).
repetition_token_freqs: Vec<u32>Frequency count for each token in repetition_token_ids.
rng_seed: u32Per-step RNG seed.
Trait Implementations§
Source§impl Clone for SamplingParams
impl Clone for SamplingParams
Source§fn clone(&self) -> SamplingParams
fn clone(&self) -> SamplingParams
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 moreAuto Trait Implementations§
impl Freeze for SamplingParams
impl RefUnwindSafe for SamplingParams
impl Send for SamplingParams
impl Sync for SamplingParams
impl Unpin for SamplingParams
impl UnsafeUnpin for SamplingParams
impl UnwindSafe for SamplingParams
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