View all articles
EmbeddingsRAGOllamaSpanishBenchmarks

Best Local Embedding Model for Spanish, Measured

JG
Jacobo González Jaspe
|
Abstract illustration: a minimal balance holding a navy cube and an amber sphere. Desde la spark
Illustration generated with AI on our own machine.
This article is also available in Spanish:El mejor modelo de embeddings local para español, medido

By the end of this post you will know which of the three embedding models Ollama users reach for finds Spanish documents best, what each one costs in speed and memory, and how to repeat the test on your own files. All three are small enough for a laptop: the largest loaded at 0.68 GB.

What you need

  • Ollama and about 2 GB of disk for the three models.
  • A vector store. We used Qdrant; the setup is in local RAG with Qdrant and bge-m3.
  • Your own questions with the document that answers each one. Without them you are comparing models on someone else’s text.

Step 1: pull the three models

bash
ollama pull bge-m3
ollama pull nomic-embed-text
ollama pull embeddinggemma
ollama list | grep -E "bge-m3|nomic|embeddinggemma"

If your Ollama says embeddinggemma does not exist, update it first; we pulled it on Ollama 0.34.0.

Step 2: check what you are storing

bash
curl -s localhost:11434/api/embed -d '{"model": "bge-m3", "input": "¿Cuánto daba el Kit Digital?"}' \
  | python3 -c "import sys,json; print(len(json.load(sys.stdin)['embeddings'][0]))"
# 1024
ollama ps

The number is the dimension of each vector: 1024 for bge-m3, 768 for the other two. In 32-bit floats that is 4 KB or 3 KB per chunk, before the index. ollama ps shows the memory each model holds while loaded.

Step 3: give each model its prefix

Two of the three were trained to see a label in front of the text, and both model cards say so. bge-m3 takes the text as it is.

Python
PROMPTS = {
    "bge-m3": ("", ""),
    "nomic-embed-text": ("search_query: ", "search_document: "),
    "embeddinggemma": ("task: search result | query: ", "title: none | text: "),
}
query_prefix, doc_prefix = PROMPTS[model]
# embed(query_prefix + question) for the question, embed(doc_prefix + chunk) for every chunk

The prefixes come from nomic-embed-text-v1.5’s model card and Google’s EmbeddingGemma model card, both read 2026-11-02. Skipping them does not break anything, it just costs you points, as the table below shows.

Step 4: run the same questions through each

Our script does the whole comparison: it builds a temporary Qdrant collection per model and chunk size, asks the 60 questions, scores them and deletes the collections. It lives in our internal repository and is not public yet; the script in our local RAG tutorial does the same steps for one model at a time. This is the command we ran:

bash
python3 scripts/bench/rag_embeddings_es.py --ollama http://<second-box>:11434 \
  --models bge-m3,nomic-embed-text,embeddinggemma --chunks 500,1000,2000 \
  --out docs/measurements/rag-embeddings-es-2026-11-02.json

Run it with your own questions instead of ours and the table is about your documents. hit@5 is the share of questions whose correct document is in the first five; MRR averages 1 / rank of the first correct document, so it rewards putting it first. To see what the similarity score itself does, try our cosine similarity exercise.

What we measured

Measured 2026-11-02. All three models on Ollama 0.34.0 on our second NVIDIA DGX Spark (GB10, 128 GB), one model loaded at a time. Qdrant 1.18.2 on the first Spark. Corpus: 50 of our published Spanish posts (501,917 characters), 60 questions written by hand with their gold documents, no gold answers. Raw file: rag-embeddings-es-2026-11-02.json.

Finding Spanish documents (chunks of 1,000 characters, 15 % overlap, model-card prefixes):

Modelhit@1hit@5MRR
bge-m378.3 %96.7 %0.862
nomic-embed-text78.3 %93.3 %0.841
embeddinggemma83.3 %100 %0.910

What each one costs (speed: all 610 chunks of the 1,000-character set in batches of 32, after a warm-up call; query time: median of the 60 questions, sent from the first box):

