Skip to content

BAAI

BAAI/bge-reranker-v2-m3

Multilingual cross-encoder reranking with a sequence-classification head.

Model metadata
CategoryRerankerParams568MContext8,192BackendsCUDA, METALTasksRerank
Recipe authorship · Recorded configuration verification

Recipe authorship: Curated

Curated and generated describe how this recipe was written, not whether it ran successfully.

Recorded configuration verification

No current matching configuration verification record.

Records cover the tested default configuration on the named hardware. Matching release minor, variant, and rendering hash are required; changing options does not verify the new configuration.

Choose your actual device. Your browser cannot detect GPU memory.

Command builder

Hardware
Variant

BAAI/bge-reranker-v2-m3

Mode: Server
Advanced
Context

Context length is measured in tokens. Use the slider or enter a number.

Features

Estimated memory use

approx

Approximate memory allocation in GB. These estimates are not measured peak usage.

  • Weights: ≈ 1.1 GB
  • KV: ≈ 0.0 GB
  • Drafter: ≈ 0.0 GB
  • Runtime allowance: ≈ 1.0 GB

Estimated to leave ≈ 8.7 GB of the ≈ 10.7 GB available memory.

Next: prepare the executable

Notes

  • bf16 weights run as f16 on Apple Silicon.
  • This tier is estimated from nearby measurements.

1. Install

Install in your terminal. Uncached model IDs download automatically on first use.

MLXCEL_INSTALL_DIR="${MLXCEL_INSTALL_DIR:-$HOME/.local/share/mlxcel}" \
  && mkdir -p "$MLXCEL_INSTALL_DIR" \
  && curl -fL -o "$MLXCEL_INSTALL_DIR/mlxcel.zip" https://github.com/lablup/mlxcel/releases/download/v0.8.1/mlxcel-macos-aarch64.zip \
  && unzip -o "$MLXCEL_INSTALL_DIR/mlxcel.zip" -d "$MLXCEL_INSTALL_DIR/mlxcel-macos-aarch64" \
  && export PATH="$MLXCEL_INSTALL_DIR/mlxcel-macos-aarch64:$PATH" \
  && mlxcel --version
Installation and download help

Run the install command in your terminal. The selected executable should then be available on PATH. If it is not found, repeat the displayed PATH export in the same terminal.

Model IDs download automatically when first used. The optional download command prepares the checkpoint ahead of time. Uncached models require internet access and enough disk space; gated models also require access approval and credentials.

2. Run

Run this command in the same terminal after preparation. For server modes, keep it running and wait for the listening/ready message. If memory is insufficient, select a smaller checkpoint or reduce context/concurrency in advanced settings.

Copy all includes the selected installation, checkpoint download, and displayed run commands, in that order. Run them in the same shell; multi-node commands belong on their respective machines.

mlxcel serve

This installation provides the full CLI. Use mlxcel serve; select a source build to use the standalone server.

mlxcel serve -m BAAI/bge-reranker-v2-m3 --rerank --alias bge-reranker-v2-m3
Command flag help
-m
Selects the model or checkpoint repository.
--rerank
--rerank
--alias
Sets the served model name used by API clients.

3. Check the first result

For a server, use a second terminal after it is ready. A text chat request returns JSON with choices[0].message.content; specialized endpoints return their task output. Replace sample file paths with your own inputs where shown. Connection refused: check the server address/port and terminal logs. Model access/download errors: check the model ID, permissions, internet connection, and free disk space.

curl http://127.0.0.1:8080/v1/rerank \
  -H "Content-Type: application/json" \
  -d '{"model":"bge-reranker-v2-m3","query":"What is vector search?","documents":["Vector search retrieves nearby embeddings.","A compiler translates source code."],"top_n":1}'

Performance evidence

No benchmark is recorded for this selected checkpoint and hardware combination. Commands and memory estimates use the catalog's model information.

Memory fit is a model-based estimate, separate from measured throughput and successful inference verification.

No measurement is available for this hardware yet. See the family page for related profiles. Family

Prerequisites

  • Install the mlxcel build for your selected hardware and check the selected checkpoint's memory estimate.
  • Allow internet access and enough disk space to download an uncached checkpoint; obtain Hugging Face access approval when the checkpoint requires it.

Recipe options

  • • Reranking scores query-document pairs; this checkpoint does not produce text embeddings.

Family

Cross-encoder sequence classifier (BERT / XLM-RoBERTa / ModernBERT)

Reranker

Guide

BGE Reranker v2 M3

This multilingual cross-encoder scores how well each document matches one query. It returns ranking scores rather than embeddings or generated tokens.

mlxcel rerank -m BAAI/bge-reranker-v2-m3 -q "What is vector search?" -d "Vector search retrieves nearby embeddings." -d "A compiler translates source code." --top-n 1

Server mode exposes /v1/rerank. Use the curl, Python, or JavaScript snippet in the recipe builder; the OpenAI SDK does not define a native reranking resource.

References