BGE Embeddings Explained: Models, Strengths and Self-Hosting

BGE Embeddings Explained: Models, Strengths and Self-Hosting

BGE embeddings are a family of free, open-weight embedding models from the Beijing Academy of Artificial Intelligence (BAAI), and they are the default choice when you want retrieval quality without an API bill or a data-residency problem. If your documents cannot leave your own servers, or your embedding volume makes per-token pricing painful, the question is whether an open model you host yourself can keep up with the paid APIs. The short answer is yes: bge-large-en-v1.5 is a proven English retriever, bge-m3 covers more than 100 languages with an 8,192-token context window, and both are released under the permissive MIT licence.

BGE stands for BAAI General Embedding, and the family has become one of the most widely deployed open embedding lines in production retrieval systems. The models run anywhere a transformer can run, from a laptop to a GPU server, and they work with the standard open-source tooling that teams already use, including sentence-transformers. There is no API key, no per-token charge and no vendor lock-in, which is a different kind of advantage from benchmark scores, but often the one that decides the choice.

Key takeaways

  • BGE embeddings are open-weight models from BAAI, released under the MIT licence, so you can host them yourself at no licence cost.
  • bge-large-en-v1.5 produces 1,024-dimensional vectors from inputs of up to 512 tokens and is the proven English retriever in the family.
  • bge-m3 handles more than 100 languages, accepts up to 8,192 tokens, and produces dense, sparse and multi-vector representations from one model.
  • The smaller bge-base-en-v1.5 and bge-small-en-v1.5 trade a little quality for speed on modest hardware.
  • Self-hosting gives you data control and predictable cost, but you take on the engineering work the APIs hide.

What BGE embeddings are

BGE models are encoder transformers trained with contrastive learning, which teaches the model to pull similar texts together in vector space and push dissimilar texts apart. The English v1.5 models are built for English retrieval, while bge-m3 is built on a multilingual backbone and covers more than 100 languages. All of them output dense vectors that work with any vector database, so the retrieval pipeline around them looks the same as it does for a paid API: chunk, embed, index, retrieve.

The practical difference is where the model runs. With BGE you download the weights, load them with a library such as sentence-transformers, and embed on your own hardware. A CPU can run the small and base models at useful speeds, while the large model and bge-m3 are happier on a modest GPU. That makes BGE the natural fit for air-gapped systems, for regulated data that cannot leave your network, and for teams that already run their own infrastructure.

The MIT licence is the other half of the story. You can use BGE models commercially, modify them, fine-tune them on your own data and ship them inside a product without paying a licence fee. Fine-tuning is the key point: a hosted API cannot be adapted to your domain, but a BGE model can, and a modest fine-tune on your own pairs of questions and documents is often the largest quality win available to a retrieval team.

The BGE family at a glance

Model Dimensions Max input tokens Size Best for
bge-large-en-v1.5 1,024 512 About 1.3 GB English retrieval quality
bge-base-en-v1.5 768 512 About 440 MB Balanced speed and quality
bge-small-en-v1.5 384 512 About 130 MB Fast, lightweight retrieval
bge-m3 1,024 8,192 About 2.3 GB Multilingual and long documents

The three English models form a clear ladder: small at 384 dimensions, base at 768 and large at 1,024, all with a 512-token input limit. The large model has around 335 million parameters and is the quality pick; the base model has around 109 million and is the compromise; the small model is the one you reach for when latency or memory dominates. bge-m3 sits apart from the ladder: it is multilingual, long-context and multi-functional, and it is the model to evaluate first for any system that is not English-only.

bge-large-en-v1.5: the proven English retriever

Best for: English document search and RAG where you want strong quality without an API dependency.

bge-large-en-v1.5 is the model that made the BGE name. At 1,024 dimensions and around 335 million parameters, it is large enough to capture fine distinctions between passages and small enough to run comfortably on a single GPU or a strong CPU. It has been widely benchmarked, widely deployed and widely integrated, which means the rough edges have been found by other people already: it works with the standard libraries, it has known behaviour on common corpora, and there are published recipes for quantizing and serving it.

The 512-token limit is the main design constraint. Documents longer than about 350 to 400 words must be split, and retrieval quality then depends on chunking as much as on the model. That is a manageable constraint for help centres, documentation and support content, where passages are naturally short, and it is the reason bge-m3 exists for longer material. Our guide to semantic chunking for RAG explains how to split documents so the chunks stay meaningful.

One practical tip: BGE models are sensitive to the instruction-style prefixes used by some other model families, so do not add query and passage prefixes unless the model card for your exact version asks for them. The v1.5 English models are designed to be used with plain text, and adding prefixes copied from another model’s documentation is a common way to quietly lose quality.

bge-m3: multilingual, long-context and multi-functional

Best for: multilingual corpora, long documents, and hybrid search built from a single model.

