pub struct DevSamp {
pub temp: f32,
pub seed: u64,
pub ctr: u32,
pub top_k: i32,
pub top_p: f32,
pub min_p: f32,
pub penalty: Option<DevPenalty>,
}Expand description
Device-sample request for one batched row.
top_k=0 / top_p>=1.0 / min_p<=0.0 = that filter off. Greedy = temp<=0 (device
argmax); pure temperature = seeded gumbel; any filter on = filter_stats floor + the
filtered gumbel draw. penalty carries host-maintained sparse counts for the exact active
history window; the epilogue applies them on device before filters and sampling.
Fields§
§temp: f32§seed: u64§ctr: u32§top_k: i32§top_p: f32§min_p: f32§penalty: Option<DevPenalty>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DevSamp
impl RefUnwindSafe for DevSamp
impl Send for DevSamp
impl Sync for DevSamp
impl Unpin for DevSamp
impl UnsafeUnpin for DevSamp
impl UnwindSafe for DevSamp
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