pub struct FastEmbedEmbedder { /* private fields */ }Expand description
FastEmbed embedder using BGE-M3.
Uses the fastembed-rs library for real semantic embeddings. The model is lazily loaded on first embed call to preserve cold start time.
BGE-M3 provides:
- 1024 dimensions (vs 384 for
MiniLM) - 8192 token context (vs ~512 for
MiniLM) - Better multilingual support
§Examples
ⓘ
use rlm_rs::embedding::FastEmbedEmbedder;
let embedder = FastEmbedEmbedder::new()?;
let embedding = embedder.embed("Hello, world!")?;
assert_eq!(embedding.len(), 1024);Implementations§
Trait Implementations§
Source§impl Embedder for FastEmbedEmbedder
impl Embedder for FastEmbedEmbedder
Auto Trait Implementations§
impl Freeze for FastEmbedEmbedder
impl RefUnwindSafe for FastEmbedEmbedder
impl Send for FastEmbedEmbedder
impl Sync for FastEmbedEmbedder
impl Unpin for FastEmbedEmbedder
impl UnwindSafe for FastEmbedEmbedder
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 more