pub struct GenerateParameter {
pub max_new_tokens: usize,
pub seed: u64,
pub temperature: f64,
pub top_p: f64,
pub repeat_penalty: f32,
pub repeat_last_n: usize,
}Expand description
Parameters used to generate samples.
This struct defines various settings that influence the behavior of the text generation process, such as token limits, sampling temperature, and repeat penalties.
Fields§
§max_new_tokens: usizeMaximum number of new tokens to generate.
seed: u64Seed used for deterministic generation.
temperature: f64Temperature for sampling.
top_p: f64Nucleus sampling probability cutoff.
repeat_penalty: f32Penalty for repeating tokens.
repeat_last_n: usizeThe number of last tokens to consider for applying the repeat penalty.
Trait Implementations§
source§impl Clone for GenerateParameter
impl Clone for GenerateParameter
source§fn clone(&self) -> GenerateParameter
fn clone(&self) -> GenerateParameter
Returns a copy 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 GenerateParameter
impl Debug for GenerateParameter
source§impl Default for GenerateParameter
impl Default for GenerateParameter
source§impl<'de> Deserialize<'de> for GenerateParameter
impl<'de> Deserialize<'de> for GenerateParameter
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 RefUnwindSafe for GenerateParameter
impl Send for GenerateParameter
impl Sync for GenerateParameter
impl Unpin for GenerateParameter
impl UnwindSafe for GenerateParameter
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