pub enum Sampler {
Custom {
temperature: f32,
sampler: Box<dyn Sample>,
},
Multinomial {
temperature: f32,
},
TopP {
temperature: f32,
top_p: f32,
},
TopK {
temperature: f32,
top_k: u32,
},
MinP {
temperature: f32,
min_p: f32,
},
TopKTopP {
temperature: f32,
top_k: u32,
top_p: f32,
},
}Variants§
Implementations§
Source§impl Sampler
impl Sampler
pub fn greedy() -> Self
pub fn top_p(temperature: f32, top_p: f32) -> Self
pub fn top_k(temperature: f32, top_k: u32) -> Self
pub fn min_p(temperature: f32, min_p: f32) -> Self
pub fn top_k_top_p(temperature: f32, top_k: u32, top_p: f32) -> Self
pub fn reasoning() -> Self
Auto Trait Implementations§
impl Freeze for Sampler
impl !RefUnwindSafe for Sampler
impl !Send for Sampler
impl !Sync for Sampler
impl Unpin for Sampler
impl !UnwindSafe for Sampler
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