Skip to main content
Back

BAAI's bge-small-en Beats OpenAI's Ada on MTEB With 33M Parameters

A closer look at BAAI's compact 33M parameter embedding model that keeps trending on Hugging Face for retrieval and semantic search workloads.

Pro

  • BAAI's bge-small-en is a 33.4M parameter English embedding model producing 384-dim vectors.
  • Scores 62.11 average on MTEB, edging out OpenAI's text-embedding-ada-002 at 60.99.
  • Trained with RetroMAE pretraining followed by contrastive learning on large-scale text pairs.
  • Works with FlagEmbedding, sentence-transformers, LangChain, and Hugging Face Transformers.
  • MIT licensed, free for commercial use, with fine-tuning scripts on GitHub.
  • Authors recommend switching to bge-small-en-v1.5 for better similarity distribution.

Compact embedding models remain one of the most practical tools for anyone building retrieval systems on a budget, and BAAI's bge-small-en is a good example of why. It ships from the Beijing Academy of Artificial Intelligence as part of the broader BGE (BAAI General Embedding) family, and it continues to see heavy download traffic on the Hugging Face Hub despite the availability of newer variants.

The pitch is straightforward: a small transformer that produces dense vectors good enough for real retrieval, cheap enough to run at scale, and permissively licensed so you can drop it into commercial products without friction.

A tiny model with respectable numbers

The architecture is a BERT-style encoder with 33.4M parameters, producing 384-dimensional embeddings with a 512-token context window. That footprint is what makes it interesting, since most of the models that beat it on public leaderboards are five to twenty times larger.

On the Massive Text Embedding Benchmark (MTEB), which averages 56 tasks across retrieval, clustering, classification, reranking, and semantic similarity, the reported scores are:

  • Average across 56 tasks: 62.11
  • Retrieval (15 tasks): 51.82
  • Semantic textual similarity (10 tasks): 80.72
  • Classification (12 tasks): 74.37

For comparison, OpenAI's text-embedding-ada-002 averages 60.99 on the same benchmark with a 1536-dimensional output, meaning bge-small-en produces vectors a quarter of the size while landing slightly higher on average. The concession is context length, where ada-002 supports 8192 tokens against 512 here.

How it was built

The training pipeline uses a two-stage recipe that is now standard across the top of the leaderboard: pretraining with RetroMAE, followed by contrastive learning on large-scale pairs data. RetroMAE is a masked auto-encoder objective that aggressively masks the decoder input and forces the encoder to compress meaning into a single vector, which turns out to be a strong starting point for retrieval.

An important caveat lives in the training notes. The pretraining objective is reconstruction, so the pretrained checkpoint cannot be used for similarity calculation directly and needs fine-tuning. BAAI provides scripts through the FlagEmbedding repository, including hard-negative mining utilities that noticeably improve retrieval numbers on domain-specific corpora.

Getting it running

The model integrates with pretty much every embedding library in the ecosystem: FlagEmbedding, sentence-transformers, LangChain, and raw Hugging Face Transformers. A minimal sentence-transformers snippet looks like this:

from sentence_transformers import SentenceTransformer
model = SentenceTransformer('BAAI/bge-small-en')
queries = ["Represent this sentence for searching relevant passages: what is RAG?"]
passages = ["Retrieval augmented generation combines search with an LLM."]
q = model.encode(queries, normalize_embeddings=True)
p = model.encode(passages, normalize_embeddings=True)
print(q @ p.T)

Two details matter here. Embeddings should be L2-normalized so the dot product equals cosine similarity. The query also gets a special instruction prefix (Represent this sentence for searching relevant passages:) while passages do not. This asymmetric instructioning is how the model was trained to separate short queries from long documents.

What to watch out for

The model card is refreshingly honest about rough edges. Similarity scores are compressed into a narrow band because of the contrastive training temperature of 0.01, so the distribution sits roughly in the [0.6, 1.0] range. Two unrelated sentences can easily score above 0.5, which makes absolute thresholds misleading. The authors' guidance is that relative order matters, not absolute value, and thresholds should be tuned per-dataset.

The model card itself now points users toward the successor: version 1.5 improves similarity distribution and drops the need for special query instructions. If you are starting fresh, bge-small-en-v1.5 is the drop-in replacement, with the same 33.4M parameter footprint and API.

Where it fits

The practical sweet spot is any pipeline where embedding cost dominates and latency matters:

  • RAG retrievers on CPU or small GPU, where 384 dims keeps the vector DB cheap and encoding fast
  • On-device or edge semantic search, since the weights fit in roughly 130 MB in fp32 and half that in fp16
  • Semantic deduplication and clustering on large corpora where hitting an API per document would be prohibitive
  • Feature extraction for downstream classifiers, where the 384-dim vector plugs into logistic regression or a small MLP

The weights ship under the MIT license, so commercial use is unrestricted. Paired with a cross-encoder like bge-reranker-base for top-k reranking, it forms one of the cheapest retrieve-then-rerank stacks you can assemble without touching a paid API.