Skip to main content

EmbeddingModel

Enum EmbeddingModel 

Source
pub enum EmbeddingModel {
Show 44 variants BGESmallENV15, AllMiniLML6V2, AllMiniLML6V2Q, AllMiniLML12V2, AllMiniLML12V2Q, AllMpnetBaseV2, BGEBaseENV15, BGEBaseENV15Q, BGELargeENV15, BGELargeENV15Q, BGESmallENV15Q, BGESmallZHV15, BGELargeZHV15, BGEM3, NomicEmbedTextV1, NomicEmbedTextV15, NomicEmbedTextV15Q, ParaphraseMLMiniLML12V2, ParaphraseMLMiniLML12V2Q, ParaphraseMLMpnetBaseV2, ModernBertEmbedLarge, MultilingualE5Small, MultilingualE5Base, MultilingualE5Large, MxbaiEmbedLargeV1, MxbaiEmbedLargeV1Q, GTEBaseENV15, GTEBaseENV15Q, GTELargeENV15, GTELargeENV15Q, ClipVitB32, JinaEmbeddingsV2BaseCode, JinaEmbeddingsV2BaseEN, EmbeddingGemma300M, SnowflakeArcticEmbedXS, SnowflakeArcticEmbedXSQ, SnowflakeArcticEmbedS, SnowflakeArcticEmbedSQ, SnowflakeArcticEmbedM, SnowflakeArcticEmbedMQ, SnowflakeArcticEmbedMLong, SnowflakeArcticEmbedMLongQ, SnowflakeArcticEmbedL, SnowflakeArcticEmbedLQ,
}
Expand description

Embedding model catalog with metadata for all supported ONNX models.

Variant names match fastembed::EmbeddingModel exactly for trivial 1:1 mapping.

Variants§

§

BGESmallENV15

BGE Small EN v1.5 — fast 384-dim English model (default).

§

AllMiniLML6V2

sentence-transformers all-MiniLM-L6-v2 (384-dim).

§

AllMiniLML6V2Q

Quantized all-MiniLM-L6-v2 (384-dim).

§

AllMiniLML12V2

sentence-transformers all-MiniLM-L12-v2 (384-dim).

§

AllMiniLML12V2Q

Quantized all-MiniLM-L12-v2 (384-dim).

§

AllMpnetBaseV2

sentence-transformers all-mpnet-base-v2 (768-dim).

§

BGEBaseENV15

BGE Base EN v1.5 (768-dim).

§

BGEBaseENV15Q

Quantized BGE Base EN v1.5 (768-dim).

§

BGELargeENV15

BGE Large EN v1.5 (1024-dim).

§

BGELargeENV15Q

Quantized BGE Large EN v1.5 (1024-dim).

§

BGESmallENV15Q

Quantized BGE Small EN v1.5 (384-dim).

§

BGESmallZHV15

BGE Small ZH v1.5 — Chinese model (512-dim).

§

BGELargeZHV15

BGE Large ZH v1.5 — Chinese model (1024-dim).

§

BGEM3

BGE M3 — multilingual, 100+ languages, 8192 context (1024-dim).

§

NomicEmbedTextV1

Nomic Embed Text v1 — 8192 context English model (768-dim).

§

NomicEmbedTextV15

Nomic Embed Text v1.5 — 8192 context English model (768-dim).

§

NomicEmbedTextV15Q

Quantized Nomic Embed Text v1.5 (768-dim).

§

ParaphraseMLMiniLML12V2

Paraphrase multilingual MiniLM-L12-v2 (384-dim).

§

ParaphraseMLMiniLML12V2Q

Quantized paraphrase multilingual MiniLM-L12-v2 (384-dim).

§

ParaphraseMLMpnetBaseV2

Paraphrase multilingual mpnet-base-v2 (768-dim).

§

ModernBertEmbedLarge

ModernBERT Embed Large (1024-dim).

§

MultilingualE5Small

Multilingual E5 Small (384-dim).

§

MultilingualE5Base

Multilingual E5 Base (768-dim).

§

MultilingualE5Large

Multilingual E5 Large (1024-dim).

§

MxbaiEmbedLargeV1

Mixedbread mxbai-embed-large-v1 (1024-dim).

§

MxbaiEmbedLargeV1Q

Quantized mxbai-embed-large-v1 (1024-dim).

§

GTEBaseENV15

Alibaba GTE Base EN v1.5 (768-dim).

§

GTEBaseENV15Q

Quantized Alibaba GTE Base EN v1.5 (768-dim).

