FlagEmbedding (BGE)

FlagEmbedding (BGE)

โ˜… 4.2 ๐Ÿ”– 4000 saves ๐Ÿ’ฐ Free GitHub

FlagEmbedding is the research library behind BGE, the widely used family of text embedding and reranking models from the Beijing Academy of Artificial Intelligence (BAAI). It provides the models, training code and evaluation tooling that made BGE a default choice for retrieval-augmented generation, and it has earned about 12,300 stars on GitHub.

Overview

Good RAG systems stand or fall on retrieval quality, and FlagEmbedding covers the full stack. The BGE model series spans general-purpose embeddings in several sizes, the multilingual and multi-granularity bge-m3, rerankers that refine first-pass search results, and LLM-based embedders for demanding workloads, together with visualized multimodal variants. The library is as much about making your own models as using theirs: it ships complete fine-tuning pipelines for embeddings and rerankers, including hard-negative mining and training on your own data, plus evaluation harnesses aligned with the MTEB and C-MTEB benchmarks where BGE models have repeatedly posted leading scores. Everything is released openly with weights on Hugging Face, and the project continues to publish new models and recipes โ€” the repository was actively updated through 2026, which keeps it a living reference for how modern embedding models are built and trained.

Key Features

  • The BGE model family: embeddings, rerankers and multilingual bge-m3
  • Complete fine-tuning pipelines for embeddings and rerankers on your own data
  • LLM-based embedder training for high-accuracy retrieval workloads
  • Evaluation tooling aligned with MTEB and C-MTEB benchmarks
  • Open weights on Hugging Face with permissive licensing for most models
  • Recipes and documentation covering the full retrieval pipeline for RAG

๐Ÿ’ณ Pricing

FlagEmbedding is free and open source under the MIT license, and the BGE models can be downloaded and self-hosted at no cost. You pay only for your own compute, or optionally for a hosted embedding API if you choose one instead.

Who Is It For

FlagEmbedding is for developers and researchers building search, recommendation and RAG systems who need state-of-the-art open embeddings โ€” and for teams who want to fine-tune an embedding or reranking model on their own domain data rather than accept generic retrieval quality.

๐Ÿš€ Visit FlagEmbedding (BGE) Official Site

๐Ÿšฉ Report an issue