Instructions to use webis/set-encoder-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Lightning IR
How to use webis/set-encoder-base with Lightning IR:
#install from https://github.com/webis-de/lightning-ir from lightning_ir import CrossEncoderModule model = CrossEncoderModule("webis/set-encoder-base") model.score("query", ["doc1", "doc2", "doc3"]) - Notebooks
- Google Colab
- Kaggle
|
Download README.md from webis/set-encoder-base: direct link, hf CLI and curl.
- Browser
- Download file 1.58 kB
-
https://huggingface.co/webis/set-encoder-base/resolve/0cecf3a53d2a2845b0dff567f04b2d80ce8a2b21/README.md
- Command line
-
hf download hf://webis/set-encoder-base@0cecf3a53d2a2845b0dff567f04b2d80ce8a2b21/README.md
-
curl -L -o README.md https://huggingface.co/webis/set-encoder-base/resolve/0cecf3a53d2a2845b0dff567f04b2d80ce8a2b21/README.md
1.58 kB
metadata
license: apache-2.0
pipeline_tag: text-ranking
library_name: lightning-ir
base_model:
- google/electra-base-discriminator
Set-Encoder
This repository contains the code for the paper: Set-Encoder: Permutation-Invariant Inter-Passage Attention for Listwise Passage Re-Ranking with Cross-Encoders.
We use lightning-ir to train and fine-tune models. Download and install the library to use the code in this repository.
Model Zoo
We provide the following pre-trained models:
| Model Name | TREC DL 19 (BM25) | TREC DL 20 (BM25) | TREC DL 19 (ColBERTv2) | TREC DL 20 (ColBERTv2) |
|---|---|---|---|---|
| set-encoder-base | 0.724 | 0.710 | 0.788 | 0.777 |
| set-encoder-large | 0.727 | 0.735 | 0.789 | 0.790 |
Inference
We recommend using the lightning-ir cli to run inference. The following command can be used to run inference using the set-encoder-base model on the TREC DL 19 and TREC DL 20 datasets:
lightning-ir re_rank --config configs/re-rank.yaml --config configs/set-encoder-finetuned.yaml --config configs/trec-dl.yaml
Fine-Tuning
WIP