BGE-Reranker-v2-M3 (E-Commerce Finetuned V3 - Self Training)
This model is a highly advanced fine-tuned version of BAAI/bge-reranker-v2-m3 specifically optimized for E-Commerce Product Search and Relevance. It has been trained using a sophisticated Curriculum Learning pipeline with highly curated hard negatives, followed by an aggressive Self-Training (Pseudo-Labeling) phase on ~197K highly confident samples.
🚀 Model Details
- Base Model:
BAAI/bge-reranker-v2-m3 - Architecture: Cross-Encoder (Sentence Transformers)
- Task: Text Classification / Ranking
- Language: Multilingual (Optimized for Turkish/English E-commerce items)
- Training Strategy: Curriculum Learning (Easy -> Hard -> Mastery)
- Loss Function:
BCEWithLogitsLoss(Knowledge Distillation via Soft-labeling)
📊 Training Pipeline
The model was trained on a meticulously constructed pipeline:
- Phase 1-3: Curriculum Learning (Easy -> Hard -> Mastery) on 123K queries.
- Phase 4: Self-Training (Pseudo-labeling) on ~197K new unlabeled items utilizing the V2 model to achieve massive scaling.
📈 Evaluation Metrics (Ensemble: BGE-V3 + Jina-V3)
Tested on a held-out benchmark dataset of 10,000 human-annotated and hard-mined query-product pairs. These metrics reflect the model when used in an Ensemble mechanism with weights (0.7 BGE + 0.3 Jina):
| Metric | Score |
|---|---|
| MRR (Mean Reciprocal Rank) | 0.9625 |
| P@1 (Precision at 1) | 0.9260 |
| AUC-ROC | 0.9621 |
| F1 Score | 0.9172 |
Note: The V3 Self-Training Phase perfectly fixed the calibration issues of V2, rocketing the F1 score from 0.82 to 0.9172 while maintaining elite Structural Ranking Success.
💻 Usage
You can use this model easily with the sentence-transformers library:
pip install -U sentence-transformers
from sentence_transformers import CrossEncoder
# Load the model
model = CrossEncoder("regtoy/bge-reranker-v2-m3-finetuned-v3", trust_remote_code=True)
query = "erkek siyah koşu ayakkabısı"
documents = [
"Title: Erkek Siyah Koşu Ayakkabısı | Brand: Nike | Category: Spor Ayakkabı", # Doğru Eşleşme
"Title: Kadın Kırmızı Yürüyüş Ayakkabısı | Brand: Adidas | Category: Spor Ayakkabı", # Yanlış Eşleşme
"Title: Erkek Siyah Deri Ceket | Brand: Koton | Category: Ceket" # Lexical Hard Negative
]
# Create pairs
pairs = [[query, doc] for doc in documents]
# Predict relevance scores
scores = model.predict(pairs)
# Rank documents
ranked_results = sorted(zip(documents, scores), key=lambda x: x[1], reverse=True)
for doc, score in ranked_results:
print(f"Score: {score:.4f} | Document: {doc}")
🛠️ Input Format (Structured Input)
For maximum performance, format your product data exactly as it was formatted during training by joining attributes with |:
Title: [title] | Brand: [brand] | Category: [category] | Gender: [gender] | Attributes: [attributes]