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 Freeze for MmapArray
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
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 moreSource§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>
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>
Quantize the embedding matrix.
This method trains a quantizer for the embedding matrix and then quantizes the matrix using this quantizer.