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=384pip install sentence-transformers (imported lazily only when this provider is selected).
Configuration
| Variable | Default | Description |
|---|---|---|
EMBEDDING_PROVIDER | openai | Set to huggingface. |
HUGGINGFACE_EMBEDDING_MODEL | sentence-transformers/all-MiniLM-L6-v2 | sentence-transformers model to load. |
EMBEDDING_DIMS | 384 | Vector 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-transformersis not installed, selecting this provider raises an ImportError with the install hint.