Skip to content

Commit 2015aed

Browse files
authored
Update README.md
1 parent a5e455f commit 2015aed

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

README.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ export REPO_DIR=<path to the llm-reranker directory
2626
```
2727

2828
## 1. Retrieval
29-
We use [contriever]() as the underlying retrieval model. The precomputed query and passage embeddings for BEIR are available [here](https://huggingface.co/datasets/rryisthebest/Contreiever_BEIR_Embeddings/tree/main)
29+
We use [contriever](https://github.com/facebookresearch/contriever) as the underlying retrieval model. The precomputed query and passage embeddings for BEIR are available [here](https://huggingface.co/datasets/rryisthebest/Contreiever_BEIR_Embeddings).
3030

31-
**Note:** If you wish to not run the retrieval yourself, the retrieval results are provided [here](https://drive.google.com/drive/folders/1eMiqwiTVwJy_Zcss7LQF9hQ1aeTFMZUm?usp=sharing) and you can directly jump to
31+
**Note:** If you wish to not run the retrieval yourself, the retrieval results are provided [here](https://drive.google.com/drive/folders/1eMiqwiTVwJy_Zcss7LQF9hQ1aeTFMZUm?usp=sharing) and you can directly jump to [Reranking](#2-reranking)
3232

3333

3434
To run the contriever retrieval using the precomputed encodings
@@ -42,40 +42,39 @@ To get the retrieval scores, run:
4242
bash bash/beir/run_eval.sh rank
4343
```
4444

45-
46-
4745
## 2. Reranking
4846
### 2a. Baseline Cross-encoder reranking
49-
Cross-encoder rerankig config is at `{REPO_DIR}/bash/beir/run_rerank_CE.sh`
47+
5048
To run the baseline cross encoder re-ranking, run:
5149
```
5250
bash bash/beir/run_rerank.sh
5351
```
54-
### 2b. LLM Reranking
55-
LLM results preparation config is at `{REPO_DIR}/bash/beir/run_convert_results.sh`
56-
To prepare retrieval results for LLM reranking, run:
52+
### 2b. FIRST LLM Reranking
53+
54+
To convert the retrieval results to input for LLM reranking, run:
5755

5856
```
5957
bash bash/beir/run_convert_results.sh
6058
```
6159

62-
LLM rerankig config is at `{REPO_DIR}/bash/beir/run_rerank_llm.sh`
63-
To run the LLM reranking, run:
60+
We provide the trained FIRST reranker [here](https://huggingface.co/rryisthebest/First_Model).
61+
62+
To run the FIRST reranking, run:
6463

6564
```
6665
bash bash/beir/run_rerank_llm.sh
6766
```
6867

69-
Evaluation config is at `{REPO_DIR}/bash/beir/run_eval.sh`
70-
To verify that ranking performance has improved from reranking, run:
68+
To evaluate the reranking performance, run:
69+
7170
```
7271
bash bash/run_eval.sh rerank
7372
74-
Set flag --suffix to "llm_FIRST_alpha" for FIRST LLM evaluation or "ce" for cross encoder reranker
7573
```
76-
74+
**Note:** Set flag --suffix to "llm_FIRST_alpha" for FIRST reranker evaluation or "ce" for cross encoder reranker
7775

7876
## 3. Model Training
77+
We also provide the data and scripts to train the LLM reranker by yourself if you wish to do so.
7978
### 3a. Training Dataset
8079
Converted training dataset (alphabetic IDs) is on [HF](https://huggingface.co/datasets/rryisthebest/rank_zephyr_training_data_alpha). The standard numeric training dataset can be found [here](https://huggingface.co/datasets/castorini/rank_zephyr_training_data).
8180

@@ -87,14 +86,12 @@ We support three training objectives:
8786
- **Combined**: The Combined objective, which we introduce in our paper, is a novel weighted approach that seamlessly integrates both ranking and generation principles, and is the setting applied to the FIRST model.
8887

8988

90-
Training and accelerate configs are at `{REPO_DIR}/bash/run_train.sh` and `{REPO_DIR}/train_configs/accel_config.yaml`, respectively.
91-
9289
To train the model, run:
9390
```
9491
bash bash/beir/run_train.sh
9592
```
9693

97-
To train gated model, login to Huggingface and get token access at huggingface.co/settings/tokens.
94+
To train a gated model, login to Huggingface and get token access at huggingface.co/settings/tokens.
9895
```
9996
huggingface-cli login
10097
```

0 commit comments

Comments
 (0)