pub struct TopPProcessor {
pub p: f32,
}Expand description
Top-p (nucleus) filtering processor
Fields§
§p: f32Implementations§
Source§impl TopPProcessor
impl TopPProcessor
pub fn new(p: f32) -> TopPProcessor
Trait Implementations§
Source§impl LogitsProcessor for TopPProcessor
impl LogitsProcessor for TopPProcessor
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 TopPProcessor
impl RefUnwindSafe for TopPProcessor
impl Send for TopPProcessor
impl Sync for TopPProcessor
impl Unpin for TopPProcessor
impl UnsafeUnpin for TopPProcessor
impl UnwindSafe for TopPProcessor
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