pub struct ResolvedGenerationConfig {
pub do_sample: bool,
pub temperature: f32,
pub top_k: i32,
pub top_p: f32,
pub min_p: f32,
pub repetition_penalty: f32,
pub repeat_last_n: i32,
pub frequency_penalty: f32,
pub presence_penalty: f32,
pub max_new_tokens: Option<usize>,
}Expand description
Fully resolved and validated generation settings.
Fields§
§do_sample: boolWhether sampling is stochastic.
temperature: f32Effective temperature.
top_k: i32Effective top-k cutoff.
top_p: f32Effective top-p probability.
min_p: f32Effective min-p probability.
repetition_penalty: f32Effective multiplicative repetition penalty.
repeat_last_n: i32Effective generated-history window for repetition penalties.
frequency_penalty: f32Effective additive frequency penalty.
presence_penalty: f32Effective additive presence penalty.
max_new_tokens: Option<usize>Effective token budget, when declared.
Trait Implementations§
Source§impl Clone for ResolvedGenerationConfig
impl Clone for ResolvedGenerationConfig
Source§fn clone(&self) -> ResolvedGenerationConfig
fn clone(&self) -> ResolvedGenerationConfig
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 moreimpl Copy for ResolvedGenerationConfig
Source§impl Debug for ResolvedGenerationConfig
impl Debug for ResolvedGenerationConfig
Source§impl<'de> Deserialize<'de> for ResolvedGenerationConfig
impl<'de> Deserialize<'de> for ResolvedGenerationConfig
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
Source§impl PartialEq for ResolvedGenerationConfig
impl PartialEq for ResolvedGenerationConfig
Source§impl Serialize for ResolvedGenerationConfig
impl Serialize for ResolvedGenerationConfig
impl StructuralPartialEq for ResolvedGenerationConfig
Auto Trait Implementations§
impl Freeze for ResolvedGenerationConfig
impl RefUnwindSafe for ResolvedGenerationConfig
impl Send for ResolvedGenerationConfig
impl Sync for ResolvedGenerationConfig
impl Unpin for ResolvedGenerationConfig
impl UnsafeUnpin for ResolvedGenerationConfig
impl UnwindSafe for ResolvedGenerationConfig
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