Skip to main content

Module embedding_e5

Module embedding_e5 

Source
Expand description

e5-small-v2 ONNX embedding provider (WEFT-640).

Thin asymmetric wrapper over the BERT-family OnnxEmbeddingProvider: same WordPiece tokenizer, masked-mean pool, and L2 norm — the only behavioural difference is the e5 training convention of prepending passage: on documents and query: on queries.

  • Dim: 384 (matches RVF/HNSW default and weave.toml target).
  • License: MIT weights (intfloat/e5-small-v2); community ONNX exports.
  • Staging: .weftos/models/e5-small-v2/model.onnx (+ sibling vocab.txt).
  • CI: without the onnx-embeddings feature or staged artifacts the provider degrades to the ONNX hash fallback (deterministic, no download).

Selection: select_embedding_provider promotes e5 when its ONNX file is present and the runtime loads, below project-canonical Qwen3 (ADR-059) and above legacy MiniLM.

Structs§

E5EmbeddingProvider
e5-small-v2 provider — 384-d BERT encoder with asymmetric query/passage prefixes.

Constants§

E5_DIMS
Native output dimensionality (matches RVF / HNSW default).
E5_MAX_TOKENS
Max tokens for e5-small-v2 (BERT 512 context; leave room for specials).
E5_MODEL_NAME
Canonical model identifier (embedder_id / consistency contract).
PASSAGE_PREFIX
Document / passage prefix required by e5 training.
QUERY_PREFIX
Query prefix required by e5 training.