pub(crate) enum EmbedRequest {
Dense {
texts: Vec<String>,
reply: Sender<Result<(Vec<Vec<f32>>, EmbedStats)>>,
},
Sparse {
texts: Vec<String>,
reply: Sender<Result<(Vec<SparseEmbedding>, EmbedStats)>>,
},
Both {
texts: Vec<String>,
reply: Sender<Result<(Vec<DualEmbedding>, EmbedStats)>>,
},
Probe {
texts: Vec<String>,
reply: Sender<Result<ProbeResult>>,
},
}Variants§
Dense
Dense (float32) embedding inference on a batch of texts.
Sparse
Sparse (SPLADE-style) embedding inference on a batch of texts.
Both
Computes dense and sparse embeddings from a single forward pass per chunk.
Probe
Internal: used during startup probe to run a single batch and measure
peak RSS delta. Workers only process this before ready is set.
Auto Trait Implementations§
impl Freeze for EmbedRequest
impl !RefUnwindSafe for EmbedRequest
impl Send for EmbedRequest
impl Sync for EmbedRequest
impl Unpin for EmbedRequest
impl UnsafeUnpin for EmbedRequest
impl !UnwindSafe for EmbedRequest
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
§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>
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