Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1.08 KB

File metadata and controls

43 lines (32 loc) · 1.08 KB

Embedding Service

Document retrieval API backed by local embeddings (fastembed + ONNX) and Qdrant. No API keys required.

Upload PDF or TXT files, then search them by semantic meaning. The default model is sentence-transformers/all-MiniLM-L6-v2 (~90MB, downloaded on first run).

Setup

  1. Install dependencies:
uv sync
  1. Create .env:
QDRANT_URL=http://localhost:6333
QDRANT_SEMANTIC_COLLECTION=documents_semantic

# Optional — defaults to sentence-transformers/all-MiniLM-L6-v2
EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
  1. Start Qdrant:
docker run -p 6333:6333 qdrant/qdrant
  1. Run the API:
uvicorn main:app --port 8000

Supported models

Model Dimensions
sentence-transformers/all-MiniLM-L6-v2 (default) 384
BAAI/bge-small-en-v1.5 384
snowflake/snowflake-arctic-embed-xs 384
BAAI/bge-base-en-v1.5 768
jinaai/jina-embeddings-v2-small-en 512

If you change EMBEDDING_MODEL, use a fresh Qdrant collection (or delete the existing one) because vector dimensions must match.