pub struct SamplerConfig {
pub temperature: f32,
pub top_p: f32,
pub top_k: u32,
pub repetition_penalty: f32,
pub min_p: f32,
pub seed: Option<u64>,
}Expand description
Sampling configuration.
Fields§
§temperature: f32§top_p: f32§top_k: u32§repetition_penalty: f32§min_p: f32§seed: Option<u64>Fixed seed for reproducible generation (None = entropy).
Trait Implementations§
Source§impl Clone for SamplerConfig
impl Clone for SamplerConfig
Source§fn clone(&self) -> SamplerConfig
fn clone(&self) -> SamplerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SamplerConfig
impl Debug for SamplerConfig
Source§impl Default for SamplerConfig
impl Default for SamplerConfig
Source§impl<'de> Deserialize<'de> for SamplerConfig
impl<'de> Deserialize<'de> for SamplerConfig
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 SamplerConfig
impl RefUnwindSafe for SamplerConfig
impl Send for SamplerConfig
impl Sync for SamplerConfig
impl Unpin for SamplerConfig
impl UnsafeUnpin for SamplerConfig
impl UnwindSafe for SamplerConfig
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