yashsaxena21 commited on
Commit
4ae6a27
·
verified ·
1 Parent(s): 9d6d40c

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +28 -2
README.md CHANGED
@@ -16,7 +16,7 @@ Adapter-only IMRNN checkpoints for the paper **IMRNNs: An Efficient Method for I
16
  Paper:
17
  - arXiv: https://arxiv.org/abs/2601.20084
18
 
19
- IMRNNs is trained on top of a base dense retriever such as MiniLM or E5. The checkpoint projects the original embedding space into a shared 256-dimensional adapter space, applies bidirectional modulation, and reranks the top candidates.
20
 
21
  This model repo is the public checkpoint release for the `imrnns` Python package. It includes:
22
  - adapter-only checkpoints
@@ -30,7 +30,33 @@ pip install -r requirements.txt
30
  pip install -e .
31
  ```
32
 
33
- ## End-to-End Python Demo
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  ```python
36
  from pathlib import Path
 
16
  Paper:
17
  - arXiv: https://arxiv.org/abs/2601.20084
18
 
19
+ IMRNNs is trained on top of a base dense retriever such as MiniLM or E5. The checkpoint projects the original embedding space into a shared 256-dimensional adapter space, applies bidirectional modulation, and adapts retrieval scores over the top candidate set.
20
 
21
  This model repo is the public checkpoint release for the `imrnns` Python package. It includes:
22
  - adapter-only checkpoints
 
30
  pip install -e .
31
  ```
32
 
33
+ ## Quick Adapter Demo
34
+
35
+ ```python
36
+ from imrnns import IMRNNAdapter
37
+
38
+ adapter = IMRNNAdapter.from_pretrained(
39
+ encoder="minilm",
40
+ dataset="trec-covid",
41
+ repo_id="yashsaxena21/IMRNNs",
42
+ device="cpu",
43
+ )
44
+
45
+ results = adapter.score(
46
+ query="What is the incubation period of COVID-19?",
47
+ documents=[
48
+ "COVID-19 symptoms can appear 2 to 14 days after exposure.",
49
+ "The stock market closed higher today.",
50
+ "Transmission risk depends on exposure setting and viral load.",
51
+ ],
52
+ top_k=3,
53
+ )
54
+
55
+ for item in results:
56
+ print(item.rank, item.score, item.text)
57
+ ```
58
+
59
+ ## End-to-End Evaluation Demo
60
 
61
  ```python
62
  from pathlib import Path