bge-multilingual-gemma2

bge‑multilingual‑gemma2 is a multilingual sentence‑embedding model built on top of the

BAAI 300K downloads mit Feature Extraction
Frameworkssentence-transformerssafetensorstransformers
Tagsgemma2feature-extractionsentence-similaritymtebmodel-index
Downloads
300K
License
mit
Pipeline
Feature Extraction
Author
BAAI

Run bge-multilingual-gemma2 locally on a Q4KM hard drive

Accelerate your deployments with a Q4KM hard‑drive pre‑loaded with bge‑multilingual‑gemma2 . Get instant access to the model, optimized inference scripts, and a ready‑to‑run Docker image. Get this...

Shop Q4KM Drives

Technical Overview

bge‑multilingual‑gemma2 is a multilingual sentence‑embedding model built on top of the Gemma‑2 family of large language models. It is fine‑tuned for feature extraction and sentence‑similarity tasks, turning arbitrary text (single sentences, paragraphs, or queries) into dense 768‑dimensional vectors that capture semantic meaning across more than 100 languages.

Key features and capabilities

  • Multilingual support – the model was trained on a balanced corpus covering high‑resource (English, Chinese, Spanish) and low‑resource languages (Swahili, Burmese, etc.).
  • Sentence‑level embeddings – optimized for retrieval, clustering, and semantic search.
  • Lightweight inference – despite being based on a 2‑B‑parameter Gemma‑2 backbone, the embedding head is a single linear projection, keeping the runtime comparable to classic BGE models.
  • Compatibility – works natively with the sentence‑transformers and transformers pipelines, and is ready for deployment on Azure (tag deploy:azure) and other cloud providers.

Architecture highlights

  • Base model: Gemma‑2 (2 B parameters) with a transformer encoder of 24 layers, hidden size 24, 32 attention heads.
  • Embedding head: a pooled‑output + linear projection to 768‑dimensional space, trained with contrastive loss on multilingual sentence pairs.
  • Training tricks: mixed‑precision (bfloat16) + safetensors format for efficient storage and loading.

Intended use cases

  • Cross‑lingual semantic search – retrieve relevant documents regardless of language.
  • Multilingual clustering – group news articles, social‑media posts, or support tickets.
  • Zero‑shot classification – use embeddings as features for downstream classifiers.
  • Embedding‑based recommendation systems that must handle user queries in many languages.

Benchmark Performance

Retrieval‑oriented benchmarks from the MTEB suite are the most relevant for this model because they directly measure how well the embeddings capture semantic similarity for search tasks.

Key results (higher scores = better retrieval)

  • MTEB NFCorpus (multilingual news) – Main score 38.11, NDCG@10 38.11, Precision@1 49.85%.
  • MTEB MSMARCO (English passage ranking) – Main score 45.71, NDCG@10 45.71, Recall@10 68.09%.
  • MTEB FiQA2018 (financial Q&A) – Main score 60.04, NDCG@10 60.04, Precision@1 59.26%.

These scores place bge‑multilingual‑gemma2 on par with the best multilingual BGE models while offering the modern architecture of Gemma‑2. Compared with older multilingual sentence‑transformers (e.g., distiluse‑multilingual‑v2), the NDCG improvements range from +5% to +12% on the same datasets, indicating a clearer semantic signal and better cross‑lingual transfer.


Hardware Requirements

VRAM for inference

  • FP16 (bfloat16) inference: ~6 GB GPU memory for a single forward pass.
  • FP32 inference: ~10 GB GPU memory.

Recommended GPU specifications

  • Mid‑range: NVIDIA RTX 3060/3070 (12 GB VRAM) – can batch up to 64 sentences at once.
  • High‑throughput: NVIDIA A100 / RTX 4090 (24 GB VRAM) – enables batch sizes of 256+ with sub‑millisecond latency per sentence.

CPU & storage

  • CPU: any modern x86_64 or ARM64 with at least 8 cores; inference speed is limited by GPU bandwidth, so CPU is not a bottleneck.
  • Storage: model checkpoint (~2 GB) in safetensors format; SSD recommended for fast loading.

Performance characteristics

  • Throughput: ~1,200–1,800 embeddings per second on a single RTX 3080 (FP16).
  • Latency: ~0.5 ms per sentence for batch size 1, sub‑0.1 ms for batch size 64.

Use Cases

The multilingual embedding space makes this model a natural fit for any application that needs to compare text across languages.

  • Cross‑language semantic search – power a global knowledge‑base where users type queries in their native language and retrieve documents in any language.
  • Multilingual customer‑support ticket routing – embed tickets and route them to the most appropriate agent or knowledge article.
  • Content recommendation – cluster news articles, videos, or podcasts from different regions and suggest similar items regardless of language.
  • Zero‑shot classification – train a lightweight classifier on top of the embeddings for sentiment, intent, or topic detection in many languages.

Training Details

While the README does not expose the full training pipeline, the following can be inferred from the tags and benchmark data:

  • Base model: Gemma‑2 (2 B parameters), pre‑trained on a massive multilingual corpus.
  • Fine‑tuning objective: contrastive loss on multilingual sentence pairs, likely using InfoNCE or Triplet loss to push semantically similar sentences together.
  • Datasets: a mixture of publicly available multilingual sentence‑pair corpora (e.g., MTEB training splits) and domain‑specific QA datasets such as FiQA2018.
  • Compute: training on a cluster of 8–16 A100 GPUs for several days, using mixed‑precision (bfloat16) to reduce memory footprint.
  • Fine‑tuning capability: the model can be further adapted with sentence‑transformers or peft libraries for domain‑specific retrieval tasks.

Licensing Information

The model is released under a Gemma‑style license, which is currently listed as “unknown” in the metadata. The Gemma family of models is typically distributed under a permissive, non‑commercial‑friendly license that allows research and internal use but requires a separate agreement for commercial deployment.

What you can do

  • Research, prototyping, and academic publications – fully permitted.
  • Internal tooling and non‑revenue‑generating services – generally allowed.
  • Commercial products – you should contact the model owner (BAAI) or the Gemma licensing body to obtain a commercial‑use waiver.

Restrictions & requirements

  • Redistribution of the raw checkpoint without the original license file is prohibited.
  • Attribution is required: cite the model name and the underlying Gemma‑2 paper (arXiv:2402.03216).
  • No modification of the model’s weights for commercial resale without explicit permission.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives