pub struct Settings {
pub sample_len: usize,
pub temperature: f64,
pub top_p: Option<f64>,
pub top_k: Option<usize>,
pub repeat_penalty: f32,
pub repeat_last_n: usize,
pub seed: Seed,
}Fields§
§sample_len: usize§temperature: f64§top_p: Option<f64>§top_k: Option<usize>§repeat_penalty: f32§repeat_last_n: usize§seed: SeedImplementations§
Source§impl Settings
impl Settings
pub fn with_sample_len(self, len: usize) -> Self
pub fn with_temperature(self, temperature: f64) -> Self
pub fn with_top_p(self, top_p: Option<f64>) -> Self
pub fn with_top_k(self, top_k: Option<usize>) -> Self
pub fn with_repeat_penalty(self, repeat_penalty: f32) -> Self
pub fn with_repeat_last_n(self, repeat_last_n: usize) -> Self
pub fn with_seed(self, seed: Seed) -> Self
Trait Implementations§
impl Copy for Settings
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more