BAAI Embedding, Search & Retrieval Models Last Updated: July 2026

BGE Embeddings: Complete Guide — Architecture, MTEB Benchmarks, Fine-Tuning, Local Deployment & RAG 2026

BGE embeddings reviewbge-large-en-v1.5BAAI BGE embedding modelBGE MTEB scoreBGE local deployment

Model Overview

BGE (BAAI General Embedding) is a family of open-source text embedding models developed by the Beijing Academy of Artificial Intelligence (BAAI), first released in August 2023 with the v1.5 update in late 2023. The flagship bge-large-en-v1.5 model produces 1,024-dimensional vectors and achieves a 63.5 MTEB average score, making it the highest-performing open-source English embedding model. BGE belongs to the text embedding model category and solves the problem of measuring semantic similarity between text with a model that can be self-hosted, fine-tuned, and used completely free of charge. BGE is designed for developers building privacy-first RAG pipelines, on-premise semantic search systems, and domain-specific retrieval applications. Its key differentiators are full open-source availability under the Apache 2.0 license, local deployment without any API calls, and LoRA-based fine-tuning for domain adaptation. The BGE family includes large (1,024 dims), base (768 dims), and small (384 dims) variants, plus multilingual and Chinese-specific models. In 2026, BGE is the most widely deployed open-source embedding model in enterprise RAG, powering search for organizations that require data sovereignty and model customization.

Need help choosing the right LLM for your project?

Our AI experts will help you select, integrate, and deploy the best model for your use case.

Book a Free Consultation →

Architecture & Technical Deep Dive

BGE uses a BERT-based encoder architecture built on XLM-RoBERTa-large, trained with a contrastive learning objective and a unique instruction-tuning approach. The models are fully open-source, enabling local deployment, fine-tuning, and inspection of model weights and architecture.

Core Architecture

BGE is built on the XLM-RoBERTa-large architecture — a transformer encoder with 24 layers, 1,024 hidden dimensions, 16 attention heads, and 560M parameters (large variant). The encoder processes text up to 512 tokens and produces a single dense vector per input via mean pooling over token representations. The large model outputs 1,024-dimensional vectors; the base model outputs 768-dimensional vectors; the small model outputs 384-dimensional vectors. All variants use the same architecture at different scales.

Instruction-Tuned Retrieval

A key innovation in BGE is instruction tuning for retrieval. When embedding queries, developers prepend an instruction such as "Represent this sentence for searching relevant passages: " to the query text. This produces query embeddings optimized for retrieval, similar to Cohere's input_type specification but achieved through prompt engineering rather than separate model heads. Documents are embedded without the instruction. This asymmetric approach improves retrieval accuracy by 3-5% over symmetric embeddings. The v1.5 update refined the instruction format and improved retrieval scores significantly over v1.0.

Training Methodology

BGE is trained in two stages. Stage 1: pre-training on a large web corpus using contrastive learning with a contrastive loss (InfoNCE). Stage 2: fine-tuning on labeled retrieval datasets including MS MARCO, NQ, and multi-domain retrieval data. BAAI uses hard-negative mining — training the model to distinguish relevant documents from superficially similar but irrelevant ones. The v1.5 update added more diverse training data and improved the contrastive learning curriculum. The model is trained on a single corpus of 100M+ text pairs across web text, academic papers, and domain-specific corpora.

Model Variants

The BGE family includes: bge-large-en-v1.5 (1,024 dims, 63.5 MTEB, 560M params) for maximum quality, bge-base-en-v1.5 (768 dims, 62.5 MTEB, 110M params) for balanced performance, bge-small-en-v1.5 (384 dims, 61.5 MTEB, 33M params) for fast inference, bge-m3 (multilingual, 100+ languages, 1,024 dims) for cross-lingual retrieval, and bge-large-zh-v1.5 for Chinese-specific applications. The small model runs on CPU at 100+ embeddings/second, making it ideal for edge deployment.

Inference Requirements

BGE can be self-hosted on modest hardware. bge-large-en-v1.5 requires 2.2GB VRAM (FP32) or 1.1GB (FP16) and runs on any GPU with 4GB+ VRAM, or on CPU with 8GB RAM (slower). bge-small-en-v1.5 runs on CPU with 4GB RAM at 100+ embeddings/second. Inference latency: 10-50ms per request on GPU, 50-200ms on CPU. Throughput: 1,000+ embeddings/second on a single A100. For production, use Hugging Face Text Embeddings Inference (TEI) server or FlagEmbedding library with batch processing.

MTEB Benchmark Performance & Scores

