Skip to content

HuggingFace embedder

Runs a sentence-transformers model locally with no API key and no network. Selected via EMBEDDING_PROVIDER=huggingface.

Enable it

bash
EMBEDDING_PROVIDER=huggingface
HUGGINGFACE_EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
EMBEDDING_DIMS=384

pip install sentence-transformers (imported lazily only when this provider is selected).

Configuration

VariableDefaultDescription
EMBEDDING_PROVIDERopenaiSet to huggingface.
HUGGINGFACE_EMBEDDING_MODELsentence-transformers/all-MiniLM-L6-v2sentence-transformers model to load.
EMBEDDING_DIMS384Vector dimension; must match the embedding model.

Notes

  • Runs the model locally with no API key and no network calls.
  • The model is imported and loaded lazily so the module stays cheap to import when this provider is never selected.
  • If sentence-transformers is not installed, selecting this provider raises an ImportError with the install hint.

The memory layer for AI agents.