ModelParametersDimensionsFileLoaded (ollama ps)ContextChunks per secondOne query
bge-m3567 M1,0241.16 GB0.66 GB8,192 tokens58.928 ms
nomic-embed-text137 M7680.27 GB0.32 GB2,048 tokens133.17 ms
embeddinggemma308 M7680.62 GB0.68 GB2,048 tokens95.123 ms

MRR by chunk size (hit@5 in brackets):

Model500 characters1,000 characters2,000 characters
bge-m30.885 (96.7 %)0.862 (96.7 %)0.895 (100 %)
nomic-embed-text0.798 (91.7 %)0.841 (93.3 %)0.790 (88.3 %)
embeddinggemma0.884 (95.0 %)0.910 (100 %)0.913 (98.3 %)

Without the prefixes (1,000 characters): nomic-embed-text fell from 0.841 to 0.804 MRR and from 78.3 % to 73.3 % hit@1; embeddinggemma fell from 0.910 to 0.889 MRR and from 100 % to 96.7 % hit@5.

Three things the tables say.

The two multilingual models lead, and they are close. Across the three chunk sizes embeddinggemma averaged 0.902 MRR and bge-m3 0.880. On first place with 1,000-character chunks, embeddinggemma was right where bge-m3 was wrong 6 times, and the reverse happened 3 times. Nine questions out of 60 cannot separate them; the 95 % margin on a hit@5 near 97 % is about ±4.5 points.

nomic-embed-text is the English one. Its model card lists English as its language, and it trailed at every size, worst with long chunks. It was also the fastest by far: 133 chunks per second, 2.3 times bge-m3, with the smallest file.

Speed rarely decides at this size. Our whole corpus took 10.4 seconds with bge-m3 and 4.6 with nomic-embed-text. A query took 7 to 28 ms, including the trip between our two boxes. Indexing speed starts to matter at hundreds of thousands of chunks, or on a CPU.

What the spec sheet won’t tell you

  • The context limit is a silent cut. embeddinggemma and nomic-embed-text report 2,048 tokens. Ollama’s /api/embed trims longer input by default instead of failing, so an oversized chunk loses its end without a warning. We checked on 2026-11-02: 5,000 words went through without complaint, and only "truncate": false returned “the input length exceeds the context length”. Our 2,000-character chunks came to about 600 tokens by the 7B model’s count, well inside.
  • Loaded size is not file size. ollama ps showed bge-m3 at 0.66 GB though the file is 1.16 GB. We report what Ollama says and did not dig further.
  • The questions decide the ranking. Our 60 were written by one person who had read the posts. On your documents, with your colleagues’ wording, the order may change. That is the reason to run the script, not to copy our winner.

Verdict

  • Spanish documents, short or medium chunks: embeddinggemma. Best scores on our set, 768 dimensions, 0.68 GB loaded.
  • Chunks over 2,048 tokens: bge-m3. 8,192 tokens of context and within the margin of embeddinggemma here. We did not test mixed-language documents.
  • Skip nomic-embed-text for Spanish unless indexing speed is your bottleneck; if you keep it, use its prefixes.

When not to do this

If you already index with one of these and your users find what they need, switching costs a full re-index and gains a few points at best. Measure first with 20 of your own questions. And if your documents are mostly tables or scanned PDFs, fix the text extraction before you compare models: no embedding model finds what the parser lost.

Next steps

Work with us

We size the model and the machine by measuring, not by guessing. If you want this comparison run on your own documents, book a free 15-minute call or see how we work in consulting.

Diagram
Share: LinkedIn X
Veredicto semanal

Get new guides before anyone else

Subscribe and we tell you when new guides, templates and workflows go up. One email a week, no spam.

Already published: 98 guides and 25 templates. All free, no signup.

Bonus: the local-AI starter pack PDF when you subscribe
Once a week No spam Unsubscribe anytime

See what you get