pub struct SamplerScratch { /* private fields */ }Expand description
Reusable per-pipeline sampling workspace. The epoch table lets the repetition penalty visit each token id once without allocating a HashSet or clearing a vocab-sized boolean vector on every decode step.
Trait Implementations§
Source§impl Debug for SamplerScratch
impl Debug for SamplerScratch
Source§impl Default for SamplerScratch
impl Default for SamplerScratch
Source§fn default() -> SamplerScratch
fn default() -> SamplerScratch
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SamplerScratch
impl RefUnwindSafe for SamplerScratch
impl Send for SamplerScratch
impl Sync for SamplerScratch
impl Unpin for SamplerScratch
impl UnsafeUnpin for SamplerScratch
impl UnwindSafe for SamplerScratch
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