#[non_exhaustive]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 (Non-exhaustive)§
This enum is marked as non-exhaustive
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.