pub struct LogitTolerance {
pub relative_l2_max: f64,
pub cosine_similarity_min: f64,
pub top_k: usize,
pub top_k_overlap_min: usize,
pub require_unambiguous_argmax_match: bool,
pub argmax_margin_min: f32,
}Expand description
Thresholds specialized for rows of vocabulary logits.
Fields§
§relative_l2_max: f64Largest accepted L2 error relative to the reference norm.
cosine_similarity_min: f64Smallest accepted cosine similarity.
top_k: usizeNumber of leading vocabulary entries considered for overlap.
top_k_overlap_min: usizeSmallest accepted intersection of the two top-k sets.
require_unambiguous_argmax_match: boolRequire equal argmax when the reference margin is unambiguous.
argmax_margin_min: f32Reference top-1 minus top-2 margin above which argmax must agree.
Trait Implementations§
Source§impl Clone for LogitTolerance
impl Clone for LogitTolerance
Source§fn clone(&self) -> LogitTolerance
fn clone(&self) -> LogitTolerance
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 LogitTolerance
Source§impl Debug for LogitTolerance
impl Debug for LogitTolerance
Source§impl<'de> Deserialize<'de> for LogitTolerance
impl<'de> Deserialize<'de> for LogitTolerance
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for LogitTolerance
impl PartialEq for LogitTolerance
Source§impl Serialize for LogitTolerance
impl Serialize for LogitTolerance
impl StructuralPartialEq for LogitTolerance
Auto Trait Implementations§
impl Freeze for LogitTolerance
impl RefUnwindSafe for LogitTolerance
impl Send for LogitTolerance
impl Sync for LogitTolerance
impl Unpin for LogitTolerance
impl UnsafeUnpin for LogitTolerance
impl UnwindSafe for LogitTolerance
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