pub struct PenaltyConfig {
pub repeat_penalty: f32,
pub repeat_last_n: i32,
pub frequency_penalty: f32,
pub presence_penalty: f32,
}Expand description
Backend-neutral repetition/frequency/presence controls.
Fields§
§repeat_penalty: f32Repetition multiplier; 1.0 disables it.
repeat_last_n: i32Number of recent tokens considered; negative means all.
frequency_penalty: f32Per-occurrence logit penalty.
presence_penalty: f32One-time penalty for every present token.
Implementations§
Source§impl PenaltyConfig
impl PenaltyConfig
Sourcepub fn is_identity(self) -> bool
pub fn is_identity(self) -> bool
Returns whether every penalty is disabled.
Trait Implementations§
Source§impl Clone for PenaltyConfig
impl Clone for PenaltyConfig
Source§fn clone(&self) -> PenaltyConfig
fn clone(&self) -> PenaltyConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PenaltyConfig
Source§impl Debug for PenaltyConfig
impl Debug for PenaltyConfig
Source§impl Default for PenaltyConfig
impl Default for PenaltyConfig
Source§impl PartialEq for PenaltyConfig
impl PartialEq for PenaltyConfig
impl StructuralPartialEq for PenaltyConfig
Auto Trait Implementations§
impl Freeze for PenaltyConfig
impl RefUnwindSafe for PenaltyConfig
impl Send for PenaltyConfig
impl Sync for PenaltyConfig
impl Unpin for PenaltyConfig
impl UnsafeUnpin for PenaltyConfig
impl UnwindSafe for PenaltyConfig
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