#[non_exhaustive]pub enum ModelTask {
Show 14 variants
Embed,
Rerank,
Generate,
Raw,
EmbedImage,
EmbedAudio,
EmbedMultimodal,
EmbedSparse,
EmbedMultiVector,
EmbedHybrid,
Nlp,
DocumentExtract,
Transcribe,
Ocr,
}Expand description
The kind of inference task a model performs.
Marked #[non_exhaustive] so adding new variants is non-breaking. Downstream
pattern matches must include a wildcard _ => ... arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Embed
Produce dense vector embeddings from text.
Rerank
Re-score a set of documents against a query.
Generate
Generate text (chat completions, summarization, etc.).
Raw
Resolve a provider-specific raw runtime without task interpretation.
EmbedImage
Produce dense vector embeddings from images.
EmbedAudio
Produce dense vector embeddings from audio.
EmbedMultimodal
Produce dense vector embeddings from heterogeneous (text + image + audio) inputs.
EmbedSparse
Produce learned-sparse term-weight vectors from text (SPLADE / BGE-M3 sparse).
EmbedMultiVector
Produce per-token (multi-vector / ColBERT late-interaction) embeddings from text.
EmbedHybrid
Produce dense + sparse + multi-vector heads from a single forward pass on a
multi-output graph (e.g. BGE-M3 aapot/bge-m3-onnx).
Nlp
Structured natural-language analysis (POS / NER / DEP / SRL / dialog-act).
DocumentExtract
Extract structured blocks (text / heading / table / figure) from document page images.
Transcribe
Transcribe speech audio into text with timing information.
Ocr
Recognize text in images (optical character recognition).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelTask
impl<'de> Deserialize<'de> for ModelTask
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Copy for ModelTask
impl Eq for ModelTask
impl StructuralPartialEq for ModelTask
Auto Trait Implementations§
impl Freeze for ModelTask
impl RefUnwindSafe for ModelTask
impl Send for ModelTask
impl Sync for ModelTask
impl Unpin for ModelTask
impl UnsafeUnpin for ModelTask
impl UnwindSafe for ModelTask
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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§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
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.