§

GTELargeENV15

Alibaba GTE Large EN v1.5 (1024-dim).

§

GTELargeENV15Q

Quantized Alibaba GTE Large EN v1.5 (1024-dim).

§

ClipVitB32

OpenAI CLIP ViT-B/32 text encoder (512-dim).

§

JinaEmbeddingsV2BaseCode

Jina Embeddings v2 Base for code (768-dim).

§

JinaEmbeddingsV2BaseEN

Jina Embeddings v2 Base for English (768-dim).

§

EmbeddingGemma300M

Google EmbeddingGemma 300M (768-dim).

§

SnowflakeArcticEmbedXS

Snowflake Arctic Embed XS (384-dim).

§

SnowflakeArcticEmbedXSQ

Quantized Snowflake Arctic Embed XS (384-dim).

§

SnowflakeArcticEmbedS

Snowflake Arctic Embed S (384-dim).

§

SnowflakeArcticEmbedSQ

Quantized Snowflake Arctic Embed S (384-dim).

§

SnowflakeArcticEmbedM

Snowflake Arctic Embed M (768-dim).

§

SnowflakeArcticEmbedMQ

Quantized Snowflake Arctic Embed M (768-dim).

§

SnowflakeArcticEmbedMLong

Snowflake Arctic Embed M Long — 2048 context (768-dim).

§

SnowflakeArcticEmbedMLongQ

Quantized Snowflake Arctic Embed M Long (768-dim).

§

SnowflakeArcticEmbedL

Snowflake Arctic Embed L (1024-dim).

§

SnowflakeArcticEmbedLQ

Quantized Snowflake Arctic Embed L (1024-dim).

Implementations§

Source§

impl EmbeddingModel

Source

pub const ALL: &[Self]

All supported models.

Source

pub const fn dimension(self) -> usize

Embedding dimensionality.

Source

pub const fn description(self) -> &'static str

Short human-readable description.

Source

pub const fn query_prefix(self) -> Option<&'static str>

Optional prefix prepended to query texts before embedding.

Source

pub const fn doc_prefix(self) -> Option<&'static str>

Optional prefix prepended to document texts before embedding.

Source

pub const fn size_mb(self) -> usize

Approximate ONNX model size in MB.

Source

pub const fn model_id(self) -> &'static str

Original HuggingFace model name (e.g. "BAAI/bge-small-en-v1.5").

This is the canonical model identifier from the original publisher. For the actual HuggingFace repository used by fastembed-rs for downloads and caching, use model_code instead.

Source

pub const fn max_seq_length(self) -> usize

Maximum token context per model.

Source

pub const fn is_quantized(self) -> bool

Whether this is a quantized model (Q suffix).

Source

pub const fn is_image_model(self) -> bool

Whether this model handles image inputs (CLIP).

Source

pub const fn model_code(self) -> &'static str

HuggingFace model code used by fastembed-rs for downloads and caching (e.g. "Xenova/bge-small-en-v1.5").

This is the actual repository identifier that hf-hub uses when downloading model weights. Differs from model_id when the ONNX conversion lives in a separate repo (e.g. Qdrant/…, Xenova/…, onnx-community/…).

Source

pub fn as_str(self) -> &'static str

String representation matching the enum variant name.

Source

pub fn parse(s: &str) -> Result<Self, String>

Parse a model name (case-insensitive).

Source

pub fn as_fastembed(self) -> EmbeddingModel

Map to fastembed::EmbeddingModel.

Only available when an ONNX embedding feature is enabled (embedding-fastembed or embedding-fastembed-dynamic-linking).

Trait Implementations§

Source§

impl Clone for EmbeddingModel

Source§

fn clone(&self) -> EmbeddingModel

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for EmbeddingModel

Source§

impl Debug for EmbeddingModel

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EmbeddingModel

Source§

fn default() -> EmbeddingModel

Returns the “default value” for a type. Read more
Source§

impl Display for EmbeddingModel

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for EmbeddingModel

Source§

impl FromStr for EmbeddingModel

Source§

type Err = String

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for EmbeddingModel

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for EmbeddingModel

Source§

fn eq(&self, other: &EmbeddingModel) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for EmbeddingModel

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Boilerplate for T
where T: Copy + Send + Sync + Debug + PartialEq + 'static,

Source§

impl<T> Boilerplate for T
where T: Copy + Send + Sync + Debug + PartialEq + 'static,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

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().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToCompactString for T
where T: Display,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more