pub struct DefaultSampler;Expand description
Stateless greedy/categorical sampler.
Trait Implementations§
Source§impl Clone for DefaultSampler
impl Clone for DefaultSampler
Source§fn clone(&self) -> DefaultSampler
fn clone(&self) -> DefaultSampler
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 DefaultSampler
Source§impl Debug for DefaultSampler
impl Debug for DefaultSampler
Source§impl<B: SamplingBackend> Sampler<B> for DefaultSampler
impl<B: SamplingBackend> Sampler<B> for DefaultSampler
Source§fn uses_checkpoint_defaults(&self) -> bool
fn uses_checkpoint_defaults(&self) -> bool
Whether loaded checkpoint defaults should wrap this policy.
Source§impl<B: SamplingBackend> SpeculativeSampler<B> for DefaultSampler
impl<B: SamplingBackend> SpeculativeSampler<B> for DefaultSampler
Source§fn uses_checkpoint_defaults(&self) -> bool
fn uses_checkpoint_defaults(&self) -> bool
Whether loaded checkpoint defaults should wrap this policy.
Source§fn supports_exact_optimistic_promotion(&self) -> bool
fn supports_exact_optimistic_promotion(&self) -> bool
Whether optimistic draft work is an exact discardable fork.
Source§fn process_logits(
&mut self,
logits: &B::Logits,
temperature: f32,
_history: &[u32],
context: &B::Context,
) -> Result<B::Logits, B::Error>
fn process_logits( &mut self, logits: &B::Logits, temperature: f32, _history: &[u32], context: &B::Context, ) -> Result<B::Logits, B::Error>
Applies penalties, filters, and temperature.
Source§fn grammar_is_complete(&mut self) -> Result<bool, B::Error>
fn grammar_is_complete(&mut self) -> Result<bool, B::Error>
Whether the committed generation grammar is complete.
Source§fn prefix_is_complete(&self, _history: &[u32]) -> Result<bool, B::Error>
fn prefix_is_complete(&self, _history: &[u32]) -> Result<bool, B::Error>
Whether an uncommitted logical prefix completes the grammar.
Auto Trait Implementations§
impl Freeze for DefaultSampler
impl RefUnwindSafe for DefaultSampler
impl Send for DefaultSampler
impl Sync for DefaultSampler
impl Unpin for DefaultSampler
impl UnsafeUnpin for DefaultSampler
impl UnwindSafe for DefaultSampler
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