--- language: en license: apache-2.0 library_name: transformers base_model: bert-base-uncased model_name: cross-encoder-bert-base-infoNCE source: https://github.com/xpmir/cross-encoders paper: http://arxiv.org/abs/2603.03010 tags: - cross-encoder - sequence-classification - tensorboard datasets: - msmarco pipeline_tag: text-classification --- # cross-encoder-bert-base-infoNCE [![Paper](https://img.shields.io/badge/Paper-Arxiv-red)](http://arxiv.org/abs/2603.03010) [![All Models](https://img.shields.io/badge/🤗%20Hugging%20Face%20Models-blue)](https://huggingface.co/collections/xpmir/reproducing-cross-encoders) [![GitHub](https://img.shields.io/badge/GitHub-Code-blue)](https://github.com/xpmir/cross-encoders) 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. ### Contents - [Model Description](#model-description) - [Usage](#usage) - [Evals](#evaluations) ## Model Description This model is intended for **re-ranking** the top results returned by a retrieval system (like BM25, Bi-Encoders or SPLADE). - **Training Data:** MS MARCO Passage - **Language:** English - **Loss** infoNCE Training can be easily reproduced using the assiciated repository. The exact training configuration used for this model is also detailed in [config.yaml](./config.yaml). ## Usage Quick Start: ```python from transformers import AutoTokenizer, AutoModelForSequenceClassification import torch tokenizer = AutoTokenizer.from_pretrained("xpmir/cross-encoder-bert-base-infoNCE") model = AutoModelForSequenceClassification.from_pretrained("xpmir/cross-encoder-bert-base-infoNCE") 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) ``` ## Evaluations 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.13 | 46.68 | | trec2019 | 98.26 | 75.65 | | trec2020 | 93.36 | 73.30 | | fever | 81.43 | 81.33 | | arguana | 23.01 | 34.22 | | climate_fever | 31.31 | 23.24 | | dbpedia | 78.14 | 45.69 | | fiqa | 42.83 | 35.87 | | hotpotqa | 89.63 | 73.49 | | nfcorpus | 55.04 | 34.24 | | nq | 54.25 | 59.13 | | quora | 78.34 | 80.38 | | scidocs | 26.07 | 15.06 | | scifact | 69.26 | 71.47 | | touche | 61.20 | 33.31 | | trec_covid | 90.57 | 67.53 | | robust04 | 71.40 | 48.48 | | lotte_writing | 68.55 | 58.87 | | lotte_recreation | 59.75 | 54.52 | | lotte_science | 43.67 | 36.39 | | lotte_technology | 51.72 | 42.85 | | lotte_lifestyle | 71.37 | 61.89 | | **Mean In Domain** | **77.25** | **65.21** | | **BEIR 13** | **60.08** | **50.38** | | **LoTTE (OOD)** | **61.08** | **50.50** |