pub enum SamplingMethod {
Multinomial,
TopP(f64),
TopK(usize),
TopKP((usize, f64)),
}
Expand description
Sampling method for LogitsProcessor
.
- Multinomial (sample over all tokens)
- Top-P (nucleus sampling)
- Top-K (top-k sampling)
- Top-KP (both, top k first then top p)
Variants§
Trait Implementations§
source§impl Clone for SamplingMethod
impl Clone for SamplingMethod
source§fn clone(&self) -> SamplingMethod
fn clone(&self) -> SamplingMethod
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 moreAuto Trait Implementations§
impl RefUnwindSafe for SamplingMethod
impl Send for SamplingMethod
impl Sync for SamplingMethod
impl Unpin for SamplingMethod
impl UnwindSafe for SamplingMethod
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