Scores based on publicly available data as of July 2026. Independent verification recommended.

MTEB Benchmark Comparison

Scroll horizontally →
Benchmarkbge-large-en-v1.5bge-base-en-v1.5bge-small-en-v1.5text-embedding-3-large
MTEB Average63.562.561.564.6
Retrieval (NFC)53.051.850.255.4
STS (Semantic Similarity)67.866.565.170.3
Classification73.171.870.575.9
Clustering49.748.347.151.2
Pair Classification86.084.883.288.1
Reranking58.357.155.860.2
Summarization65.864.362.968.5
Bitext Mining68.266.764.572.4

Speed & Throughput

Latency: 10-50ms per request on GPU (bge-large), 50-200ms on CPU. bge-small runs at 100+ embeddings/second on CPU. Throughput: 1,000+ embeddings/second on a single A100 GPU. For production, use Hugging Face Text Embeddings Inference (TEI) server for optimized batch processing. Self-hosting eliminates API latency and rate limits, enabling unlimited throughput bounded only by hardware.

Speed & Latency

Latency: 10-50ms per request on GPU (bge-large), 50-200ms on CPU. bge-small runs at 100+ embeddings/second on CPU. Throughput: 1,000+ embeddings/second on a single A100 GPU. For production, use Hugging Face Text Embeddings Inference (TEI) server for optimized batch processing. Self-hosting eliminates API latency and rate limits, enabling unlimited throughput bounded only by hardware.

API Access, Pricing & Integration Guide

Looking for bge-large-en-v1.5 API pricing in 2026? Below is the complete pricing table, code examples, and integration guide.

API Pricing Table (as of July 2026)

ModelPrice (per 1M tokens)DimensionsBest For
bge-large-en-v1.5 (self-hosted)Free1,024Maximum quality
bge-base-en-v1.5 (self-hosted)Free768Balanced
bge-small-en-v1.5 (self-hosted)Free384Fast inference
bge-large (Hugging Face API)$0.191,024Managed inference

Free Tier & Trial Access

BGE is completely free when self-hosted under the Apache 2.0 license — no API calls, no token limits, no rate limits. Hugging Face Inference API offers a free tier for testing. Together AI and other providers offer managed BGE inference at competitive rates. The only cost is compute hardware for self-hosting.

API Quick Start

# Install FlagEmbedding
pip install FlagEmbedding

from FlagEmbedding import FlagModel
import numpy as np

# Load model (downloads from Hugging Face)
model = FlagModel('BAAI/bge-large-en-v1.5',
                  query_instruction_for_retrieval="Represent this sentence for searching relevant passages: ",
                  use_fp16=True)

# Embed documents
documents = [
    "Machine learning is fascinating",
    "AI transforms industries",
    "I love pizza"
]
doc_embeddings = model.encode(documents)

# Embed a query (with retrieval instruction auto-prepended)
query = "What is AI?"
query_embedding = model.encode_query(query)

# Compute cosine similarity
sims = model.similarity(query_embedding, doc_embeddings)
print(f"Similarities: {sims}")

# Or using sentence-transformers
# from sentence_transformers import SentenceTransformer
# model = SentenceTransformer('BAAI/bge-large-en-v1.5')

Supported API Features

Self-hosted (free) Yes
Fine-tuning (LoRA) Yes
Fine-tuning (full) Yes
Instruction-tuned retrieval Yes
Multilingual (bge-m3) Yes (100+ languages)
512 token max input Yes
Batch processing Yes (unlimited)
CPU inference Yes (bge-small especially)

Compatible Platforms & Integrations

Hugging FaceFlagEmbeddingsentence-transformersLangChainLlamaIndexPineconeWeaviateQdrantChromapgvectorMilvusTogether AIAnyscale

Want to integrate bge-large-en-v1.5 into your product?

Our engineers help you architect, build, and deploy AI-powered features with production-grade reliability.

Talk to Our Engineers →

Fine-Tuning, RAG & Advanced Use

Fine-Tuning Availability

BGE supports full fine-tuning and LoRA-based parameter-efficient fine-tuning via the FlagEmbedding library. Developers can fine-tune on domain-specific query-document pairs using contrastive loss. LoRA fine-tuning requires as few as 1,000 query-document pairs and 8GB VRAM. Full fine-tuning requires 5,000+ pairs and 24GB+ VRAM. Fine-tuned BGE models often outperform commercial APIs on domain-specific retrieval by 5-15%.

Fine-Tuning Requirements

