Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: pytorch
|
| 3 |
+
tags:
|
| 4 |
+
- dense-retrieval
|
| 5 |
+
- information-retrieval
|
| 6 |
+
- reranking
|
| 7 |
+
- beir
|
| 8 |
+
- pytorch
|
| 9 |
+
pipeline_tag: sentence-similarity
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# IMRNNs
|
| 13 |
+
|
| 14 |
+
IMRNNs is a lightweight adapter architecture for dense retrieval that modulates query and document embeddings before ranking. This release packages pretrained checkpoints for MiniLM and E5 backbones across multiple BEIR datasets, together with minimal evaluation code for public use.
|
| 15 |
+
|
| 16 |
+
Repository:
|
| 17 |
+
|
| 18 |
+
- GitHub implementation: `YashSaxena21/IMRNNs`
|
| 19 |
+
|
| 20 |
+
## Included Checkpoints
|
| 21 |
+
|
| 22 |
+
### MiniLM
|
| 23 |
+
|
| 24 |
+
- `checkpoints/pretrained/minilm/imrnns-minilm-msmarco.pt`
|
| 25 |
+
- `checkpoints/pretrained/minilm/imrnns-minilm-fiqa.pt`
|
| 26 |
+
- `checkpoints/pretrained/minilm/imrnns-minilm-hotpotqa.pt`
|
| 27 |
+
- `checkpoints/pretrained/minilm/imrnns-minilm-nq.pt`
|
| 28 |
+
- `checkpoints/pretrained/minilm/imrnns-minilm-scifact.pt`
|
| 29 |
+
- `checkpoints/pretrained/minilm/imrnns-minilm-trec-covid.pt`
|
| 30 |
+
- `checkpoints/pretrained/minilm/imrnns-minilm-webis-touche2020.pt`
|
| 31 |
+
|
| 32 |
+
### E5
|
| 33 |
+
|
| 34 |
+
- `checkpoints/pretrained/e5/imrnns-e5-msmarco.pt`
|
| 35 |
+
- `checkpoints/pretrained/e5/imrnns-e5-fiqa.pt`
|
| 36 |
+
- `checkpoints/pretrained/e5/imrnns-e5-hotpotqa.pt`
|
| 37 |
+
- `checkpoints/pretrained/e5/imrnns-e5-nq.pt`
|
| 38 |
+
- `checkpoints/pretrained/e5/imrnns-e5-scifact.pt`
|
| 39 |
+
- `checkpoints/pretrained/e5/imrnns-e5-webis-touche2020.pt`
|
| 40 |
+
|
| 41 |
+
## What This Release Contains
|
| 42 |
+
|
| 43 |
+
- pretrained IMRNN checkpoints
|
| 44 |
+
- a minimal evaluator script
|
| 45 |
+
- installation requirements for checkpoint loading and evaluation
|
| 46 |
+
|
| 47 |
+
## Quick Start
|
| 48 |
+
|
| 49 |
+
Install dependencies:
|
| 50 |
+
|
| 51 |
+
```bash
|
| 52 |
+
pip install -r requirements.txt
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
Run minimal evaluation:
|
| 56 |
+
|
| 57 |
+
```bash
|
| 58 |
+
python scripts/minimal_eval.py \
|
| 59 |
+
--checkpoint checkpoints/pretrained/minilm/imrnns-minilm-trec-covid.pt \
|
| 60 |
+
--encoder minilm \
|
| 61 |
+
--dataset trec-covid \
|
| 62 |
+
--cache-dir /path/to/cache_mini_trec-covid \
|
| 63 |
+
--datasets-dir /path/to/datasets \
|
| 64 |
+
--device cpu \
|
| 65 |
+
--k 10
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
The evaluator reports:
|
| 69 |
+
|
| 70 |
+
- `MRR@10`
|
| 71 |
+
- `Recall@10`
|
| 72 |
+
- `NDCG@10`
|
| 73 |
+
|
| 74 |
+
## Checkpoint Format
|
| 75 |
+
|
| 76 |
+
The checkpoints are PyTorch state dictionaries compatible with the IMRNN implementation in the public GitHub repository. They are intended for use with the accompanying package code rather than the standard `transformers` `from_pretrained` API.
|
| 77 |
+
|
| 78 |
+
## Notes
|
| 79 |
+
|
| 80 |
+
- These checkpoints are dataset-specific.
|
| 81 |
+
- The public codebase also supports end-to-end caching, training, and evaluation over BEIR datasets.
|
| 82 |
+
- BEIR datasets and embedding caches are not bundled in this model page.
|