If you’re building semantic search or retrieval-augmented generation (RAG), one of the first decisions is which embedding model turns your text into vectors. Two popular choices sit at opposite ends: Nomic Embed, an open-weights model you can run yourself, and OpenAI’s text-embedding-3 models, which you call through a paid API.
The short answer: on general benchmarks they’re close, so the choice usually comes down to where your data is allowed to go, how much text you need to embed, and which languages you work in. This guide compares them on the things that actually change your project.
At a glance
| nomic-embed-text-v1.5 | nomic-embed-text-v2-moe | text-embedding-3-small | text-embedding-3-large | |
|---|---|---|---|---|
| Where it runs | Your hardware (or Nomic’s API) | Your hardware | OpenAI API only | OpenAI API only |
| Licence | Apache 2.0, open weights, data and training code | Apache 2.0, open weights, data and training code | Proprietary | Proprietary |
| Dimensions | 768, can shorten to 64 | 768, can shorten to 256 | 1,536, can shorten | 3,072, can shorten |
| Max input | 8,192 tokens | 512 tokens | 8,192 tokens | 8,192 tokens |
| Languages | Mainly English | About 100 | Multilingual | Multilingual |
| MTEB average (published) | 62.28 | Not reported on the same English benchmark | 62.3 | 64.6 |
| Cost | Your compute | Your compute | $0.02 per million tokens | $0.13 per million tokens |
Where they really differ
Data privacy and hosting
With OpenAI, every document and every search query is sent to OpenAI’s servers. That’s fine for many projects, but not for all: legal, medical or customer data may have to stay inside your own infrastructure. Nomic’s weights are public, so you can run the model on your own server, laptop or private cloud, and the text never leaves it. Because the training data and code are published too, you can also inspect how the model was built, which matters in regulated settings.
Cost at scale
OpenAI charges per token. At $0.02 per million tokens, embedding 10,000 documents of about 800 tokens each with text-embedding-3-small costs around $0.16; text-embedding-3-large costs about six and a half times as much. OpenAI’s Batch API halves those prices for work that can wait. For most projects the bill is small; it becomes significant when you re-embed large collections often.
Running Nomic yourself has no per-token fee, but you pay for the machine. The v1.5 model has 137 million parameters, small enough to run on a CPU for modest volumes, though a GPU is much faster for bulk indexing.
Context length
nomic-embed-text-v1.5 and both OpenAI models accept around 8,000 tokens, so you can embed long passages in one go. nomic-embed-text-v2-moe accepts only 512 tokens, roughly 350 to 400 words of English, so long documents must be split into smaller chunks. In practice most RAG pipelines chunk to a few hundred tokens anyway, because smaller chunks give more precise matches, but it’s worth knowing before you choose.
Languages
nomic-embed-text-v1.5 is trained mainly on English. If your content or your users’ questions are in other languages, compare nomic-embed-text-v2-moe, which covers about 100 languages, with OpenAI’s models, which are multilingual too.
Vector size and storage
All four models are trained so their vectors can be shortened with only a small loss in quality (a technique called Matryoshka representation learning). With OpenAI you pass a dimensions value in the request; with Nomic you keep the first N numbers of the vector and normalise it again.
Size matters because each dimension is stored as a 4-byte float. One million 1,536-dimension vectors take about 6 GB before indexing; at 768 dimensions it’s about 3 GB, and at 256 dimensions about 1 GB. Smaller vectors also make similarity search faster. Nomic’s own figures show v1.5 losing little at 512 dimensions (61.96 against 62.28 on MTEB) and more at 64 (56.10), so test where the drop starts to matter for your data.
Task prefixes
Nomic models expect a short prefix that says what each text is for: search_document: for the texts you store and search_query: for the questions you search with. Leaving them out can lower retrieval quality, and it’s the most common mistake when switching to Nomic. OpenAI’s models need no prefixes.
What the code looks like
With OpenAI’s Python library (it reads your key from the OPENAI_API_KEY environment variable):
from openai import OpenAI
client = OpenAI()
response = client.embeddings.create(
model="text-embedding-3-small",
input=["pgvector adds vector search to PostgreSQL.",
"The Eiffel Tower is in Paris."],
dimensions=768, # optional: shorten from the default 1,536
)
vectors = [item.embedding for item in response.data]
With Nomic running locally through the sentence-transformers library:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("nomic-ai/nomic-embed-text-v1.5", trust_remote_code=True)
doc_vectors = model.encode(
["search_document: pgvector adds vector search to PostgreSQL.",
"search_document: The Eiffel Tower is in Paris."],
normalize_embeddings=True,
)
query_vector = model.encode(
"search_query: How do I search embeddings in Postgres?",
normalize_embeddings=True,
)
scores = doc_vectors @ query_vector # cosine similarity for normalised vectors
trust_remote_code=True lets the library run model code downloaded from the model’s repository, so only use it with repositories you trust. According to Nomic’s model card, recent versions (sentence-transformers 5.3 and transformers 5.5 onwards) no longer need it for the text models. If you’d rather not write Python, Nomic Embed is also available as a ready-made model in Ollama and similar local runners.
Whichever model you use, store the vectors in a column sized to match, for example vector(768). My pgvector Docker guide walks through setting that up.
Never mix models in one index
Vectors from different models live in different spaces, even when they have the same number of dimensions. A query embedded with OpenAI can’t be meaningfully compared with documents embedded by Nomic. If you switch models, re-embed the whole collection and keep it in a new column or table until the switch is complete. Record which model and dimension each collection uses, so it’s never ambiguous.
Which should you choose?
- Choose Nomic if data must stay on your own infrastructure, you need to work offline, you want full transparency about how the model was trained, or you embed very large volumes and already have the hardware.
- Choose text-embedding-3-small if you want the quickest start with nothing to host, your volumes are moderate, and sending text to OpenAI is acceptable. It’s a strong, cheap default.
- Choose text-embedding-3-large when retrieval quality matters more than cost, and test it at a reduced dimension such as 1,024 to keep storage manageable.
- For many languages, compare nomic-embed-text-v2-moe with the OpenAI models, and remember v2’s 512-token limit when you chunk.
Test on your own data before deciding
General benchmarks average dozens of tasks that may look nothing like yours, and the leading models are within a couple of points of each other. A small test of your own is far more telling:
- Write 30 to 50 realistic questions and note which document or chunk should answer each one.
- Embed the same chunks with each candidate model, using the right prefixes for Nomic.
- For each question, check whether the correct chunk appears in the top 5 results (recall@5).
- Compare the scores alongside cost, speed and where the data goes, then decide.
An afternoon spent on this usually settles the question better than any leaderboard.
Further reading
- nomic-embed-text-v1.5 model card: prefixes, resizing and benchmark results
- nomic-embed-text-v2-moe model card: the multilingual model
- OpenAI embeddings guide: models, dimensions and usage
- MTEB leaderboard: current benchmark results across many models
