pub struct SamplingPlan {
pub seed: u32,
pub temperature: f32,
pub top_k: i32,
pub top_p: f32,
pub min_p: f32,
pub typical_p: f32,
pub repetition: Option<RepetitionSampler>,
pub dry: Option<DrySampler>,
pub mirostat: Option<MirostatSampler>,
}Expand description
Native sampler configuration.
Fields§
§seed: u32Deterministic sampler seed.
temperature: f32Temperature; zero selects greedy decoding.
top_k: i32Top-k candidate count; zero disables the filter.
top_p: f32Nucleus probability.
min_p: f32Minimum probability relative to the most likely token.
typical_p: f32Locally typical probability mass; 1.0 disables the filter.
repetition: Option<RepetitionSampler>Optional repetition/frequency/presence penalties.
dry: Option<DrySampler>Optional DRY sampler.
mirostat: Option<MirostatSampler>Optional Mirostat terminal sampler.
Implementations§
Trait Implementations§
Source§impl Clone for SamplingPlan
impl Clone for SamplingPlan
Source§fn clone(&self) -> SamplingPlan
fn clone(&self) -> SamplingPlan
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 SamplingPlan
impl Debug for SamplingPlan
Source§impl Default for SamplingPlan
impl Default for SamplingPlan
Source§fn default() -> SamplingPlan
fn default() -> SamplingPlan
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SamplingPlan
impl<'de> Deserialize<'de> for SamplingPlan
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SamplingPlan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SamplingPlan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SamplingPlan
impl PartialEq for SamplingPlan
Source§impl Serialize for SamplingPlan
impl Serialize for SamplingPlan
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SamplingPlan
Auto Trait Implementations§
impl Freeze for SamplingPlan
impl RefUnwindSafe for SamplingPlan
impl Send for SamplingPlan
impl Sync for SamplingPlan
impl Unpin for SamplingPlan
impl UnsafeUnpin for SamplingPlan
impl UnwindSafe for SamplingPlan
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