Skip to main content

Module embedding

Module embedding 

Source

Structs§

EmbedMetricsSnapshot
Snapshot of pool utilization for capacity planning.
EmbedTimeoutError
Returned when every session in the pool is still busy past the checkout timeout. Backpressure that surfaces as an error beats a request that hangs forever.
Embedder
Embedder backed by a fixed pool of independent sessions, for the same reason as Reranker: fastembed::TextEmbedding::embed takes &mut self, and ingestion is embed-bound, so a shared single-session mutex serializes every writer in the process. Each slot keeps the original lazy-load/idle-unload lifecycle independently.

Enums§

Activations
What a session does with a run’s activations once the run returns.

Traits§

DocumentEmbedder
Embeds text for storage as a document: bare, never through embed_query, because BGE retrieval is asymmetric and the instruction prefix belongs on the query side only. A host that embeds somewhere other than an in-process Embedder implements this to feed ingestion.

Functions§

cached_model
The embedding model’s Hugging Face repo and the files it loads from a snapshot.
query_prompt