Trait finalfusion::io::MmapEmbeddings
source · pub trait MmapEmbeddingswhere
Self: Sized,{
// Required method
fn mmap_embeddings(read: &mut BufReader<File>) -> Result<Self>;
}
Expand description
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.
Required Methods§
fn mmap_embeddings(read: &mut BufReader<File>) -> Result<Self>
Object Safety§
This trait is not object safe.