Skip to main content

Module fastembed_embedder

Module fastembed_embedder 

Source
Expand description

FastEmbed-based ML embedders.

Loads local ONNX model + tokenizer bundles and produces semantic embeddings. This implementation never downloads model assets; it expects the model files to be present on disk and returns a clear error when they are missing.

Supports multiple models:

  • MiniLM (baseline)
  • EmbeddingGemma (bake-off candidate)
  • Qwen3-Embedding (bake-off candidate)
  • ModernBERT-embed (bake-off candidate)
  • Snowflake Arctic Embed (bake-off candidate)
  • Nomic Embed Text (bake-off candidate)

§semantic feature gate (cass#256)

When the semantic Cargo feature is disabled (i.e. baseline build), the fastembed crate and the prebuilt Microsoft ONNX Runtime binary it pulls in are not linked. In that build the loader methods (load_from_dir, load_with_config, load_by_name) return a stable EmbedderError::EmbedderUnavailable describing the missing capability. The free static methods (canonical_name, model_dir_for, embedder_id_static, default_model_dir, config_for, select_model_file, runtime_model_dir_for, etc.) remain fully functional so the lexical-only search path continues to compile and run.

Structs§

FastEmbedder
FastEmbed-backed semantic embedder.
OnnxEmbedderConfig
Configuration for loading an ONNX embedder.

Constants§

MODEL_ONNX_LEGACY
MODEL_ONNX_SUBDIR

Functions§

model_dir_override