Skip to main content
PromptQuorumBuilt for humans. Structured for AI.

Best Embedding Model for Local RAG: nomic vs mxbai vs BGE-M3?

By · 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
Best Embedding Model for Local RAG: nomic vs mxbai vs BGE-M3?

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.
Quick AnswersIntermediate

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.

ModelOllama tagDownloadContext (Ollama)Vector sizePick it for
nomic-embed-textnomic-embed-text274 MB2K (8,192 native)768Default for English RAG
mxbai-embed-largemxbai-embed-large670 MB5121,024Short English chunks
BGE-M3bge-m31.2 GB8K1,024Multilingual documents
all-minilmall-minilm46 MB (22M)512384Prototypes, tiny CPUs
EmbeddingGemma-2embeddinggemma-2:270m304–378 MB8K768Small multilingual model
Qwen3-Embedding 0.6Bqwen3-embedding:0.6b639 MB32K1,024Very 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

Frequently Asked Questions

Do I need a GPU to run an embedding model locally?▾
No — embedding models are much smaller than chat LLMs and run at reasonable speed on CPU. A GPU speeds up bulk indexing of large document collections but isn't required for typical RAG workloads.
Can I use the same model for embeddings and chat?▾
No — embedding models and chat models serve different purposes and use different architectures. Run a dedicated embedding model (like nomic-embed-text) alongside your chat model (like Qwen3 or Llama), not instead of it.
Is nomic-embed-text better than mxbai-embed-large?▾
For most local RAG setups nomic-embed-text is a sensible default: it is smaller (274 MB vs 670 MB) and handles longer chunks, while Ollama lists only a 512-token window for mxbai-embed-large. Retrieval quality on your own documents can differ, so run both on a sample of real queries before committing.
Does nomic-embed-text really support 8,192 tokens in Ollama?▾
The model supports 8,192 tokens natively, but Ollama's library page lists a 2K window. Pass num_ctx (up to 8,192) in the request options to embed longer chunks.
How do I choose a chunk size for RAG with nomic-embed-text?▾
Its long context gives flexibility, but shorter chunks (a few hundred tokens) still generally retrieve more precisely than very long chunks, since overly broad chunks dilute the embedding's specificity. Start around 300–500 tokens per chunk and adjust based on retrieval quality. With mxbai-embed-large, stay below its 512-token window.
Is BGE-M3 slower than nomic-embed-text?▾
BGE-M3 is larger (567M parameters, 1.2 GB), so expect modestly slower inference and indexing versus nomic-embed-text — a reasonable tradeoff if you need reliable multilingual retrieval.
Should I use EmbeddingGemma or Qwen3-Embedding instead?▾
They are newer options on Ollama (EmbeddingGemma at 622 MB with 100+ languages, Qwen3-Embedding 0.6B at 639 MB with a 32K window). We have not benchmarked them against nomic-embed-text here, so test them on your own documents before switching.
Can I switch embedding models later?▾
Yes, but you must re-embed your whole document collection, because vectors from different models are not comparable. Decide on the model before indexing a large corpus.
MCP