[−][src]Trait finalfusion::storage::Quantize
Quantizable embedding matrix.
Required methods
fn quantize_using<T, R>(
&self,
n_subquantizers: usize,
n_subquantizer_bits: u32,
n_iterations: usize,
n_attempts: usize,
normalize: bool,
rng: R
) -> QuantizedArray where
T: TrainPQ<f32>,
R: RngCore + SeedableRng + Send,
&self,
n_subquantizers: usize,
n_subquantizer_bits: u32,
n_iterations: usize,
n_attempts: usize,
normalize: bool,
rng: R
) -> QuantizedArray where
T: TrainPQ<f32>,
R: RngCore + SeedableRng + Send,
Quantize the embedding matrix using the provided RNG.
This method trains a quantizer for the embedding matrix and then quantizes the matrix using this quantizer.
Provided methods
fn quantize<T>(
&self,
n_subquantizers: usize,
n_subquantizer_bits: u32,
n_iterations: usize,
n_attempts: usize,
normalize: bool
) -> QuantizedArray where
T: TrainPQ<f32>,
&self,
n_subquantizers: usize,
n_subquantizer_bits: u32,
n_iterations: usize,
n_attempts: usize,
normalize: bool
) -> QuantizedArray where
T: TrainPQ<f32>,
Quantize the embedding matrix.
This method trains a quantizer for the embedding matrix and then quantizes the matrix using this quantizer.
The xorshift PRNG is used for picking the initial quantizer centroids.
Implementors
impl<S> Quantize for S where
S: StorageView,
[src]
S: StorageView,
fn quantize_using<T, R>(
&self,
n_subquantizers: usize,
n_subquantizer_bits: u32,
n_iterations: usize,
n_attempts: usize,
normalize: bool,
rng: R
) -> QuantizedArray where
T: TrainPQ<f32>,
R: RngCore + SeedableRng + Send,
[src]
&self,
n_subquantizers: usize,
n_subquantizer_bits: u32,
n_iterations: usize,
n_attempts: usize,
normalize: bool,
rng: R
) -> QuantizedArray where
T: TrainPQ<f32>,
R: RngCore + SeedableRng + Send,
Quantize the embedding matrix.
This method trains a quantizer for the embedding matrix and then quantizes the matrix using this quantizer.