VictorMorand commited on
Commit
407a3e0
·
verified ·
1 Parent(s): 7702ca0

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +92 -0
README.md ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: apache-2.0
4
+ library_name: transformers
5
+ base_model: bert-base-uncased
6
+ model_name: cross-encoder-bert-base-infoNCE
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-bert-base-infoNCE
19
+
20
+ [![Paper](https://img.shields.io/badge/Paper-Arxiv-red)](http://arxiv.org/abs/2603.03010)
21
+ [![All Models](https://img.shields.io/badge/🤗%20Hugging%20Face%20Models-blue)](https://huggingface.co/collections/xpmir/reproducing-cross-encoders)
22
+ [![GitHub](https://img.shields.io/badge/GitHub-Code-blue)](https://github.com/xpmir/cross-encoders)
23
+
24
+ This model is a cross-encoder based on `bert-base-uncased`. It was trained on Ms-Marco using loss `infoNCE` 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** infoNCE
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("bert-base-uncased")
52
+ model = AutoModelForSequenceClassification.from_pretrained("xpmir/cross-encoder-bert-base-infoNCE")
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 | 40.13 | 46.68 |
69
+ | trec2019 | 98.26 | 75.65 |
70
+ | trec2020 | 93.36 | 73.30 |
71
+ | fever | 81.43 | 81.33 |
72
+ | arguana | 23.01 | 34.22 |
73
+ | climate_fever | 31.31 | 23.24 |
74
+ | dbpedia | 78.14 | 45.69 |
75
+ | fiqa | 42.83 | 35.87 |
76
+ | hotpotqa | 89.63 | 73.49 |
77
+ | nfcorpus | 55.04 | 34.24 |
78
+ | nq | 54.25 | 59.13 |
79
+ | quora | 78.34 | 80.38 |
80
+ | scidocs | 26.07 | 15.06 |
81
+ | scifact | 69.26 | 71.47 |
82
+ | touche | 61.20 | 33.31 |
83
+ | trec_covid | 90.57 | 67.53 |
84
+ | robust04 | 71.40 | 48.48 |
85
+ | lotte_writing | 68.55 | 58.87 |
86
+ | lotte_recreation | 59.75 | 54.52 |
87
+ | lotte_science | 43.67 | 36.39 |
88
+ | lotte_technology | 51.72 | 42.85 |
89
+ | lotte_lifestyle | 71.37 | 61.89 |
90
+ | **Mean In Domain** | **77.25** | **65.21** |
91
+ | **BEIR 13** | **60.08** | **50.38** |
92
+ | **LoTTE (OOD)** | **61.08** | **50.50** |