pub struct ProductQuantizerOptions {
pub training_samples: usize,
pub seed: u64,
pub rerank_factor: usize,
}Expand description
Product-quantizer training parameters. Used only when
AnnQuantization::Product is selected; the representation
(subvector count, bits) is declared on the variant.
Fields§
§training_samples: usizeCap on training samples drawn from the pinned read generation. Default 256_000. Training cost is bounded by this value.
seed: u64Deterministic training seed. Same seed + same training data yields byte-identical codebooks (checkpoint reproducibility).
rerank_factor: usizeRerank factor: the top k * rerank_factor ADC candidates are reranked
using reconstructed approximate vectors (centroid concatenation) for
improved ranking quality. 0 disables rerank (ADC only). Default 5.
This is not a true exact rerank — see pq_backend.rs docs.
Trait Implementations§
Source§impl Clone for ProductQuantizerOptions
impl Clone for ProductQuantizerOptions
Source§fn clone(&self) -> ProductQuantizerOptions
fn clone(&self) -> ProductQuantizerOptions
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 moreSource§impl Debug for ProductQuantizerOptions
impl Debug for ProductQuantizerOptions
Source§impl Default for ProductQuantizerOptions
impl Default for ProductQuantizerOptions
Source§impl<'de> Deserialize<'de> for ProductQuantizerOptions
impl<'de> Deserialize<'de> for ProductQuantizerOptions
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
impl Eq for ProductQuantizerOptions
Source§impl PartialEq for ProductQuantizerOptions
impl PartialEq for ProductQuantizerOptions
Source§impl Serialize for ProductQuantizerOptions
impl Serialize for ProductQuantizerOptions
impl StructuralPartialEq for ProductQuantizerOptions
Auto Trait Implementations§
impl Freeze for ProductQuantizerOptions
impl RefUnwindSafe for ProductQuantizerOptions
impl Send for ProductQuantizerOptions
impl Sync for ProductQuantizerOptions
impl Unpin for ProductQuantizerOptions
impl UnsafeUnpin for ProductQuantizerOptions
impl UnwindSafe for ProductQuantizerOptions
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
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more