bge-m3 is the most capable model in the family and the one that best shows what open embeddings can do. It handles inputs of up to 8,192 tokens, which lets you embed long passages and whole sections without aggressive splitting, and it covers more than 100 languages in a single model. A global knowledge base can therefore use one embedder for every language, and cross-language retrieval works out of the box: a question in English can retrieve a passage written in French.

Its most unusual feature is multi-functionality. From one forward pass, bge-m3 can produce three kinds of representation: a dense vector for ordinary similarity search, a sparse vector for keyword-style matching, and a multi-vector representation for fine-grained token-level matching. That means hybrid search, which normally needs a keyword index bolted onto a vector index, can be built from a single model. Our guide to hybrid search for RAG explains why combining dense and sparse signals usually beats either one alone.

The cost is size and speed. At around 2.3 GB, bge-m3 needs more memory and more compute than the English models, and its long context means a single long input takes longer to encode than a short one. For most teams the trade is worth it, because one model replaces a multilingual model, a long-context model and a keyword index. If your corpus is English-only and short, though, the large English model is the cheaper pick.

Abstract illustration of a local server running an open embedding model
BGE embeddings run on your own hardware, keeping documents and vectors inside your network.

Self-hosting BGE: what it really involves

Self-hosting sounds like more work than it is for the initial setup and more work than people expect for production. Getting started is genuinely simple: install sentence-transformers, download the weights, and you can embed your first documents in an afternoon. The ongoing work is serving: batching requests efficiently, keeping the model loaded in memory, handling concurrent queries, and monitoring latency as the corpus grows.

Quantization is the main lever for serving cost. The models can be run in reduced precision with small quality losses, and the large model quantized to int8 runs noticeably faster on CPU than at full precision. For high-traffic systems, a dedicated inference server or a vector database with built-in embedding support may be worth the setup. Our guide to vector embedding storage covers the storage side of the problem, which is where most self-hosted systems waste money first.

The other cost is evaluation. A paid API comes with vendor benchmarks; a self-hosted model comes with your own test set, which you should build anyway. Measure retrieval quality on real questions with known good answers before you decide between the small, base and large models, and before you decide between BGE and a paid API. Our guide to choosing and tuning RAG embedding models gives a framework for that comparison.

When BGE wins and when it does not

BGE wins when data must stay in-house, when embedding volume makes per-token pricing expensive, when you want to fine-tune on your own domain, or when you need an offline system. It also wins on predictability: your costs are hardware and electricity, not a meter that ticks on every query, and no vendor can deprecate the model out from under you, because the weights are yours.

BGE loses when you have no one to run it. A team with no infrastructure experience will spend more on engineering time than it saves on API fees, and a system that needs to scale quickly is easier to build on a hosted API first. BGE also loses on raw multilingual breadth at the very top end, where the largest paid models still lead on some languages, and on multimodal input, since the BGE family is text-only. The honest answer for most teams is to start with the option that ships fastest, measure on real data, and switch only when the numbers justify it.

Decision checklist: should you use BGE embeddings?

  • Data rules: if documents cannot leave your network, self-hosted BGE is the obvious answer.
  • Language scope: English-only corpora suit the v1.5 ladder; anything multilingual points to bge-m3.
  • Document length: if passages run long, bge-m3’s 8,192-token window saves you from aggressive chunking.
  • Hardware: confirm you have the memory and compute for your chosen model, and test quantized versions for serving.
  • Evaluation set: build real questions with known good answers and compare small, base and large before committing.
  • Fine-tuning: if your domain has unusual vocabulary, budget time for a fine-tune, which is BGE’s biggest advantage over APIs.
  • Hybrid search: if you want keyword and vector signals together, test bge-m3’s sparse output before adding a separate index.

Frequently asked questions

What are BGE embeddings?

BGE embeddings are open-weight text embedding models from the Beijing Academy of Artificial Intelligence. The family includes English models at three sizes and the multilingual, long-context bge-m3, all released under the MIT licence.

Are BGE embeddings free?

Yes. The model weights are free under the MIT licence, and you can use them commercially. Your costs are the hardware and electricity to run them, rather than per-token API fees.

What is the difference between bge-large-en-v1.5 and bge-m3?

bge-large-en-v1.5 is an English-only model with a 512-token limit and 1,024 dimensions. bge-m3 is multilingual across more than 100 languages, accepts up to 8,192 tokens, and produces dense, sparse and multi-vector representations from one model.

Can I use BGE embeddings for RAG?

Yes. BGE models are widely used in retrieval-augmented generation systems, and they work with any vector database. Their main advantage for RAG is that you can fine-tune them on your own documents and keep all data in-house.

What hardware do I need to run BGE embeddings?

The small and base models run well on CPU. The large model and bge-m3 run on CPU too, but a modest GPU makes them much faster, especially for large corpora or high query volumes.

Do BGE models work with sentence-transformers?

Yes. BGE models are distributed in a format that works with sentence-transformers and other standard embedding libraries, so you can load them with a few lines of code and start embedding immediately.

Latest articles

Scroll to Top