pub struct LogitsProcessorChain { /* private fields */ }Expand description
Logits processor chain for composing multiple processors
Implementations§
Source§impl LogitsProcessorChain
impl LogitsProcessorChain
Sourcepub fn add_processor(self, processor: Box<dyn LogitsProcessor>) -> Self
pub fn add_processor(self, processor: Box<dyn LogitsProcessor>) -> Self
Add processor to chain
Sourcepub fn process(&self, ctx: &mut SamplingContext<'_>) -> Result<()>
pub fn process(&self, ctx: &mut SamplingContext<'_>) -> Result<()>
Process logits through entire chain
Sourcepub fn processor_names(&self) -> Vec<&str>
pub fn processor_names(&self) -> Vec<&str>
Get all processor names in order
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LogitsProcessorChain
impl !RefUnwindSafe for LogitsProcessorChain
impl Send for LogitsProcessorChain
impl Sync for LogitsProcessorChain
impl Unpin for LogitsProcessorChain
impl UnsafeUnpin for LogitsProcessorChain
impl !UnwindSafe for LogitsProcessorChain
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