pub struct TemperatureProcessor {
pub temperature: f32,
}Expand description
Common logits processors Temperature scaling processor
Fields§
§temperature: f32Implementations§
Source§impl TemperatureProcessor
impl TemperatureProcessor
pub fn new(temperature: f32) -> TemperatureProcessor
Trait Implementations§
Source§impl LogitsProcessor for TemperatureProcessor
impl LogitsProcessor for TemperatureProcessor
Source§fn process(&self, ctx: &mut SamplingContext<'_>) -> Result<(), FerrumError>
fn process(&self, ctx: &mut SamplingContext<'_>) -> Result<(), FerrumError>
Process logits in-place
Source§fn priority(&self) -> ProcessorPriority
fn priority(&self) -> ProcessorPriority
Whether this processor should be applied before others
Auto Trait Implementations§
impl Freeze for TemperatureProcessor
impl RefUnwindSafe for TemperatureProcessor
impl Send for TemperatureProcessor
impl Sync for TemperatureProcessor
impl Unpin for TemperatureProcessor
impl UnsafeUnpin for TemperatureProcessor
impl UnwindSafe for TemperatureProcessor
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