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§
Sourcefn process(&self, ctx: &mut SamplingContext<'_>) -> Result<()>
fn process(&self, ctx: &mut SamplingContext<'_>) -> Result<()>
Process logits in-place
Provided Methods§
Sourcefn priority(&self) -> ProcessorPriority
fn priority(&self) -> ProcessorPriority
Whether this processor should be applied before others