pub struct NemotronConfig {
pub model_path: PathBuf,
pub use_gpu: bool,
pub batch_size: usize,
pub query_prefix: String,
pub passage_prefix: String,
pub max_length: usize,
pub normalize: bool,
}Expand description
Configuration for NVIDIA Embed Nemotron 8B embedder
Nemotron is based on Llama 3.1 8B and produces 4096-dimensional embeddings. It supports asymmetric retrieval with different prefixes for queries and passages.
Fields§
§model_path: PathBufPath to the GGUF model file
use_gpu: boolWhether to use GPU acceleration (if available)
batch_size: usizeBatch size for parallel embedding
query_prefix: StringQuery instruction prefix for asymmetric retrieval
passage_prefix: StringPassage/document prefix (usually empty for Nemotron)
max_length: usizeMaximum sequence length in tokens
normalize: boolWhether to L2-normalize output embeddings
Implementations§
Source§impl NemotronConfig
impl NemotronConfig
Sourcepub fn with_model_path(self, path: impl AsRef<Path>) -> Self
pub fn with_model_path(self, path: impl AsRef<Path>) -> Self
Set the model path
Sourcepub fn with_batch_size(self, batch_size: usize) -> Self
pub fn with_batch_size(self, batch_size: usize) -> Self
Set the batch size for parallel embedding
Sourcepub fn with_query_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_query_prefix(self, prefix: impl Into<String>) -> Self
Set custom query prefix
Sourcepub fn with_passage_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_passage_prefix(self, prefix: impl Into<String>) -> Self
Set custom passage prefix
Sourcepub fn with_max_length(self, max_length: usize) -> Self
pub fn with_max_length(self, max_length: usize) -> Self
Set maximum sequence length
Sourcepub fn with_normalize(self, normalize: bool) -> Self
pub fn with_normalize(self, normalize: bool) -> Self
Enable or disable L2 normalization
Trait Implementations§
Source§impl Clone for NemotronConfig
impl Clone for NemotronConfig
Source§fn clone(&self) -> NemotronConfig
fn clone(&self) -> NemotronConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NemotronConfig
impl Debug for NemotronConfig
Auto Trait Implementations§
impl Freeze for NemotronConfig
impl RefUnwindSafe for NemotronConfig
impl Send for NemotronConfig
impl Sync for NemotronConfig
impl Unpin for NemotronConfig
impl UnsafeUnpin for NemotronConfig
impl UnwindSafe for NemotronConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().