LoRA fine-tuning: 8GB+ VRAM (RTX 3060 or better), 1,000+ domain-specific query-document pairs, FlagEmbedding library. Full fine-tuning: 24GB+ VRAM (RTX 3090, A100), 5,000+ pairs, 2-4 hours training time. Recommended: use LoRA for most domain adaptation — 90% of the quality gain at 10% of the compute. Training data format: (query, positive_document, negative_documents) triples with hard-negative mining.

Fine-Tuning Use Cases

  • Privacy-first RAG pipeline — self-host BGE for on-premise retrieval with zero data leaving your infrastructure
  • Domain-specific retrieval — fine-tune BGE on legal, medical, or financial documents for 5-15% retrieval improvement over generic models
  • Edge deployment — use bge-small-en-v1.5 for on-device embedding generation on laptops, phones, or IoT devices
  • Unlimited-scale embedding — self-host for unlimited throughput without API rate limits or per-token costs
  • Research and experimentation — full access to model weights enables custom architecture modifications and research

RAG Integration Guide

BGE is the leading open-source choice for privacy-first RAG. Recommended architecture: Documents → Chunker (256-512 tokens) → bge-large-en-v1.5 (self-hosted via TEI) → Vector DB (Qdrant, Milvus, Chroma, pgvector — all self-hosted) → Query bge-large-en-v1.5 (with retrieval instruction) → Retriever → LLM (Llama 3, Mistral, or any open-source LLM). For domain-specific RAG, fine-tune BGE on domain query-document pairs with LoRA before indexing. Use bge-small for cost-sensitive or edge deployments. The entire pipeline can run on-premise with zero external API calls.

Prompt Engineering Tips

  • Prepend "Represent this sentence for searching relevant passages: " to queries for retrieval (auto-handled by FlagModel)
  • Do NOT prepend the instruction to documents — only to queries
  • Chunk documents at 256-512 tokens with 50-100 token overlap (within the 512-token limit)
  • Use bge-small-en-v1.5 for CPU-only or edge deployment — 100+ embeddings/second on CPU
  • Fine-tune with LoRA on 1,000+ domain query-document pairs for 5-15% retrieval improvement
  • Use Hugging Face TEI server for production deployment — optimized for batch embedding inference
  • Use FP16 inference to halve VRAM requirements with minimal quality loss

Use Cases, Strengths & Limitations

Top 10 Real-World Use Cases

1

Privacy-First RAG Pipeline

Self-host BGE for on-premise retrieval with zero data leaving your infrastructure. Critical for healthcare, finance, and government applications.

2

Domain-Specific Retrieval

Fine-tune BGE on legal, medical, or financial documents for 5-15% retrieval improvement over generic commercial models.

3

On-Premise Semantic Search

Power enterprise search with self-hosted BGE and Qdrant/Milvus. No external API dependencies, full data sovereignty.

4

Edge & On-Device Embedding

Use bge-small-en-v1.5 for on-device embedding on laptops, phones, or IoT devices. 100+ embeddings/second on CPU.

5

Unlimited-Scale Embedding

Self-host for unlimited throughput without API rate limits or per-token costs. Scale to billions of embeddings.

6

Research & Customization

Full access to model weights enables custom architecture modifications, research, and experimentation.

7

Multilingual RAG

Use bge-m3 for cross-lingual retrieval across 100+ languages with self-hosted infrastructure.

8

Cost-Optimized RAG

Eliminate per-token API costs entirely — self-hosted BGE is free under Apache 2.0, bounded only by hardware costs.

9

Compliance-Regulated Industries

Deploy in air-gapped environments for HIPAA, FedRAMP, and SOC 2 compliance with no external data transmission.

10

Open-Source LLM Stack

Pair BGE with Llama 3, Mistral, or Qwen for a fully open-source RAG pipeline with no proprietary dependencies.

11

Document Deduplication

Identify near-duplicate documents in large corpora at scale with no API cost constraints.

12

Custom Vocabulary Search

Fine-tune BGE on organization-specific terminology and jargon for improved internal search accuracy.

Strengths

  • Fully Open Source (Apache 2.0) — free to use, modify, and distribute with no restrictions
  • Local Deployment — self-host with zero external API calls for complete data sovereignty
  • Fine-Tunable — LoRA and full fine-tuning for domain adaptation with 5-15% retrieval improvement
  • Top Open-Source MTEB Performance — 63.5 MTEB average, highest among open-source English models
  • Multiple Model Sizes — large, base, and small variants for quality/speed/cost trade-offs
  • Instruction-Tuned Retrieval — query instruction improves retrieval accuracy by 3-5%
  • Unlimited Throughput — self-hosted with no rate limits or per-token costs
  • Edge Deployment — bge-small runs on CPU at 100+ embeddings/second

