https://raw.githubusercontent.com/OrcVole/bge-reranker-cloudron/main/CloudronVersions.json
Description
BGE Reranker (bge-reranker-v2-m3) on Text Embeddings Inference
A private, self-hosted reranking API. It serves the Apache-2.0 model `BAAI/bge-reranker-v2-m3` - a multilingual XLM-RoBERTa cross-encoder - using Hugging Face Text Embeddings Inference (TEI), the production-grade Rust server. The model weights are baked into the image, so the app is ready within seconds of install, runs fully offline, and never phones home.
This is the reranking half of a two-stage retrieve-then-rerank pipeline. A retriever (vector search or keyword search) returns a shortlist of candidate passages; the reranker scores each candidate against the query with a cross-encoder, which is far more accurate than the first-stage similarity. You keep the top results. It pairs naturally with an embeddings server and a vector database.
The API
Send a query and a list of candidate texts; get a relevance score for each.
curl https://your-app-domain/rerank \
-H "Authorization: Bearer $RERANKER_API_KEY" \
-H 'content-type: application/json' \
-d '{"query":"what is panda?","texts":["hi","The giant panda is a bear endemic to China."]}'
# -> [{"index":1,"score":0.99...}, {"index":0,"score":0.00...}] (sorted best-first)
Request fields: query (string), texts (array of strings), and the optional raw_scores,
return_text, truncate, truncation_direction. TEI returns a score for every text and sorts the
results best-first; take as many as you need from the top. (TEI's /rerank has no server-side top_n;
slice client-side.)
Security and topology
- One strong API key is generated on first run and stored inside the app; send it as
Authorization: Bearer <key>. The reranking API is open at the network layer and protected by the key, so programmatic clients get a clean 401 (never an SSO redirect). - The browsable Swagger docs at
/docsare placed behind Cloudron single sign-on. /healthis open and unauthenticated for platform monitoring.
Notes
- CPU inference, amd64 only (the TEI CPU build bundles Intel MKL; there is no arm64 CPU image).
- The model is fixed (baked). For text embeddings, run the companion TEI embeddings app instead.
- This is an API, not a web app. Opening the domain shows a short landing page describing the API and
how to call it; the interactive Swagger docs are at
/docs(behind login).
Recent Changes
[1.0.0]
First release.
Serves BAAI/bge-reranker-v2-m3 (Apache-2.0, multilingual XLM-RoBERTa cross-encoder) on Hugging Face
Text Embeddings Inference 1.9.3 (CPU build), packaged for Cloudron.
Model weights are baked into the image and pinned by Hugging Face commit revision, with the large
files verified by sha256 at build time. The app is ready within seconds of install, fully offline.
Reranking API on POST /rerank, protected by an auto-generated Bearer API key. The /health path is
open; the Swagger docs at /docs are behind Cloudron single sign-on.
TEI is fronted by a small nginx reverse proxy that answers /health immediately, so the app stays
healthy during the model warmup (TEI binds its port only after warmup) instead of restart-looping.
memoryLimit is 6 GiB to cover the warmup memory peak.
Read-only root filesystem, runs as the unprivileged cloudron user, all state under /app/data.

