pub struct RlxEmbed { /* private fields */ }Expand description
High-level embedding model — auto-detects BERT / NomicBERT / NomicVision.
Implementations§
Source§impl RlxEmbed
impl RlxEmbed
Sourcepub fn from_dir(dir: &Path, pooling: Pooling) -> Result<Self>
pub fn from_dir(dir: &Path, pooling: Pooling) -> Result<Self>
Load from a local directory (config.json + model.safetensors) on CPU.
Sourcepub fn from_dir_on(dir: &Path, pooling: Pooling, device: Device) -> Result<Self>
pub fn from_dir_on(dir: &Path, pooling: Pooling, device: Device) -> Result<Self>
Load from a local directory on the given device.
Sourcepub fn from_weights(path: &Path, pooling: Pooling) -> Result<Self>
pub fn from_weights(path: &Path, pooling: Pooling) -> Result<Self>
Load from a .gguf file or a directory containing one (optional sidecar config.json).
Sourcepub fn from_weights_on(
path: &Path,
pooling: Pooling,
device: Device,
) -> Result<Self>
pub fn from_weights_on( path: &Path, pooling: Pooling, device: Device, ) -> Result<Self>
Load weights path on the given device.
pub fn dim(&self) -> usize
pub fn arch(&self) -> Arch
Auto Trait Implementations§
impl Freeze for RlxEmbed
impl !RefUnwindSafe for RlxEmbed
impl Send for RlxEmbed
impl !Sync for RlxEmbed
impl Unpin for RlxEmbed
impl UnsafeUnpin for RlxEmbed
impl !UnwindSafe for RlxEmbed
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