reproducing-cross-encoders
Collection
A set of cross-encoders trained from various backbones and losses for equal comparison • 55 items • Updated
• 3
This model is a cross-encoder based on microsoft/MiniLM-L12-H384-uncased. It was trained on Ms-Marco using loss marginMSE as part of a reproducibility paper for training cross encoders: "Reproducing and Comparing Distillation Techniques for Cross-Encoders", see the paper for more details.
This model is intended for re-ranking the top results returned by a retrieval system (like BM25, Bi-Encoders or SPLADE).
Training can be easily reproduced using the assiciated repository. The exact training configuration used for this model is also detailed in config.yaml.
Quick Start:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("microsoft/MiniLM-L12-H384-uncased")
model = AutoModelForSequenceClassification.from_pretrained("xpmir/cross-encoder-MiniLM-L12-MarginMSE")
features = tokenizer("What is experimaestro ?", "Experimaestro is a powerful framework for ML experiments management...", padding=True, truncation=True, return_tensors="pt")
model.eval()
with torch.no_grad():
scores = model(**features).logits
print(scores)
We provide evaluations of this cross-encoder re-ranking the top 1000 documents retrieved by naver/splade-v3-distilbert.
| dataset | RR@10 | nDCG@10 |
|---|---|---|
| msmarco_dev | 40.11 | 46.54 |
| trec2019 | 96.12 | 73.32 |
| trec2020 | 94.68 | 72.91 |
| fever | 82.18 | 81.88 |
| arguana | 24.15 | 35.67 |
| climate_fever | 34.63 | 25.59 |
| dbpedia | 76.96 | 46.80 |
| fiqa | 45.41 | 37.74 |
| hotpotqa | 88.85 | 73.22 |
| nfcorpus | 56.46 | 34.14 |
| nq | 53.82 | 58.82 |
| quora | 75.61 | 78.34 |
| scidocs | 28.54 | 16.00 |
| scifact | 67.32 | 69.70 |
| touche | 64.56 | 33.73 |
| trec_covid | 91.95 | 67.53 |
| robust04 | 74.56 | 50.40 |
| lotte_writing | 67.52 | 58.82 |
| lotte_recreation | 62.36 | 56.60 |
| lotte_science | 46.95 | 38.79 |
| lotte_technology | 53.93 | 45.52 |
| lotte_lifestyle | 72.17 | 62.83 |
| Mean In Domain | 76.97 | 64.26 |
| BEIR 13 | 60.80 | 50.70 |
| LoTTE (OOD) | 62.91 | 52.16 |
Base model
microsoft/MiniLM-L12-H384-uncased