Limitations & Weaknesses

  • Lower MTEB Than Top Commercial — 63.5 vs 64.6 (OpenAI) and 64.8 (Jina v3); 1-2 points behind
  • 512-Token Input Limit — shorter than OpenAI (8,191) and Jina (8,192), requiring more chunking
  • Self-Hosting Overhead — requires GPU/CPU infrastructure and DevOps for production deployment
  • No Managed API (Free) — Hugging Face API costs $0.19/1M; self-hosting requires hardware
  • Smaller Ecosystem Than OpenAI — fewer pre-built integrations, though LangChain and LlamaIndex support it
  • English-Focused (en models) — multilingual support requires bge-m3, which is larger and slower
  • No Multimodal — text-only; for multimodal, use CLIP-based open-source models

Who Should Use This Model

Best For

  • Privacy-first organizations needing on-premise embedding with zero external data transmission
  • Teams that need fine-tunable embeddings for domain-specific retrieval (legal, medical, financial)
  • Cost-optimized or unlimited-scale applications where per-token API costs are prohibitive

Not Ideal For

  • Teams wanting managed API without infrastructure overhead — consider OpenAI or Cohere
  • Applications needing long document embedding (>512 tokens) — consider OpenAI or Jina
  • Projects requiring maximum MTEB score — Jina v3 (64.8) and OpenAI (64.6) score slightly higher

Alternatives, Comparisons & Verdict

Top Alternatives

ModelMTEB AvgOpen SourceDimensionsPrice/1M tokBest For
bge-large-en-v1.563.5Yes1,024FreeOpen source RAG
text-embedding-3-large64.6No3,072$0.13Production quality
E5-large-v262.0Yes1,024FreeFine-tunable
Jina Embeddings v364.8Yes1,024Free8K context
Cohere Embed v364.5No1,024$0.10Asymmetric retrieval
Voyage-263.8No1,024$0.12Long context RAG

Detailed Comparison

BGE-large vs OpenAI text-embedding-3-large: BGE is free/open-source and runs locally (critical for privacy). OpenAI scores slightly higher (64.6 vs 63.5 MTEB) and has flexible dimensions and 8K context. BGE is fine-tunable; OpenAI is not. BGE is free; OpenAI costs $0.13/1M. Choose BGE for privacy, fine-tuning, and cost; OpenAI for convenience and maximum quality. BGE-large vs E5-large: Both are open-source and fine-tunable. BGE scores higher (63.5 vs 62.0 MTEB) and has instruction-tuned retrieval. E5 has a simpler architecture and is easier to fine-tune. BGE has better multilingual support via bge-m3. Choose BGE for higher quality, E5 for simpler fine-tuning.

Our Verdict

BGE is the best open-source embedding model for privacy-first RAG in 2026. Its combination of top-tier MTEB performance (63.5), Apache 2.0 licensing, local deployment, and LoRA fine-tuning makes it the default choice for on-premise and domain-specific applications. Choose BGE for privacy and fine-tuning, OpenAI for convenience, or Jina v3 for higher MTEB with open-source.

Overall Rating 8.7 / 10
MTEB Performance 8.3 / 10
Multilingual Quality 7.5 / 10
API & Integration 7.5 / 10
Value for Money 10 / 10
Fine-Tuning 9.0 / 10
Local Deployment 10 / 10

Internal Links

Frequently Asked Questions

What is the MTEB score of BGE-large-en-v1.5?

bge-large-en-v1.5 achieves a 63.5 MTEB average score, the highest among open-source English embedding models. It scores 53.0 on retrieval, 67.8 on semantic similarity, and 73.1 on classification. bge-base scores 62.5 and bge-small scores 61.5 on MTEB average.

Is BGE really free to use commercially?

Yes, BGE is licensed under Apache 2.0, which permits free commercial use, modification, distribution, and even reselling. There are no per-token costs, no API fees, and no usage limits when self-hosted. The only cost is the compute hardware for self-hosting. Hugging Face also offers a free Inference API tier for testing.

How do I fine-tune BGE on my own data?

Use the FlagEmbedding library for LoRA or full fine-tuning. LoRA requires 8GB+ VRAM and 1,000+ query-document pairs. Full fine-tuning requires 24GB+ VRAM and 5,000+ pairs. Format training data as (query, positive_document, negative_documents) triples with hard-negative mining. Fine-tuned BGE often outperforms commercial APIs on domain-specific retrieval by 5-15%.

What is the retrieval instruction for BGE queries?

