inference.eu

Reranking · BAAI (Beijing Academy of Artificial Intelligence)

Run the bge-reranker-v2-m3 reranker in the EU through our API

bge-reranker-v2-m3 is a lightweight multilingual reranker. It reads a query and a candidate passage together and returns a relevance score, so you can put the best results first after a fast vector search. On inference.eu you call it through our API, with your queries and documents processed in EU data centres and never used for training.

  1. 01568M
  2. 02EU data centres
  3. 03Apache 2.0

What bge-reranker-v2-m3 is

bge-reranker-v2-m3 was released in March 2024 by the Beijing Academy of Artificial Intelligence (BAAI) under the Apache 2.0 licence. It is built on the bge-m3 embedding model and has about 568 million parameters. BAAI describes it as a lightweight reranker with strong multilingual capabilities, easy to deploy and fast at inference.

Unlike an embedding model, which turns query and document into separate vectors, a reranker is a cross-encoder: it reads the query and the passage as one input and outputs a single score. That is slower per pair, but much more precise, which is why rerankers are used as a second step on a short list of candidates.

What it does well, and where it falls short

The reranker sharpens retrieval in search and RAG systems. After bge-m3 or another embedding model returns the top 50 to 100 candidates, bge-reranker-v2-m3 reorders them so that the passages a chat model sees first are the ones that really answer the question. It works across many languages, including mixed-language queries and documents, and its small size keeps the extra step cheap.

It cannot search a whole corpus by itself: each query and passage pair needs its own pass, so it only suits short candidate lists. Scores are relative, not calibrated probabilities. BAAI's larger rerankers based on Gemma or MiniCPM can rank better on hard cases, at a higher compute cost.

Calling bge-reranker-v2-m3 through the API

Set the base URL to the inference.eu API, use your inference.eu key and set the model to bge-reranker-v2-m3. Send a request to the rerank endpoint, /v1/rerank, with a query and a list of documents. The response gives a relevance score for each document, which you use to sort them before passing the best few to a chat model.

The raw score can be any real number. BAAI notes that a sigmoid function maps it to a value between 0 and 1, which makes it easier to set a cut-off for weak matches. Frameworks such as LangChain and LlamaIndex can call the reranker as a post-processing step after vector retrieval.

Data residency for bge-reranker-v2-m3

A reranker sees the user's question and the full text of every candidate passage, often the most sensitive parts of your knowledge base. On inference.eu, bge-reranker-v2-m3 runs on infrastructure in the European Union, so queries and documents are processed in EU data centres, are not sent to China and are never used to train any model.

Every customer receives a data processing agreement under Article 28 of the GDPR and our subprocessor list, so the whole retrieval pipeline, from embedding to reranking to answer generation, can be documented with one provider. Billing is in euros. The Apache 2.0 licence allows commercial use without user limits.

bge-reranker-v2-m3 · Python
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.inference.eu/v1", api_key=os.environ["INFERENCE_EU_API_KEY"])

response = client.chat.completions.create(
    model="bge-reranker-v2-m3",
    messages=[{"role": "user", "content": "Summarise this contract in five bullet points."}],
)
print(response.choices[0].message.content)

What teams use it for

  • 1

    Better RAG answers

    Reorder retrieved passages so the chat model reads the most relevant evidence first and answers more accurately.

  • 2

    Search result ranking

    Improve the top results of an internal or customer-facing search across several European languages.

  • 3

    Filtering weak matches

    Drop candidate passages below a score threshold so that irrelevant text does not reach the prompt.

BGE Reranker v2 M3: common questions

The questions buyers, developers and legal teams ask us most. Something missing? Ask us directly.

Ask a question

Move your AI workloads to EU infrastructure

Tell us which models you use and roughly how much traffic you have. We reply within one working day with pricing and next steps.

  • Reply within one working day
  • Pricing for your volume
  • DPA ready to sign