Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
library_name: transformers
|
| 5 |
+
base_model: microsoft/MiniLM-L12-H384-uncased
|
| 6 |
+
model_name: cross-encoder-MiniLM-L12-DistillRankNET
|
| 7 |
+
source: https://github.com/xpmir/cross-encoders
|
| 8 |
+
paper: http://arxiv.org/abs/2603.03010
|
| 9 |
+
tags:
|
| 10 |
+
- cross-encoder
|
| 11 |
+
- sequence-classification
|
| 12 |
+
- tensorboard
|
| 13 |
+
datasets:
|
| 14 |
+
- msmarco
|
| 15 |
+
pipeline_tag: text-classification
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# cross-encoder-MiniLM-L12-DistillRankNET
|
| 19 |
+
|
| 20 |
+
[](http://arxiv.org/abs/2603.03010)
|
| 21 |
+
[](https://huggingface.co/collections/xpmir/reproducing-cross-encoders)
|
| 22 |
+
[](https://github.com/xpmir/cross-encoders)
|
| 23 |
+
|
| 24 |
+
This model is a cross-encoder based on `microsoft/MiniLM-L12-H384-uncased`. It was trained on Ms-Marco using loss `distillRankNET` as part of a reproducibility paper for training cross encoders: "**[Reproducing and Comparing Distillation Techniques for Cross-Encoders](http://arxiv.org/abs/2603.03010)**", see the paper for more details.
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
### Contents
|
| 28 |
+
- [Model Description](#model-description)
|
| 29 |
+
- [Usage](#usage)
|
| 30 |
+
- [Evals](#evaluations)
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
## Model Description
|
| 34 |
+
|
| 35 |
+
This model is intended for **re-ranking** the top results returned by a retrieval system (like BM25, Bi-Encoders or SPLADE).
|
| 36 |
+
|
| 37 |
+
- **Training Data:** MS MARCO Passage
|
| 38 |
+
- **Language:** English
|
| 39 |
+
- **Loss** distillRankNET
|
| 40 |
+
|
| 41 |
+
Training can be easily reproduced using the assiciated repository.
|
| 42 |
+
The exact training configuration used for this model is also detailed in [config.yaml](./config.yaml).
|
| 43 |
+
|
| 44 |
+
## Usage
|
| 45 |
+
|
| 46 |
+
Quick Start:
|
| 47 |
+
```python
|
| 48 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 49 |
+
import torch
|
| 50 |
+
|
| 51 |
+
tokenizer = AutoTokenizer.from_pretrained("microsoft/MiniLM-L12-H384-uncased")
|
| 52 |
+
model = AutoModelForSequenceClassification.from_pretrained("xpmir/cross-encoder-MiniLM-L12-DistillRankNET")
|
| 53 |
+
|
| 54 |
+
features = tokenizer("What is experimaestro ?", "Experimaestro is a powerful framework for ML experiments management...", padding=True, truncation=True, return_tensors="pt")
|
| 55 |
+
|
| 56 |
+
model.eval()
|
| 57 |
+
with torch.no_grad():
|
| 58 |
+
scores = model(**features).logits
|
| 59 |
+
print(scores)
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
## Evaluations
|
| 63 |
+
|
| 64 |
+
We provide evaluations of this cross-encoder re-ranking the top `1000` documents retrieved by `naver/splade-v3-distilbert`.
|
| 65 |
+
|
| 66 |
+
| dataset | RR@10 | nDCG@10 |
|
| 67 |
+
|:-------------------|:----------|:----------|
|
| 68 |
+
| msmarco_dev | 37.40 | 43.98 |
|
| 69 |
+
| trec2019 | 96.12 | 74.57 |
|
| 70 |
+
| trec2020 | 93.83 | 73.48 |
|
| 71 |
+
| fever | 81.21 | 80.95 |
|
| 72 |
+
| arguana | 18.48 | 27.97 |
|
| 73 |
+
| climate_fever | 27.52 | 20.31 |
|
| 74 |
+
| dbpedia | 75.81 | 46.06 |
|
| 75 |
+
| fiqa | 43.71 | 36.25 |
|
| 76 |
+
| hotpotqa | 85.35 | 66.48 |
|
| 77 |
+
| nfcorpus | 57.75 | 34.59 |
|
| 78 |
+
| nq | 53.19 | 58.21 |
|
| 79 |
+
| quora | 76.34 | 78.62 |
|
| 80 |
+
| scidocs | 28.06 | 15.79 |
|
| 81 |
+
| scifact | 66.12 | 69.34 |
|
| 82 |
+
| touche | 64.33 | 34.46 |
|
| 83 |
+
| trec_covid | 87.17 | 70.74 |
|
| 84 |
+
| robust04 | 75.25 | 52.28 |
|
| 85 |
+
| lotte_writing | 66.66 | 58.11 |
|
| 86 |
+
| lotte_recreation | 60.60 | 55.12 |
|
| 87 |
+
| lotte_science | 46.01 | 38.34 |
|
| 88 |
+
| lotte_technology | 53.36 | 44.41 |
|
| 89 |
+
| lotte_lifestyle | 71.62 | 61.69 |
|
| 90 |
+
| **Mean In Domain** | **75.78** | **64.01** |
|
| 91 |
+
| **BEIR 13** | **58.85** | **49.21** |
|
| 92 |
+
| **LoTTE (OOD)** | **62.25** | **51.66** |
|