pub struct NucleusConfig {
pub p: f64,
pub temperature: f64,
pub min_tokens: usize,
}Expand description
Configuration for nucleus_sample and nucleus_sample_batch.
Fields§
§p: f64Cumulative-probability threshold defining the “nucleus”, in (0, 1].
temperature: f64Softmax temperature (> 0).
min_tokens: usizeMinimum number of tokens to keep (≥ 1). This safeguards against
pathologically tiny nuclei when p is very small.
Trait Implementations§
Source§impl Clone for NucleusConfig
impl Clone for NucleusConfig
Source§fn clone(&self) -> NucleusConfig
fn clone(&self) -> NucleusConfig
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 NucleusConfig
Source§impl Debug for NucleusConfig
impl Debug for NucleusConfig
Auto Trait Implementations§
impl Freeze for NucleusConfig
impl RefUnwindSafe for NucleusConfig
impl Send for NucleusConfig
impl Sync for NucleusConfig
impl Unpin for NucleusConfig
impl UnsafeUnpin for NucleusConfig
impl UnwindSafe for NucleusConfig
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