Model Library/baai/bge-reranker-v2-m3
baai/bge-reranker-v2-m3

baai/bge-reranker-v2-m3

baai/bge-reranker-v2-m3
by BAAI
Input price
$0.01/ M tokens
Output price
$0.01/ M tokens
Context window
8Ktokens
Max output
8Ktokens

baai/bge-reranker-v2-m3 is a lightweight multi-language re-ranking model. Developed based on the bge-m3 model, it has strong multilingual capabilities, ease of deployment, and fast inference speed. This model takes query and document as input and directly outputs a similarity score, rather than an embedding vector. It is well-suited for multi-language scenarios, particularly excelling in Chinese and English processing.

Features

Serverless API

Docs

baai/bge-reranker-v2-m3 is available via Novita's serverless API, where you pay per token. There are several ways to call the API, including OpenAI-compatible endpoints with exceptional reasoning performance.

Available Serverless

Run queries immediately, pay only for usage

Input$0.01 / M Tokens
Output$0.01 / M Tokens
  1. Get your API key

    Sign up and create a key to run the code below. The API is OpenAI-compatible.

  2. Make your first request

    The API is OpenAI-compatible: point any OpenAI SDK at the base URL and pass this model ID.

    Base URL
    https://api.novita.ai/openai
    Model ID
    baai/bge-reranker-v2-m3
    API Endpoint
    rerank
    1import requests
    2
    3url = "https://api.novita.ai/openai/v1/rerank"
    4headers = {
    5    "Authorization": "Bearer <Your API Key>",
    6    "Content-Type": "application/json"
    7}
    8payload = {
    9    "model": "baai/bge-reranker-v2-m3",
    10    "query": "What is the capital of France?",
    11    "documents": [
    12        "Paris is the capital of France.",
    13        "Berlin is the capital of Germany."
    14    ],
    15    "top_n": 2
    16}
    17
    18response = requests.post(url, headers=headers, json=payload)
    19print(response.json())