Best Embedding Model for Local RAG: nomic vs mxbai vs BGE-M3?
By Hans Kuepper · Founder of PromptQuorum · Discovery engine for open-weight & open-source AI
nomic-embed-text is the best default embedding model for local RAG on Ollama — a 274 MB download, 768-dimension vectors and a native 8,192-token context (Ollama lists 2K by default, so raise num_ctx for longer chunks). Pick BGE-M3 for multilingual documents, and mxbai-embed-large only if your chunks stay under its 512-token window.
Key Takeaways
- ✓Best default: nomic-embed-text — 274 MB, 768 dimensions, native 8,192-token context (raise num_ctx in Ollama to use it)
- ✓Best multilingual pick: BGE-M3 — 1.2 GB, 8K context, built for retrieval across many languages
- ✓Alternative: mxbai-embed-large — English-focused, but Ollama lists only a 512-token window, so keep chunks short
- ✓all-minilm is tiny (46 MB) but older and generally weaker — use it for prototypes, not serious RAG
- ✓Use one embedding model per index: switching models means re-embedding every chunk

Quick Answer
nomic-embed-text is the best default embedding model for local RAG on Ollama: small (274 MB), 768 dimensions, native 8,192-token context. BGE-M3 is the better pick for multilingual collections; mxbai-embed-large suits short English chunks.
- ▸nomic-embed-text: 274 MB, 768 dimensions, 8,192-token native context — Ollama's default window is 2K, so raise num_ctx for long chunks. Add search_document: / search_query: prefixes.
- ▸BGE-M3: 1.2 GB, 8K context, built for multilingual retrieval — the right pick if your documents span several languages.
- ▸mxbai-embed-large: 670 MB, 1,024 dimensions, but only a 512-token window — a fine English alternative when chunks are short.
- ▸all-minilm: 46 MB and 384 dimensions — only for prototypes or very constrained CPUs. EmbeddingGemma and Qwen3-Embedding are newer options worth testing.
Best Pick: nomic-embed-text
nomic-embed-text is the best default embedding model for local RAG because it pairs a small 274 MB download with a native 8,192-token context and 768-dimension vectors, and it runs through Ollama's embedding API after a single pull. Nomic's model card documents the 8,192-token sequence length and an Apache-2.0 license. Older embedding models typically cap out around 512 tokens, which forces more aggressive chunking.
One catch: Ollama's library page lists a 2K context window for nomic-embed-text. To embed chunks longer than that, pass a larger num_ctx (up to 8,192) in the request options, as shown in the setup section below.
If your documents span multiple languages, BGE-M3 is the better choice. It is a 567M-parameter model designed for multilingual retrieval, whereas nomic-embed-text is primarily English-optimized and weaker on non-English text.
How nomic-embed-text Compares With mxbai-embed-large, BGE-M3 and all-MiniLM
nomic-embed-text vs mxbai-embed-large: mxbai-embed-large is a 335M-parameter, 670 MB model with 1,024-dimension vectors, but Ollama lists only a 512-token window. With chunks of 300–500 tokens either model works; for longer chunks nomic-embed-text avoids truncation, and its 768-dimension vectors need about a quarter less index storage. Published retrieval scores for the two depend on the benchmark and dataset, and we did not run our own benchmark here — test both on a sample of your own documents.
all-MiniLM vs nomic-embed-text: all-minilm (22M and 33M parameters, 46–67 MB, 384 dimensions) is the smallest and fastest option in Ollama's library, and Ollama lists a 512-token window. It is an older, much smaller model that generally retrieves less accurately, so treat it as a prototyping or low-power choice rather than a default.
BGE-M3 vs nomic-embed-text: BGE-M3 (567M parameters, 1.2 GB, 8K context) is the multilingual specialist. It is larger and slower to index, so if your corpus is English-only, nomic-embed-text is the lighter choice; if it mixes languages, BGE-M3 is worth the extra weight.
Newer options: EmbeddingGemma (300M parameters, 622 MB, 2K context, trained on 100+ languages) and Qwen3-Embedding (0.6B version: 639 MB, 32K context) are available on Ollama and worth a side-by-side test on your data.
Embedding Models Compared
Download size and context window come from each model's Ollama library page; vector size comes from the model cards. nomic-embed-text supports 8,192 tokens natively even though Ollama lists 2K by default.
Avoid all-minilm for serious RAG work — it is fast and lightweight, but generally less accurate than the larger models below. All of them run through Ollama's embedding API with the same pull-and-call workflow.
| Model | Ollama tag | Download | Context (Ollama) | Vector size | Pick it for |
|---|---|---|---|---|---|
| nomic-embed-text | nomic-embed-text | 274 MB | 2K (8,192 native) | 768 | Default for English RAG |
| mxbai-embed-large | mxbai-embed-large | 670 MB | 512 | 1,024 | Short English chunks |
| BGE-M3 | bge-m3 | 1.2 GB | 8K | 1,024 | Multilingual documents |
| all-minilm | all-minilm | 46 MB (22M) | 512 | 384 | Prototypes, tiny CPUs |
| EmbeddingGemma-2 | embeddinggemma-2:270m | 304–378 MB | 8K | 768 | Small multilingual model |
| Qwen3-Embedding 0.6B | qwen3-embedding:0.6b | 639 MB | 32K | 1,024 | Very long chunks |
Setup Pitfalls That Hurt Local RAG Retrieval
Use the task prefixes. Nomic's model card says input must include a task instruction prefix: search_document: for chunks you index and search_query: for the user's question. Leaving them out can lower retrieval quality.
Raise num_ctx deliberately. The request below embeds a chunk with the full 8,192-token window. Only raise it as far as your chunks need, since a larger context uses more memory.
Never mix models in one index. Vectors from different embedding models are not comparable, so switching from nomic-embed-text to BGE-M3 means re-embedding every chunk.
curl http://localhost:11434/api/embed -d '{
"model": "nomic-embed-text",
"input": "search_document: Your chunk text here",
"options": { "num_ctx": 8192 }
}'Related Reading
- ▸Best Local LLM for Document Summarization — pairing retrieval with a long-context chat model
- ▸How Much VRAM Do You Need for a Local LLM? — sizing hardware for a full RAG pipeline
- ▸Best Sub-8B Model for Real-Time Chat — a fast chat model to pair with retrieval
- ▸Best Embedding Models for Local RAG (Full Comparison) — the complete benchmark across accuracy, speed, and multilingual support