Universal embedding-space translation library. Plug-and-play adapters that map one model's vector space into another — locally, instantly, for free. Learn more →
$ pip install embedding-adapters # Translate an embedding between models $ embedding-adapters embed \ --source sentence-transformers/all-MiniLM-L6-v2 \ --target openai/text-embedding-3-small \ --flavor large \ --text "Where can I get a hamburger?"
Stop choosing between embedding quality and operational sanity. Adapters let you move between models without touching your vector store.
Use a lightweight local model for queries while your index was built with a heavier cloud provider. Get sub-10ms embeddings without sacrificing retrieval quality.
Move from one embedding provider to another incrementally. No need to re-embed millions of documents at once — translate on the fly during the transition.
Handle rate limits, outages, and provider changes without breaking your retrieval pipeline. Route through local adapters when the cloud is unavailable.
Compare how different embedding providers behave on your data without committing to any single one. Sample multiple spaces from a single source model.
Detect when a query is too complex for your local model and intelligently route it to a stronger provider. Built-in quality endpoints tell you when to escalate.
Slash embedding API costs by running common queries through a free local model with an adapter, and reserving cloud calls for only the hardest cases.
Load a pre-trained adapter from the registry, encode with your local model, and translate into any target embedding space — no API calls needed for the translation step.
from sentence_transformers import SentenceTransformer from embedding_adapters import EmbeddingAdapter # 1) Load a lightweight local model model = SentenceTransformer("all-MiniLM-L6-v2") # 2) Load a pre-trained adapter adapter = EmbeddingAdapter.from_registry( source="sentence-transformers/all-MiniLM-L6-v2", target="openai/text-embedding-3-small", flavor="large", ) # 3) Encode locally, translate into OpenAI's space src_embs = model.encode(texts, normalize_embeddings=True) translated = adapter.translate(src_embs) # translated embeddings are now compatible # with your OpenAI-indexed vector store!
Each adapter is a compact trained model that preserves the geometric relationships that matter for retrieval. The key is a carefully designed training process that prevents collapse.
Generate embeddings using your local or source model as you normally would.
The adapter applies a trained transformation, mapping vectors into the target space.
Query your existing vector index directly — no re-embedding, no downtime, no data migration.
MiniLM + Adapter vs. native OpenAI text-embedding-3-small on retrieval tasks.
One-line loading from HuggingFace. Adapters for popular model pairs are ready to go — no training required.
Use the command-line tool for quick experiments, or import the Python library for production integration.
Built-in quality scoring tells you whether an adapted embedding will work for your query — enabling smart routing.
Works alongside any vector database — Pinecone, Weaviate, Qdrant, pgvector, FAISS. No vendor lock-in.
Adapters can be custom-trained on your domain data for even better translation fidelity on specialized corpora.
Runs on CUDA when available, falls back gracefully to CPU. Lightweight enough for edge deployment.
Install the library, load an adapter, and query across embedding spaces in under a minute.
Our public adapters work well for general use, but domain-specific corpora deserve domain-specific translation. We train custom adapters on your data that consistently outperform our open-source models — higher recall, tighter semantic fidelity, and full support for proprietary embedding pipelines.