[][src]Trait rust2vec::io::MmapEmbeddings

pub trait MmapEmbeddings where
    Self: Sized
{ fn mmap_embeddings(read: &mut BufReader<File>) -> Result<Self, Error>; }

Memory-map finalfusion embeddings.

This trait is used to read finalfusion embeddings while memory mapping the embedding matrix. This leads to considerable memory savings, since the operating system will load the relevant pages from disk on demand.

Memory mapping is currently not implemented for quantized matrices.

Required methods

fn mmap_embeddings(read: &mut BufReader<File>) -> Result<Self, Error>

Loading content...

Implementors

impl<V, S> MmapEmbeddings for Embeddings<V, S> where
    Self: Sized,
    V: ReadChunk,
    S: MmapChunk, 
[src]

Loading content...