<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[🚀 BGE Reranker: community package now available]]></title><description><![CDATA[<h2><img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f680.png?v=0a7c9407b89" class="not-responsive emoji emoji-android emoji--rocket" style="height:23px;width:auto;vertical-align:middle" title="🚀" alt="🚀" /> BGE Reranker: community package now available</h2>
<h3>One-Stop Retrieval Toolkit For Search and RAG</h3>
<blockquote>
<p dir="auto"><strong>TL;DR:</strong> A reranker scores how well each candidate passage answers a query, so you can reorder a<br />
shortlist by true relevance and keep the best few. This package serves <code>BAAI/bge-reranker-v2-m3</code> (a<br />
multilingual cross-encoder) on Hugging Face Text Embeddings Inference, with the <strong>model baked into the<br />
image</strong>, as a private <code>POST /rerank</code> API. It is the reranking tier of a self-hosted retrieve-then-rerank<br />
stack and the cheapest large quality win you can add to RAG or search. Now packaged for Cloudron and<br />
ready to install. Built and tested on Cloudron 9.x; unofficial and community-maintained.</p>
</blockquote>
<h3>Links</h3>
<ul>
<li><img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f3e0.png?v=0a7c9407b89" class="not-responsive emoji emoji-android emoji--house" style="height:23px;width:auto;vertical-align:middle" title="🏠" alt="🏠" /> Model card: <a href="https://huggingface.co/BAAI/bge-reranker-v2-m3" target="_blank" rel="noopener noreferrer nofollow ugc">https://huggingface.co/BAAI/bge-reranker-v2-m3</a></li>
<li><img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4e6.png?v=0a7c9407b89" class="not-responsive emoji emoji-android emoji--package" style="height:23px;width:auto;vertical-align:middle" title="📦" alt="📦" /> Upstream model project: <a href="https://github.com/FlagOpen/FlagEmbedding" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/FlagOpen/FlagEmbedding</a></li>
<li>🧱 Upstream server: <a href="https://github.com/huggingface/text-embeddings-inference" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/huggingface/text-embeddings-inference</a> (TEI)</li>
<li>🧰 Cloudron package repo: <a href="https://github.com/OrcVole/bge-reranker-cloudron" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/OrcVole/bge-reranker-cloudron</a></li>
</ul>
<p dir="auto">No public demo to click, this is an API you self-host. Once installed, opening the app's domain shows a<br />
small landing page explaining what it is and how to call it, and the interactive OpenAPI docs are at<br />
<code>/docs</code> behind your Cloudron login.</p>
<hr />
<h3><img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4e5.png?v=0a7c9407b89" class="not-responsive emoji emoji-android emoji--inbox_tray" style="height:23px;width:auto;vertical-align:middle" title="📥" alt="📥" /> How to install</h3>
<h2>Installation</h2>
<ul>
<li>Click on the Add custom app drop down top right in the App Store and choose Community app:</li>
<li>Then paste in the CloudronVersions.json URL into the box that pops up:</li>
</ul>
<p dir="auto"><img src="/assets/uploads/files/1782553024126-community-package-resized.jpeg" alt="Community Package.jpeg" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1782553033195-cloudronversions.jpeg" alt="CloudronVersions.jpeg" class=" img-fluid img-markdown" /></p>
<p dir="auto">Community packages are not in the App Store, so install via the CLI. The published image is on GHCR and<br />
the package ships a community versions file:</p>
<pre><code class="language-bash"># recommended: install the published community build from the versions URL
cloudron install \
  --versions-url https://raw.githubusercontent.com/OrcVole/bge-reranker-cloudron/main/CloudronVersions.json \
  --location reranker.example.com

# or pin the prebuilt image directly
cloudron install --image ghcr.io/orcvole/bge-reranker-cloudron:1.0.0 --location reranker.example.com

# or build it yourself from the repo
git clone https://github.com/OrcVole/bge-reranker-cloudron
cd bge-reranker-cloudron
cloudron build
cloudron install --image [your-registry]/bge-reranker-cloudron:latest --location reranker.example.com
</code></pre>
<p dir="auto"><strong>Minimums:</strong> 6 GB RAM (the model warmup peaks higher than its idle footprint; lower <code>RERANKER_MAX_BATCH_TOKENS</code><br />
if you want it leaner), amd64 (the TEI CPU build bundles Intel MKL), addons <code>localstorage</code> and <code>proxyAuth</code>.</p>
<p dir="auto"><strong>First run:</strong> the API key is generated for you. Read it from the app's Terminal with<br />
<code>cat /app/data/.secrets/keys.env</code> and send it as <code>Authorization: Bearer &lt;key&gt;</code> on <code>POST /rerank</code>. The<br />
<code>/docs</code> Swagger UI sits behind your Cloudron login; <code>/health</code> and the landing page at <code>/</code> are open. The<br />
model is baked into the image, so there is no first-boot download: the app reports healthy in seconds and<br />
serves its first rerank after a brief warmup (well under a minute).</p>
<hr />
<h3><img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f464.png?v=0a7c9407b89" class="not-responsive emoji emoji-android emoji--bust_in_silhouette" style="height:23px;width:auto;vertical-align:middle" title="👤" alt="👤" /> For users</h3>
<p dir="auto"><strong>Why try it:</strong> retrieval gets you a rough shortlist; a cross-encoder reranker reads the query and each<br />
candidate passage together and scores how well they actually match, which is far more accurate than<br />
first-stage similarity. Retrieve 50 candidates, rerank, keep the best 5 before you send them to the LLM.<br />
It is the highest-leverage, lowest-effort accuracy improvement you can add to a private retrieval stack,<br />
and your documents never leave your box.</p>
<p dir="auto">What you get out of the box:</p>
<ul>
<li>A <strong>reranking API</strong> (<code>POST /rerank</code> with a query and a list of texts, returns a relevance score for<br />
each, sorted best first), CPU-only, multilingual, model baked in.</li>
<li>A small <strong>public landing page</strong> at <code>/</code> that says what the API is and how to call it, plus interactive<br />
OpenAPI docs at <code>/docs</code> (behind your Cloudron login).</li>
<li><strong>Cloudron-specific wins:</strong> the API key is generated on first run, <code>/health</code> is open for monitoring,<br />
<code>/docs</code> sits behind Cloudron SSO, all state lives under <code>/app/data</code> so backups cover the key, and<br />
updates are one click. The key is stable across update and restore (verified).</li>
</ul>
<p dir="auto">Good fit if you want a self-hosted reranking tier for RAG and semantic search (pairs directly with the<br />
TEI and Qdrant community packages). Probably not for you if you need GPU acceleration (this build is<br />
CPU-only) or arm64 (the TEI CPU image is amd64-only).</p>
<hr />
<h3>🧰 For packagers: what we learned</h3>
<p dir="auto"><strong>What helped</strong></p>
<ul>
<li><strong>Baking the model with <code>curl</code> from the pinned <code>resolve/&lt;commit&gt;</code> URL plus a <code>sha256sum -c</code> gate</strong>,<br />
rather than a pip/Python download. No download cache baked into a layer: the ~5.2 GB image is all real<br />
weight (base + the TEI binary and MKL runtime + the 2.2 GB model). Ordering the model <code>RUN</code> before the<br />
entrypoint copy means editing the entrypoint rebuilds in seconds without re-downloading the model.</li>
<li>Reusing the sibling TEI embeddings package wholesale: the Intel MKL / <code>libiomp5</code> dlopen handling, the<br />
CPU-versus-CUDA tag trap (<code>cpu-1.9</code>, not the bare CUDA tag), the two-surface auth split, and the port<br />
move were already solved. The new ground was just baking the model and the memory behaviour.</li>
<li>Putting all state under <code>/app/data</code> so the <code>localstorage</code> backup just works; a real update and a real<br />
backup-then-restore both brought the key back byte-identical, with mode re-asserted to <code>0600</code>.</li>
</ul>
<p dir="auto"><strong>What was tricky and how we solved it</strong></p>
<ul>
<li><strong>A long model warmup makes a server restart-loop on Cloudron.</strong> TEI does not bind its HTTP port until<br />
warmup finishes (tens of seconds on CPU), so <code>/health</code> is refused during warmup and the platform kills<br />
and restarts the container before it is ready. Local podman never caught it, because it does not<br />
health-check during warmup; only the box did. The fix is the field guide's nginx immediate-health shim:<br />
nginx answers <code>/health</code> 200 from the first second and proxies everything else to TEI internally, with<br />
TEI still the main process so a real crash still restarts. The runtime smoke now asserts <code>/health</code> is<br />
answered <em>during</em> warmup, so the regression cannot return silently.</li>
<li><strong>nginx died on the box</strong> with <code>error_log /dev/stderr</code> (EACCES, because the fd-2 target is root-owned<br />
and the app runs unprivileged) and silently never bound its port. Use the <code>error_log stderr</code> keyword<br />
(writes the inherited fd, no <code>open()</code>). Also podman-invisible.</li>
<li><strong>TEI's default <code>max_batch_tokens</code> OOM-kills warmup</strong> for this 8192-token-context model (quadratic<br />
attention scratch). Set a frugal default (<code>4096</code>) and cap the thread count, and bound<br />
<code>OMP_NUM_THREADS</code>/<code>MKL_NUM_THREADS</code>, not just the framework's own thread var, or memory balloons on a<br />
host with no per-app CPU limit.</li>
</ul>
<p dir="auto"><strong>Still rough and open questions</strong></p>
<ul>
<li>Under box CPU contention the warmup stretches to ~90s. It is invisible to users (the shim keeps the app<br />
healthy), but a faster or memory-aware warmup upstream would be welcome.</li>
<li>Whether 6 GiB can be trimmed with a lower default batch budget without hurting throughput for the common<br />
reranking case.</li>
</ul>
<hr />
<h3><img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f6e0.png?v=0a7c9407b89" class="not-responsive emoji emoji-android emoji--hammer_and_wrench" style="height:23px;width:auto;vertical-align:middle" title="🛠" alt="🛠" />️ For the Cloudron team</h3>
<p dir="auto"><strong>Maintenance burden:</strong> the package is a thin layer (a pinned <code>TEI_VERSION</code> build-arg, a pinned model<br />
revision, and the manifest), so a rebump is a version bump and a re-run of the <code>/rerank</code> smoke. TEI has a<br />
steady release cadence.</p>
<p dir="auto"><strong>Why it would suit the App Store:</strong> Apache-2.0 upstream (both the model and the server), real demand<br />
(reranking is the missing accuracy tier for self-hosted RAG), and it completes the existing TEI and Qdrant<br />
community stack.</p>
<p dir="auto"><strong>Friction worth knowing about:</strong> the <code>iconUrl</code> field couples to the <code>minBoxVersion 9.1.0</code> floor on the<br />
versions-url channel (shared with TEI, Qdrant, Docling). And one worth a platform note: a backend that<br />
binds its port only after a long startup warmup will restart-loop, because the health check is refused<br />
during warmup; an immediate-health proxy works, but a documented startup grace would be friendlier.</p>
<hr />
<h3><img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4bb.png?v=0a7c9407b89" class="not-responsive emoji emoji-android emoji--computer" style="height:23px;width:auto;vertical-align:middle" title="💻" alt="💻" /> For TEI's and the model's developers</h3>
<p dir="auto">A few low-effort things that help packagers a lot:</p>
<ul>
<li><strong>Bind the listener (and answer <code>/health</code>) before warmup, or document that it comes up after.</strong> A<br />
platform that health-checks during startup restart-loops the container otherwise, and the failure is a<br />
silent refused connection.</li>
<li><strong>A memory-aware default <code>max_batch_tokens</code>.</strong> The current default allocates gigabytes of attention<br />
scratch during warmup for a long-context model on CPU and OOM-kills first boot with no clear error.</li>
<li><strong>Lower the log level of the ORT-backend fallback.</strong> TEI logs <code>ERROR ... onnx/model.onnx does not exist</code><br />
before falling back to Candle for a safetensors-only model; it reads like a failure but is the normal<br />
path. (A shipped <code>onnx/</code> export from BAAI would also let the faster ORT backend run.)</li>
<li>Inherited asks: <code>--hostname</code> defaulting to <code>HOSTNAME</code> is container-hostile, and an arm64 CPU image would<br />
broaden where this runs.</li>
</ul>
<p dir="auto">Package source and PRs welcome here: <a href="https://github.com/OrcVole/bge-reranker-cloudron" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/OrcVole/bge-reranker-cloudron</a>. Happy to co-maintain.</p>
<hr />
<h3><img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f513.png?v=0a7c9407b89" class="not-responsive emoji emoji-android emoji--unlock" style="height:23px;width:auto;vertical-align:middle" title="🔓" alt="🔓" /> Unlocks</h3>
<p dir="auto">Once it is running, you can:</p>
<ul>
<li>Sharpen any RAG or search result: retrieve a shortlist, rerank, keep the best few before the LLM sees them.</li>
<li>Rerank multilingually, with nothing leaving your server.</li>
<li>Drop the closed Cohere or Voyage rerank APIs for an Apache-2.0 model on your own box.</li>
</ul>
<h3><img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f517.png?v=0a7c9407b89" class="not-responsive emoji emoji-android emoji--link" style="height:23px;width:auto;vertical-align:middle" title="🔗" alt="🔗" /> Synergies</h3>
<p dir="auto">Pairs nicely with other Cloudron apps:</p>
<ul>
<li><strong>Reranker + TEI + Qdrant:</strong> embed with TEI, store and search in Qdrant, then rerank the shortlist here.</li>
<li><strong>Reranker + Ollama or Open WebUI:</strong> answer over the reranked context.</li>
<li><strong>Reranker + n8n or Windmill:</strong> an HTTP node or script calls <code>POST /rerank</code> with the Bearer key (both<br />
verified end to end from their containers).</li>
<li><strong>Reranker + Dify:</strong> add it as a Text Embeddings Inference rerank model in Dify's model providers.</li>
</ul>
<hr />
<p dir="auto">Feedback, bug reports, and "works on my install" confirmations all welcome below. <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f64f.png?v=0a7c9407b89" class="not-responsive emoji emoji-android emoji--pray" style="height:23px;width:auto;vertical-align:middle" title="🙏" alt="🙏" /></p>
]]></description><link>https://forum.cloudron.io/topic/15654/bge-reranker-community-package-now-available</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 08:44:46 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/15654.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 27 Jun 2026 21:37:07 GMT</pubDate><ttl>60</ttl></channel></rss>