Downloads · 30 days
69
19% of all-time downloads
exoldoff/bge-reranker-v2-m3-cross-encoder-marketplaces-rus
bge-reranker-v2-m3-cross-encoder-marketplaces-rus is a text ranking model from exoldoff. Use it for the text ranking task on the model card, and read the license before you ship it in a product. It is set up for sentence-transformers.
Fine-tuned cross-encoder reranker for Russian marketplace SKU deduplication.
Downloads · 30 days
69
19% of all-time downloads
All-time downloads
355
Public
Parameters
568M
2.3 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2.3 GB · 99%
From the Hugging Face model README
Fine-tuned cross-encoder reranker for Russian marketplace SKU deduplication.
The model is based on BAAI/bge-reranker-v2-m3 and was fine-tuned to score whether two marketplace product records describe the same base SKU.
It is intended for pairwise product matching / entity resolution pipelines where candidate pairs are generated first, then this model reranks or classifies those pairs.
This model is intentionally narrow. It was built for Russian marketplace catalog data, not for general semantic ranking or universal product matching.
Use outside these marketplaces or categories should be treated as experimental and must be recalibrated on target data before production use.
Given two structured product texts from the supported Russian marketplace categories, the model returns a score where a higher value means the pair is more likely to be the same base product.
The training target treats pack-count variants as positive when the underlying product is the same. For example, 1 x 500 ml and 2 x 500 ml may still be considered the same base SKU. Final pack-level grouping should be handled downstream with deterministic pack rules.
Typical pipeline:
CrossEncoderBAAI/bge-reranker-v2-m3exoldoff/bge-reranker-v2-m3-cross-encoder-marketplaces-rusBinaryCrossEntropyLossThe model was trained on a frozen multi-category Russian marketplace SKU deduplication dataset.
Training scope:
Rows used by the training run:
| split | rows | negative | positive |
|---|---|---|---|
| train | 1404 | 859 | 545 |
| dev | 167 | 50 | 117 |
| test | 165 | 48 | 117 |
Input columns were converted into structured pair texts such as:
brand: ... | title: ... | subcategory: ... | marketplace: ... | unit_weight_kg: ... | total_weight_kg: ... | pack_count: ...
Labels:
1: same base product / exact duplicate for the ML layer0: different productMetrics below are from the training manifest at the default 0.5 prediction threshold. In production or research comparison, select the operating threshold on a dev split according to the business cost of errors.
| split | accuracy | precision | recall | F1 | FP | FN |
|---|---|---|---|---|---|---|
| dev | 0.8982 | 0.9808 | 0.8718 | 0.9231 | 2 | 15 |
| test | 0.9212 | 0.9727 | 0.9145 | 0.9427 | 3 | 10 |
For SKU deduplication, false merges are usually more expensive than missed duplicates. Prefer cost-sensitive threshold calibration over blindly using 0.5.
The table below compares the selected BGE fine-tuned reranker with the main fine-tuned and zero-shot alternatives on the frozen SKU deduplication test split. The report uses thresholds selected on the dev split with the threshold_weighted_cost strategy.
Higher precision, recall, and F1 are better. Lower false merges and weighted cost are better. Weighted cost weights pair errors by available sales volume.
| model | type | precision | recall | F1 | false merges | false splits | weighted cost | note |
|---|---|---|---|---|---|---|---|---|
| BGE reranker FT | fine-tune | 1.000 | 0.795 | 0.886 | 0 | 24 | 131.3 | winner |
| mMARCO FT | fine-tune | 0.988 | 0.726 | 0.837 | 1 | 32 | 207.4 | strong FT |
| Qwen 0.6B FT | fine-tune | 0.963 | 0.667 | 0.788 | 3 | 39 | 310.8 | worse than BGE |
| Qwen 4B ZS | zero-shot | 0.879 | 0.492 | 0.630 | 4 | 30 | 188.4 | strong ZS |
| BGE reranker ZS | zero-shot | 0.927 | 0.436 | 0.593 | 4 | 66 | 477.8 | control |
| Qwen 0.6B ZS | zero-shot | 0.893 | 0.214 | 0.345 | 3 | 92 | 561.6 | low recall |
| mMARCO ZS | zero-shot | 0.878 | 0.308 | 0.456 | 5 | 81 | 598.8 | low recall |
| RuBERT tiny2 FT | fine-tune | 1.000 | 0.034 | 0.066 | 0 | 113 | 585.2 | did not converge |
Compared with the zero-shot BGE reranker baseline on the main test split:
Freeze: 2465 binary pairs from the multi-category labeling set; training-ready split 1404 / 167 / 165.
Install:
pip install -U sentence-transformers
Run pair scoring:
from sentence_transformers import CrossEncoder
model = CrossEncoder("exoldoff/bge-reranker-v2-m3-cross-encoder-marketplaces-rus")
pairs = [
(
"brand: heinz | title: соус томатный heinz 500 г | category: Соус | marketplace: Ozon | unit_weight_kg: 0.5 | total_weight_kg: 0.5 | pack_count: 1",
"brand: heinz | title: томатный соус heinz 500г | category: Соусы | marketplace: Яндекс.Маркет | unit_weight_kg: 0.5 | total_weight_kg: 0.5 | pack_count: 1",
),
(
"brand: example | title: мыло жидкое алоэ 500 мл | category: Мыло | marketplace: WB | unit_weight_kg: 0.5 | total_weight_kg: 0.5 | pack_count: 1",
"brand: example | title: мыло туалетное детское 90 г | category: Мыло | marketplace: Ozon | unit_weight_kg: 0.09 | total_weight_kg: 0.09 | pack_count: 1",
),
]
scores = model.predict(pairs)
print(scores)
For explicit sigmoid output in newer Sentence Transformers versions:
import torch
from sentence_transformers import CrossEncoder
model = CrossEncoder("exoldoff/bge-reranker-v2-m3-cross-encoder-marketplaces-rus")
scores = model.predict(pairs, activation_fn=torch.nn.Sigmoid())
Selected hyperparameters:
| parameter | value |
|---|---|
| epochs | 3 |
| learning rate | 2e-5 |
| train batch size | 8 |
| eval batch size | 16 |
| gradient accumulation | 4 |
| warmup ratio | 0.1 |
| weight decay | 0.01 |
| pos weight | 1.5761 |
| seed | 42 |
Runtime package versions from the manifest:
| package | version |
|---|---|
| sentence-transformers | 5.6.0 |
| transformers | 5.12.1 |
| datasets | 5.0.0 |
| accelerate | 1.14.0 |
| torch | 2.7.1+cu128 |
BAAI/bge-reranker-v2-m3exoldoff/bge-reranker-v2-m3-cross-encoder-marketplaces-rus