Skip to main content

LogitsProcessor

Trait LogitsProcessor 

Source
pub trait LogitsProcessor: Send + Sync {
    // Required methods
    fn process(&self, ctx: &mut SamplingContext<'_>) -> Result<()>;
    fn name(&self) -> &str;

    // Provided method
    fn priority(&self) -> ProcessorPriority { ... }
}
Expand description

Logits processor trait for modifying raw model outputs

Required Methods§

Source

fn process(&self, ctx: &mut SamplingContext<'_>) -> Result<()>

Process logits in-place

Source

fn name(&self) -> &str

Get processor name for debugging/logging

Provided Methods§

Source

fn priority(&self) -> ProcessorPriority

Whether this processor should be applied before others

Implementors§