pub enum SamplingStrategy {
Greedy {
best_of: c_int,
},
BeamSearch {
beam_size: c_int,
patience: c_float,
},
}
Expand description
The sampling strategy to use to pick tokens from a list of likely possibilities.
Variants§
Greedy
Greedy sampling: picks the token with the highest probability after having seen best_of
tokens.
BeamSearch
Beam search. Much harder to explain in a blurb. Tends to be more accurate in exchange for more CPU time.
Trait Implementations§
Source§impl Clone for SamplingStrategy
impl Clone for SamplingStrategy
Source§fn clone(&self) -> SamplingStrategy
fn clone(&self) -> SamplingStrategy
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 moreAuto Trait Implementations§
impl Freeze for SamplingStrategy
impl RefUnwindSafe for SamplingStrategy
impl Send for SamplingStrategy
impl Sync for SamplingStrategy
impl Unpin for SamplingStrategy
impl UnwindSafe for SamplingStrategy
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