Struct finalfusion::storage::MmapArray
source · pub struct MmapArray { /* private fields */ }
Expand description
Memory-mapped matrix.
Trait Implementations§
source§impl From<MmapArray> for StorageViewWrap
impl From<MmapArray> for StorageViewWrap
source§impl From<MmapArray> for StorageWrap
impl From<MmapArray> for StorageWrap
source§impl StorageView for MmapArray
impl StorageView for MmapArray
source§fn view(&self) -> ArrayView2<'_, f32>
fn view(&self) -> ArrayView2<'_, f32>
Get a view of the embedding matrix.
Auto Trait Implementations§
impl RefUnwindSafe for MmapArray
impl Send for MmapArray
impl Sync for MmapArray
impl Unpin for MmapArray
impl UnwindSafe for MmapArray
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
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<S> Quantize for Swhere
S: StorageView,
impl<S> Quantize for Swhere S: StorageView,
source§fn quantize_using<T, R>(
&self,
n_subquantizers: usize,
n_subquantizer_bits: u32,
n_iterations: usize,
n_attempts: usize,
normalize: bool,
rng: R
) -> Result<QuantizedArray, Error>where
T: TrainPq<f32>,
R: CryptoRng + RngCore + SeedableRng + Send,
fn quantize_using<T, R>( &self, n_subquantizers: usize, n_subquantizer_bits: u32, n_iterations: usize, n_attempts: usize, normalize: bool, rng: R ) -> Result<QuantizedArray, Error>where T: TrainPq<f32>, R: CryptoRng + RngCore + SeedableRng + Send,
Quantize the embedding matrix.
This method trains a quantizer for the embedding matrix and then quantizes the matrix using this quantizer.