Overview
Embeddings convert text into dense numerical vectors that capture semantic meaning. Similar concepts produce similar vectors, enabling semantic search (finding documents by meaning rather than exact keywords).Built-in Model (Default)
By default, Memvid uses BGE-small-en-v1.5, a lightweight embedding model that runs locally without any API keys.Characteristics
- Dimensions: 384
- Size: ~75 MB (downloaded on first use)
- Inference: CPU-based, no GPU required
- Privacy: All processing happens locally
- Offline: Works without internet after initial download
Usage
Ollama Embeddings (Local)
Ollama provides high-quality embeddings that run entirely locally on your machine. No API keys, no data leaving your infrastructure, and no usage costs.Setup
- Install Ollama: ollama.com/download
- Pull an embedding model:
Python SDK
Node.js SDK
Supported Models
Custom Server
Environment Variables
OpenAI Embeddings
OpenAI’s embedding models offer excellent quality for general-purpose semantic search.Setup
CLI Usage
Python SDK
NVIDIA Embeddings
NVIDIA Integrate provides a fast hosted embedding API with OpenAI-compatible shapes.Setup
Python SDK
Node.js SDK
Node.js SDK
Model Comparison
Cohere Embeddings
Cohere offers specialized models for English and multilingual content.Setup
Python SDK
Node.js SDK
Model Options
Voyage Embeddings
Voyage AI specializes in embeddings for code and technical documentation.Setup
Python SDK
Node.js SDK
Model Options
HuggingFace Embeddings (Python)
Use any HuggingFace sentence-transformer model locally.Setup
Usage
Popular Models
Using External Embeddings with Memvid
The key workflow for external embeddings:- Pick an embedder (OpenAI/Cohere/Voyage/NVIDIA/etc.)
- Ingest with
put_many(..., embedder=...)(stores embedding identity metadata) - Query with
find/ask(..., embedder=...)(keeps dimensions consistent)
Batch Ingestion Example
Vector Compression
For large collections, enable vector compression to reduce storage by ~16x:Environment Variables
Choosing an Embedding Model
Decision Matrix
Performance Considerations
- Dimension count affects storage and search speed
- API latency for external providers (batch when possible)
- Rate limits vary by provider plan
- Consistency - use same model for ingestion and search
Reranking
Memvid can rerank retrieved candidates using a cross-encoder model (auto-downloaded on first use). In the CLI this is applied duringask and can be disabled:
find, reranking is handled internally; there is no --rerank flag.
Next Steps
Indices and Tracks
Learn about lexical, vector, and time indices
Search & Ask
Master semantic search queries