pub struct GenerationConfig {
pub max_new_tokens: usize,
pub temperature: f32,
pub top_k: usize,
pub top_p: f32,
pub repetition_penalty: f32,
pub stop_tokens: Vec<u32>,
}Expand description
Generation configuration
Fields§
§max_new_tokens: usizeMaximum new tokens to generate
temperature: f32Temperature for sampling
top_k: usizeTop-K sampling
top_p: f32Top-P (nucleus) sampling
repetition_penalty: f32Repetition penalty
stop_tokens: Vec<u32>Stop tokens
Trait Implementations§
Source§impl Clone for GenerationConfig
impl Clone for GenerationConfig
Source§fn clone(&self) -> GenerationConfig
fn clone(&self) -> GenerationConfig
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 moreSource§impl Debug for GenerationConfig
impl Debug for GenerationConfig
Auto Trait Implementations§
impl Freeze for GenerationConfig
impl RefUnwindSafe for GenerationConfig
impl Send for GenerationConfig
impl Sync for GenerationConfig
impl Unpin for GenerationConfig
impl UnwindSafe for GenerationConfig
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