Views
No views yet
BAAI/bge-reranker-v2-m3,
packaged for Hugging Face Text Embeddings Inference (TEI).| Setting | Value |
|---|---|
| Tool | 🤗 Optimum (optimum-cli onnxruntime quantize --avx2) |
| Type | Dynamic, IntegerOps / QOperator |
| Weights | QUInt8, symmetric |
| Activations | QUInt8, asymmetric |
per_channel | false |
reduce_range | true |
| Operators | MatMul, Attention, Gather, Transpose, EmbedLayerNormalization, … |
model.onnx size | ~0.55 GB (weights embedded, no .onnx_data file) |
Accuracy note:reduce_range=Trueis enabled. It keeps INT8 weights on 7 bits to avoid u8×s8 saturation (theVPMADDUBSWinstruction) on AVX2 CPUs without VNNI, as recommended by ONNX Runtime. This trades a negligible amount of headroom for stable accuracy on non-VNNI hardware; on VNNI-capable CPUs it makes no difference.
1docker run --rm -p 8080:80 \
2 ghcr.io/huggingface/text-embeddings-inference:cpu-1.9 \
3 --model-id kftof/bge-reranker-v2-m3-onnx-int8-avx2/rerank endpoint:1curl http://127.0.0.1:8080/rerank \
2 -H 'Content-Type: application/json' \
3 -d '{
4 "query": "What is the capital of France?",
5 "texts": ["Paris is the capital of France.",
6 "Chocolate cake recipe"]
7 }'1pip install "optimum[exporters,onnxruntime]"
2optimum-cli export onnx --model BAAI/bge-reranker-v2-m3 \
3 --task text-classification onnx-fp32
4optimum-cli onnxruntime quantize --avx2 --onnx_model onnx-fp32 -o onnx-int8
5# then rename onnx-int8/model_quantized.onnx -> model.onnx for TEIBAAI/bge-reranker-v2-m3: Apache-2.0.
No re-licensing.