Runs in the browser · Reranking
Run BGE Reranker v2 M3 in your browser
BGE Reranker v2 M3 downloads 669.6 MB over WebGPU (q4f16), or 544.3 MB over WebAssembly (uint8), to score how well a passage answers a query entirely in the tab with Transformers.js. No install, no server.
Reranking · onnx-community/bge-reranker-v2-m3-ONNX
- Parameters
- 567.76M
- Pipeline task
- text-classification
Reading
Rerankers score a (query, passage) pair, not a single string. Confirm the model card's expected input shape before assuming the generic text-classification pipeline() call handles pairs; AutoModelForSequenceClassification with a tokenizer pair encoding is the safer default.
The WASM build downloads smaller here: 544.3 MB (uint8) against 669.6 MB (q4f16) for WebGPU. The CPU-fallback quant compresses tighter than the GPU pick for this model.
The quant ladder spans 4.0x: 544.3 MB (uint8) to 2.12 GB (fp32).
Will it run in your browser?
Checking for WebGPU support…
All measured variants
| Variant | Size |
|---|---|
| uint8 WASM pick | 544.3 MB |
| q4f16 WebGPU pick | 669.6 MB |
| fp16 | 1.06 GB |
| q8 | 1.06 GB |
| bnb4 | 1.15 GB |
| q4 | 1.17 GB |
| fp32 | 2.12 GB |
Sizes measured from the HuggingFace API file tree for onnx-community/bge-reranker-v2-m3-ONNX, not estimated.
Use it with Transformers.js
import { pipeline } from "@huggingface/transformers";
const pipe = await pipeline("text-classification", "onnx-community/bge-reranker-v2-m3-ONNX", {
device: "webgpu", // usually falls back to "wasm"; wrap in try/catch for production
dtype: "q4f16", // use "uint8" for the WASM build
});
const result = await pipe(/* your input */);
Requires npm install @huggingface/transformers (or the CDN build).
Sources
FAQ
WebGPU or WASM for BGE Reranker v2 M3, in practice?
Chrome, Edge, and Safari 26+ run the WebGPU build (q4f16) on the GPU. Firefox has WebGPU on Windows and Apple Silicon Macs but not everywhere yet. Any browser without a WebGPU adapter falls back automatically to the WebAssembly build (uint8) on CPU: same model, slower to load, slower to run.
What does q4f16 mean for BGE Reranker v2 M3?
The WebGPU build here uses q4f16: 4-bit weights with some layers kept at 16-bit for stability: WebGPU's usual smallest clean build. The WASM fallback uses uint8: 8-bit integers: about a quarter the size of fp32, with a smaller quality trade than 4-bit.
Sizes measured 2026-08-01 from the HuggingFace API. Last validated 2026-08-03. See all browser models or the methodology.