pub enum QuantizationTier {
Full,
Int8,
Int4,
Binary,
}Expand description
Unstable: tier design is under active iteration; tier boundaries may change.
Quantization precision tier, ordered from highest to lowest fidelity.
Variants§
Full
Full f32 precision (4 bytes/dim, 1x baseline).
Int8
INT8 symmetric quantization (1 byte/dim, 4x compression).
Int4
INT4 packed nibble quantization (0.5 bytes/dim, 8x compression).
Binary
Binary sign-bit quantization (0.125 bytes/dim, 32x compression).
Implementations§
Source§impl QuantizationTier
impl QuantizationTier
Sourcepub fn bytes_per_dim(&self) -> f32
pub fn bytes_per_dim(&self) -> f32
Unstable: bytes-per-dimension constant; may change with new tiers.
Sourcepub fn compression_ratio(&self) -> f32
pub fn compression_ratio(&self) -> f32
Unstable: compression ratio; derived from bytes_per_dim, may be removed.
Sourcepub fn storage_bytes(&self, dims: usize) -> usize
pub fn storage_bytes(&self, dims: usize) -> usize
Unstable: storage byte computation; may change with new tiers.
Sourcepub fn from_age_seconds(age_secs: u64) -> Self
pub fn from_age_seconds(age_secs: u64) -> Self
Warning: this is a placeholder storage policy, not evidence that older vectors tolerate lower precision. Callers should measure retrieval quality for their workload.
Unstable: tier boundaries may be tuned.
Trait Implementations§
Source§impl Clone for QuantizationTier
impl Clone for QuantizationTier
Source§fn clone(&self) -> QuantizationTier
fn clone(&self) -> QuantizationTier
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for QuantizationTier
Source§impl Debug for QuantizationTier
impl Debug for QuantizationTier
impl Eq for QuantizationTier
Source§impl Hash for QuantizationTier
impl Hash for QuantizationTier
Source§impl Ord for QuantizationTier
impl Ord for QuantizationTier
Source§fn cmp(&self, other: &QuantizationTier) -> Ordering
fn cmp(&self, other: &QuantizationTier) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for QuantizationTier
impl PartialEq for QuantizationTier
Source§impl PartialOrd for QuantizationTier
impl PartialOrd for QuantizationTier
impl StructuralPartialEq for QuantizationTier
Auto Trait Implementations§
impl Freeze for QuantizationTier
impl RefUnwindSafe for QuantizationTier
impl Send for QuantizationTier
impl Sync for QuantizationTier
impl Unpin for QuantizationTier
impl UnsafeUnpin for QuantizationTier
impl UnwindSafe for QuantizationTier
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> Comparable<K> for Q
impl<Q, K> Comparable<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.