pub struct LogitsProcessorChain { /* private fields */ }Expand description
Logits processor chain for composing multiple processors
Implementations§
Source§impl LogitsProcessorChain
impl LogitsProcessorChain
Sourcepub fn new() -> LogitsProcessorChain
pub fn new() -> LogitsProcessorChain
Create new processor chain
Sourcepub fn add_processor(
self,
processor: Box<dyn LogitsProcessor>,
) -> LogitsProcessorChain
pub fn add_processor( self, processor: Box<dyn LogitsProcessor>, ) -> LogitsProcessorChain
Add processor to chain
Sourcepub fn process(&self, ctx: &mut SamplingContext<'_>) -> Result<(), FerrumError>
pub fn process(&self, ctx: &mut SamplingContext<'_>) -> Result<(), FerrumError>
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§
Source§impl Default for LogitsProcessorChain
impl Default for LogitsProcessorChain
Source§fn default() -> LogitsProcessorChain
fn default() -> LogitsProcessorChain
Returns the “default value” for a type. Read more
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