Skip to main content

Module backends

Module backends 

Source
Expand description

Concrete EmbeddingBackend implementations.

  • StaticHashBackend — hash-based fallback, always compiled in. Used only for EmbeddingModelType::StaticSimilarityMRL and as the last resort when both bert and model2vec features are disabled.
  • BertBackend (feature bert) — Candle + HuggingFace Hub BERT transformer models (MiniLM / multilingual / TinyBERT / BGE).
  • Model2VecBackend (feature model2vec, default) — model2vec-rs static embeddings for the Potion family (multilingual / code).

Re-exports§

pub use bert::BertBackend;
pub use model2vec::Model2VecBackend;
pub use static_hash::StaticHashBackend;

Modules§

bert
BERT backend: HuggingFace Hub model load, tokenize, forward pass, masked mean pooling, and L2 normalization.
model2vec
Model2Vec backend — static, multilingual embeddings via model2vec-rs.
static_hash
Hash-based static embedding fallback. Used by [EmbeddingModelType::StaticSimilarityMRL].