Overview

BGE-M3, from the Beijing Academy of Artificial Intelligence (BAAI), is named for three “M”s: multi-linguality, multi-functionality and multi-granularity. One open model supports more than 100 languages, handles inputs from a sentence up to 8,192 tokens, and offers three ways to retrieve text: dense vectors, sparse lexical weights and multi-vector representations. BAAI described it in the paper “M3-Embedding” (arXiv 2402.03216), first posted in February 2024.

How it works

The model starts from XLM-RoBERTa-large, which BAAI extended to 8,192 positions and further pre-trained with the RetroMAE method on 184 million texts in 105 languages. It was then trained contrastively on about 1.2 billion text pairs and fine-tuned for retrieval. From a single pass it produces:

  • Dense embeddings: one 1,024-dimension vector per text, for ordinary semantic search.
  • Sparse weights: a learned weight per token, similar to keyword search, which the model card says comes at almost no extra cost.
  • Multi-vector output: one vector per token, scored ColBERT-style by matching each query token to its best passage token.

A training technique the authors call self-knowledge distillation combines the scores from all three modes as a teacher signal. Unlike earlier BGE models, queries need no instruction prefix.

License and running it

BGE-M3 is released under the MIT license. BAAI’s FlagEmbedding library returns all three outputs and can mix their scores with chosen weights; Sentence Transformers and Hugging Face Transformers also produce the dense vectors. Ollama packages it as bge-m3, a 1.2GB download. The model card recommends hybrid retrieval followed by a reranker such as BGE Reranker v2 M3, Milvus added support for its hybrid retrieval, and Vespa published a notebook for using its modes.

Strengths and limits

  • Strong multilingual and cross-lingual retrieval; the paper reports state-of-the-art results at release on MIRACL, MKQA and the MLDR long-document benchmark.
  • Long 8,192-token inputs suit whole sections or documents.
  • The paper itself notes that very long documents are costly to process and that generalization to new domains needs further testing.
  • Storing per-token vectors for multi-vector search uses far more space than dense vectors alone.
  • Its 2024 scores have since been passed by newer embedding models, so test on your own data.

Alternatives

Open options include Qwen3 Embedding, multilingual-E5-large, jina-embeddings-v3 and EmbeddingGemma; text-embedding-3-large is a hosted option. Our guide on how to choose an embedding model and our explainer on hybrid search and reranking show where BGE-M3’s dense and sparse modes fit.

Specifications are taken from the model card on Hugging Face and the M3-Embedding paper. Benchmark results depend on evaluation settings; see how AI benchmarks work.