pub enum Calibration {
Classifier,
LanguageModel,
}Expand description
Which family of numbers an adapter’s probabilities come from.
Calibration is not portable: a 0.8 from a purpose-trained
classifier and a 0.8 elicited from a general language model are
different numbers, and a threshold tuned against one is wrong against
the other. A module that thresholds on Answer::confidence states in
its own docs which Calibration its threshold was tuned against —
swapping the adapter re-tunes every threshold downstream of it.
Variants§
Classifier
Numbers from a model trained to classify: the probabilities are the model’s own outputs, tuned on labelled data.
LanguageModel
Numbers elicited from a general language model — asked to rate its
own certainty, or read off token log-probs. A different sharpness
at the same number than Calibration::Classifier, and it drifts
with the model version.
Implementations§
Trait Implementations§
Source§impl Clone for Calibration
impl Clone for Calibration
impl Copy for Calibration
Source§impl Debug for Calibration
impl Debug for Calibration
Source§impl<'de> Deserialize<'de> for Calibration
impl<'de> Deserialize<'de> for Calibration
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>,
Source§impl Display for Calibration
impl Display for Calibration
impl Eq for Calibration
Source§impl Hash for Calibration
impl Hash for Calibration
Source§impl PartialEq for Calibration
impl PartialEq for Calibration
Source§impl Serialize for Calibration
impl Serialize for Calibration
impl StructuralPartialEq for Calibration
Auto Trait Implementations§
impl Freeze for Calibration
impl RefUnwindSafe for Calibration
impl Send for Calibration
impl Sync for Calibration
impl Unpin for Calibration
impl UnsafeUnpin for Calibration
impl UnwindSafe for Calibration
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.