Prepend "Represent this sentence for searching relevant passages: " to queries when embedding them for retrieval. The FlagModel class handles this automatically via the query_instruction_for_retrieval parameter. Do NOT prepend the instruction to documents — only to queries. This improves retrieval accuracy by 3-5%.

Can BGE run on CPU without a GPU?

Yes, all BGE models run on CPU. bge-small-en-v1.5 is optimized for CPU and achieves 100+ embeddings/second on a modern CPU. bge-large runs on CPU at 5-20 embeddings/second. Use FP16 or INT8 quantization to reduce memory and improve CPU speed. For production GPU deployment, use Hugging Face Text Embeddings Inference (TEI) server.

What is the difference between BGE v1.0 and v1.5?

BGE v1.5 (December 2023) improved over v1.0 (August 2023) with: refined instruction format, more diverse training data, improved contrastive learning curriculum, and better retrieval scores. bge-large-en-v1.5 scores 63.5 MTEB vs 63.2 for v1.0. Always use v1.5 — it is strictly better and a drop-in replacement.

How does BGE compare to OpenAI text-embedding-3-large?

BGE is free/open-source and runs locally (critical for privacy). OpenAI scores slightly higher (64.6 vs 63.5 MTEB) and has flexible Matryoshka dimensions and 8K context. BGE is fine-tunable; OpenAI is not. BGE is free; OpenAI costs $0.13/1M tokens. Choose BGE for privacy, fine-tuning, and cost; OpenAI for convenience and maximum quality.

What is bge-m3 and when should I use it?

bge-m3 is the multilingual variant of BGE, supporting 100+ languages with cross-lingual retrieval. It produces 1,024-dimensional vectors and handles multiple retrieval tasks (dense, sparse, multi-vector). Use bge-m3 for any multilingual or cross-lingual application. It is larger and slower than English-only BGE but provides strong multilingual performance.

How do I deploy BGE in production?

Use Hugging Face Text Embeddings Inference (TEI) server for optimized production deployment. TEI supports batch processing, FP16 inference, and optimized tokenization. Deploy on a GPU instance (e.g., A10G, T4, or A100) or CPU for bge-small. Pair with a self-hosted vector DB (Qdrant, Milvus, Chroma) and open-source LLM (Llama 3, Mistral) for a fully open-source RAG pipeline.

Compliance, Ethics & Responsible Use

Data Privacy & Compliance

BGE is self-hosted — no data leaves your infrastructure. This is the strongest privacy posture: full data sovereignty, air-gapped deployment possible, zero external API calls. Suitable for HIPAA, FedRAMP, SOC 2, and GDPR compliance when deployed in compliant infrastructure. No data retention by third parties. For managed inference, Hugging Face and Together AI have their own data policies — review before use. Self-hosting is the recommended approach for privacy-sensitive applications.

Ethical Use Guidelines

As an open-source model, BGE's ethical considerations include: (1) bias in embeddings — trained on web data that may reflect societal biases, affecting search fairness across demographics, (2) dual-use — embedding-based search could enable surveillance, but self-hosting gives organizations full control over usage, (3) transparency — full model weights and training methodology are published, enabling bias auditing. BAAI publishes model cards and training documentation. Organizations should audit embeddings for bias in domain-specific applications.

Commercial Licensing Summary

Use CaseFree TierPaid PlanEnterprise
Personal useYes (free)YesYes
Commercial contentYes (free)YesYes
Product integrationYes (free)YesYes
White-labellingYes (free)YesYes
Reselling API serviceYes (free)YesYes
Training other modelsYes (free)YesYes

Enterprise Compliance Checklist

GDPR compliant data processing (yes — self-hosted, no external data transfer)
HIPAA compliance (yes — self-hosted in compliant infrastructure)
On-premise or VPC deployment option (yes — self-hosted is the default)
Data residency control (yes — full control via self-hosting)
SOC 2 Type II certified (yes — when deployed in SOC 2 infrastructure)
SLA guaranteed uptime (self-managed — depends on your infrastructure)
Role-based access control (self-managed — depends on your deployment)
Audit logs available (self-managed — depends on your deployment)
Content moderation & safety filters (no built-in — add your own input filtering)
Terms permit commercial use at required scale (yes — Apache 2.0, no restrictions)

Want to master bge-large-en-v1.5?

Explore our LLM training programs and become an expert in deploying and fine-tuning AI models.

Explore Training Programs →

Changelog

July 2026Initial comprehensive guide published. Benchmark scores, API pricing, and feature comparisons updated.
Next UpdateQuarterly review scheduled — pricing and benchmark scores will be refreshed.