pub enum RerankSourceKind {
FullPrecision,
StoredPrecision,
}Expand description
What precision the mandatory exact-cosine rerank read its vectors from.
the honesty backbone of --disclose explain and retrieve(): every
returned score IS a real cosine, but at WHICH precision depends on
whether a full-precision embeddings_fp (0x09) slab is present.
FullPrecision: a 0x09 fp slab is present (or the stored dtype is float32), so the rerank read full-precision vectors. “real cosine”.StoredPrecision: no fp slab and the stored dtype is lossy (float16/int8/int4), so the rerank read the stored quantized slab. “real cosine at stored precision”. still a real recomputed cosine, never a candidate-generator proxy, but at the on-disk precision.
this enum is computed in the runtime from
embeddings_fp_slab().is_some() + the stored dtype and never lies: a
sub-int8 corpus without an fp source reports StoredPrecision, so a
newcomer is never shown a stored-precision number as full-precision.
Variants§
FullPrecision
score recomputed against a full-precision source (0x09 fp slab, or the stored slab when the stored dtype is already float32).
StoredPrecision
score recomputed against the lossy stored slab (float16/int8/int4), no fp source present. disclosed as “real cosine at stored precision”.
Implementations§
Source§impl RerankSourceKind
impl RerankSourceKind
Sourcepub fn from_dtype(dtype: DType) -> Self
pub fn from_dtype(dtype: DType) -> Self
classify the precision the rerank reads from by its effective dtype (the 0x09 fp slab’s dtype when present, else the stored dtype). only float32 is full-precision; float16/int8/int4 are stored-precision. this is the single source of the honesty marker.
Sourcepub fn disclosure(self) -> &'static str
pub fn disclosure(self) -> &'static str
the one-line honesty marker for --disclose explain / retrieve().
Trait Implementations§
Source§impl Clone for RerankSourceKind
impl Clone for RerankSourceKind
impl Copy for RerankSourceKind
Source§impl Debug for RerankSourceKind
impl Debug for RerankSourceKind
impl Eq for RerankSourceKind
Source§impl PartialEq for RerankSourceKind
impl PartialEq for RerankSourceKind
impl StructuralPartialEq for RerankSourceKind
Auto Trait Implementations§
impl Freeze for RerankSourceKind
impl RefUnwindSafe for RerankSourceKind
impl Send for RerankSourceKind
impl Sync for RerankSourceKind
impl Unpin for RerankSourceKind
impl UnsafeUnpin for RerankSourceKind
impl UnwindSafe for RerankSourceKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.