Text Ranking
sentence-transformers
Safetensors
Transformers
multilingual
t5gemma2
text2text-generation
reranker
encoder-decoder
FBNL
matryoshka
retrieval
RAG
Yuki131 commited on
Commit
17243bf
Β·
verified Β·
1 Parent(s): ebc1d7c

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +218 -0
README.md ADDED
@@ -0,0 +1,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - multilingual
4
+ base_model:
5
+ - google/t5gemma-2-1b-1b
6
+ pipeline_tag: text-ranking
7
+ datasets:
8
+ - KaLM-Embedding/KaLM-reranker-training-data
9
+ - KaLM-Embedding/KaLM-embedding-finetuning-data
10
+ - Shitao/bge-m3-data
11
+ tags:
12
+ - sentence-transformers
13
+ - transformers
14
+ - reranker
15
+ - encoder-decoder
16
+ - FBNL
17
+ - matryoshka
18
+ - multilingual
19
+ - retrieval
20
+ - RAG
21
+ license: apache-2.0
22
+ library_name: sentence-transformers
23
+ new_version: KaLM-Embedding/KaLM-Reranker-V1-Small
24
+ ---
25
+
26
+
27
+ <h1 align="center">KaLM-Reranker-V1: Fast but Not Late Interaction for Compressed Document Reranking</h1>
28
+
29
+ <p align="center">
30
+ <a href="https://huggingface.co/collections/KaLM-Embedding/lychee-kalm-reranker">
31
+ <img src="https://img.shields.io/badge/%F0%9F%A4%97_Collection-KaLM--Reranker-ffbd45.svg" alt="Hugging Face Collection">
32
+ </a>
33
+ <a href="https://arxiv.org/abs/2606.22807">
34
+ <img src="https://img.shields.io/badge/arXiv-2606.22807-b31b1b.svg" alt="Paper">
35
+ </a>
36
+ <a href="https://github.com/KaLM-Embedding">
37
+ <img src="https://img.shields.io/badge/GitHub-KaLM--Embedding-blue.svg?logo=github" alt="GitHub">
38
+ </a>
39
+ <a href="https://www.apache.org/licenses/LICENSE-2.0">
40
+ <img src="https://img.shields.io/badge/License-Apache--2.0-green.svg" alt="License">
41
+ </a>
42
+ </p>
43
+
44
+
45
+ ## What is KaLM-Reranker-V1-R2?
46
+
47
+ **KaLM-Reranker-V1-R2 is a substantially improved checkpoint release of KaLM-Reranker-V1.** It keeps the same fast-but-not-late-interaction (FBNL) architecture and inference interface as the original release, while introducing a stronger multi-stage training recipe for three practical goals:
48
+
49
+ 1. **Stronger compression robustness.** R2 supports Matryoshka embedding pooling (MEP) from **1x to 128x**, extending the maximum validated compression ratio from 32x to 128x. Even at 128x compression, all three model sizes retain at least 92% of their average nDCG@10 at 2x compression on both BEIR and MIRACL.
50
+ 2. **Adjustable test-time compute scaling.** A single KaLM-Reranker-V1-R2 checkpoint can trade compute for quality by changing the compression ratio. It can also use a coarse-to-fine cascade: cheaply screen all candidates with heavily compressed document representations, then spend more compute only on the most promising candidates.
51
+ 3. **Better multi-domain and multilingual ranking.** At the default 4x compression ratio, every R2 model improves on BEIR, while MIRACL average nDCG@10 increases by **+9.03**, **+7.17**, and **+4.85** points for Nano, Small, and Large, respectively.
52
+
53
+ ![kalm-reranker-v1-r2 architecture](./assets/framework.jpg)
54
+
55
+ | Capability | KaLM-Reranker-V1 | KaLM-Reranker-V1-R2 |
56
+ |:--|:--|:--|
57
+ | Validated MEP range | 1x-32x | **1x-128x** |
58
+ | Test-time compute | Flexible compression | **Flexible allocation of inference-time computation** |
59
+ | Training | Supervised checkpoints | **High-quality SFT -> soft-label distillation -> model soup** |
60
+ | Multi-domain ranking | Strong | **Improved on BEIR for all three sizes** |
61
+ | Multilingual ranking | Limited | **Substantially improved across MIRACL's 18 languages** |
62
+
63
+ ### KaLM-Reranker-V1-R2 vs. the original KaLM-Reranker-V1
64
+ All results below use the same default compression ratio, `r=4`. KaLM-Reranker-V1 results are taken from the previous model cards; KaLM-Reranker-V1-R2 results are from the updated paper.
65
+
66
+ #### BEIR β€” Multi-domain Reranking
67
+
68
+ | Model | KaLM-Reranker-V1 | KaLM-Reranker-V1-R2 | Delta |
69
+ |:--|--:|--:|--:|
70
+ | Nano | 57.41 | **58.54** | **+1.13** |
71
+ | Small | 60.01 | **61.07** | **+1.06** |
72
+ | Large | 62.87 | **63.53** | **+0.66** |
73
+
74
+ #### MIRACL β€” Multilingual Reranking
75
+
76
+ | Model | KaLM-Reranker-V1 | KaLM-Reranker-V1-R2 | Delta |
77
+ |:--|--:|--:|--:|
78
+ | Nano | 62.08 | **71.11** | **+9.03** |
79
+ | Small | 66.89 | **74.06** | **+7.17** |
80
+ | Large | 70.07 | **74.92** | **+4.85** |
81
+
82
+ #### BEIR β€” Compression Robustness
83
+
84
+ | Model | 2x | 4x | 8x | 16x | 32x | 64x | 128x |
85
+ |:--|--:|--:|--:|--:|--:|--:|--:|
86
+ | KaLM-Reranker-V1-Nano | 57.69 | 57.41 | 56.46 | 55.19 | 52.88 | β€” | β€” |
87
+ | **KaLM-Reranker-V1-Nano-R2** | **58.75** | **58.54** | **58.17** | **57.47** | **56.74** | **55.88** | **55.11** |
88
+ | **Delta** | **+1.06** | **+1.13** | **+1.71** | **+2.28** | **+3.86** | β€” | β€” |
89
+ | KaLM-Reranker-V1-Small | 60.32 | 60.01 | 59.38 | 58.18 | 55.98 | β€” | β€” |
90
+ | **KaLM-Reranker-V1-Small-R2** | **61.17** | **61.07** | **60.74** | **60.25** | **59.54** | **58.84** | **58.20** |
91
+ | **Delta** | **+0.85** | **+1.06** | **+1.36** | **+2.07** | **+3.56** | β€” | β€” |
92
+ | KaLM-Reranker-V1-Large | 63.14 | 62.87 | 62.46 | 61.74 | 60.33 | β€” | β€” |
93
+ | **KaLM-Reranker-V1-Large-R2** | **63.69** | **63.53** | **63.15** | **62.70** | **62.18** | **61.60** | **61.23** |
94
+ | **Delta** | **+0.55** | **+0.66** | **+0.69** | **+0.96** | **+1.85** | β€” | β€” |
95
+
96
+ #### MIRACL β€” Compression Robustness
97
+
98
+ | Model | 2x | 4x | 8x | 16x | 32x | 64x | 128x |
99
+ |:--|--:|--:|--:|--:|--:|--:|--:|
100
+ | KaLM-Reranker-V1-Nano | 63.07 | 62.08 | 60.05 | 57.01 | 52.21 | β€” | β€” |
101
+ | **KaLM-Reranker-V1-Nano-R2** | **71.63** | **71.11** | **70.38** | **69.38** | **68.02** | **66.85** | **66.01** |
102
+ | **Delta** | **+8.56** | **+9.03** | **+10.33** | **+12.37** | **+15.81** | β€” | β€” |
103
+ | KaLM-Reranker-V1-Small | 67.28 | 66.89 | 65.36 | 62.96 | 59.07 | β€” | β€” |
104
+ | **KaLM-Reranker-V1-Small-R2** | **74.34** | **74.06** | **73.61** | **72.60** | **71.81** | **70.82** | **70.16** |
105
+ | **Delta** | **+7.06** | **+7.17** | **+8.25** | **+9.64** | **+12.74** | β€” | β€” |
106
+ | KaLM-Reranker-V1-Large | 70.30 | 70.07 | 69.63 | 68.25 | 65.94 | β€” | β€” |
107
+ | **KaLM-Reranker-V1-Large-R2** | **75.12** | **74.92** | **74.50** | **73.85** | **73.26** | **72.46** | **71.97** |
108
+ | **Delta** | **+4.82** | **+4.85** | **+4.87** | **+5.60** | **+7.32** | β€” | β€” |
109
+
110
+ KaLM-Reranker-V1-R2 consistently outperforms KaLM-Reranker-V1 at every shared compression ratio. The gains increase as compression becomes more aggressive, demonstrating substantially improved compression robustness.
111
+
112
+
113
+
114
+ ### Model family
115
+
116
+ The reported sizes are **activated parameters**. Nano, Small, and Large are initialized from the T5Gemma2 270M-270M, 1B-1B, and 4B-4B encoder-decoder families, respectively.
117
+
118
+ | Models | Activated Params. | Non-Embedding Params. | Embedding Params. | #Layers (encoder + decoder) | Sequence Length | Document Token Dim. | MEP Support | Instruction Aware | Test-Time Compute |
119
+ | ------------------------------------------------------------------------------------------------- | -----------------: | --------------------: | ----------------: | --------------------------: | --------------: | ------------------: | ----------: | ----------------: | ----------------: |
120
+ | [KaLM-Reranker-V1-Nano-R2](https://huggingface.co/KaLM-Embedding/KaLM-Reranker-V1-Nano-R2) | 0.27B | 100M | 168M | 18+18 | 128K | 640 | 1x-128x | Yes | Yes |
121
+ | [KaLM-Reranker-V1-Small-R2](https://huggingface.co/KaLM-Embedding/KaLM-Reranker-V1-Small-R2) | 1B | 698M | 302M | 26+26 | 128K | 1152 | 1x-128x | Yes | Yes |
122
+ | [KaLM-Reranker-V1-Large-R2](https://huggingface.co/KaLM-Embedding/KaLM-Reranker-V1-Large-R2) | 4B | 3209M | 675M | 34+34 | 128K | 2560 | 1x-128x | Yes | Yes |
123
+
124
+
125
+
126
+ ### Prompt Template
127
+ ```python
128
+ f"<Document>: {document}"
129
+
130
+ ```
131
+ ```python
132
+ (
133
+ f"<bos><start_of_turn>user\n"
134
+ f"Judge whether the Document meets the requirements based on the Query and the Instruct provided. Note that the answer can only be \"yes\" or \"no\".\n\n"
135
+ f"<Instruct>: {task_instruction}\n"
136
+ f"<Query>: {query}<end_of_turn>\n"
137
+ f"<start_of_turn>model\n\n\n\n"
138
+ )
139
+
140
+ ```
141
+
142
+ ![kalm-reranker-v1-r2 template](./assets/template.jpg)
143
+
144
+
145
+ ### Evaluation
146
+ #### BEIR
147
+
148
+ The KaLM-Reranker-V1 series matches or outperforms strong industrial rerankers from the Qwen, BGE, Jina, and Mxbai families.
149
+ ![beir](./assets/beir.jpg)
150
+
151
+ #### MIRACL
152
+ KaLM-Reranker-V1 achieves competitive performance on MIRACL. Within its parameter group, KaLM-Reranker-V1-Large ranks first in 11 of the 18 languages (i.e., ar, bn, de, en, es, fi, fr, ja,
153
+ ko, ru, and sw); six of these languages (i.e., en, es, de, ja, fr, and ru) have reported website usage rates totaling approximately 74.2% among websites with known content languages ([W3Techs, 2026](https://w3techs.com/technologies/overview/content_language)).
154
+ ![miracl](./assets/miracl.jpg)
155
+
156
+ #### LMEB
157
+ On LMEB-Dialogue, a compact embedding model paired with our Nano reranker, which has only 0.27B activated parameters, remains competitive with 7–12B embedding models.
158
+ ![lmeb](./assets/lmeb.jpg)
159
+ ![lmeb_emb](./assets/lmeb_emb.jpg)
160
+
161
+ #### Ablation on multi-stage training
162
+
163
+ Across all three model sizes and all seven compression ratios, performance on BEIR and MIRACL improves consistently from Stage 1 to Stage 3, demonstrating the effectiveness of our multi-stage training pipeline. Concretely, Stage 1 establishes a robust foundation for document reranking, distillation in Stage 2 substantially improves performance, and Stage 3 yields further modest gains. More importantly, robustness to compression generally improves across the three training stages. For example, from Stage 1 to Stage 3, the performance retention of KaLM-Reranker-V1-Nano at r = 128 relative to r = 2 increases from 92.88% to 93.80% on BEIR and from 90.93% to 92.15% on MIRACL.
164
+
165
+ ![lmeb_emb](./assets/ablation.jpg)
166
+
167
+ ![kalm-reranker-v1-r2 training](./assets/training.jpg)
168
+
169
+ #### Potential of test-time compute scaling
170
+ Results show that this multi-stage strategy largely preserves reranking effectiveness while reducing the estimated online
171
+ computation cost by a factor of several. For example, on BEIR, KaLM-Reranker-V1-Small
172
+ achieves an average nDCG@10 of 61.11 under setting (c), compared with 61.17 under setting (a),
173
+ while reducing the estimated relative serving cost from 8.65x to 2.75x. Interestingly, settings (c)
174
+ and (d) outperform setting (a) on some tasks, suggesting that reranking more candidates at a low
175
+ compression ratio does not necessarily improve reranking quality.
176
+
177
+ ![test-time-compute](./assets/test-time-compute.jpg)
178
+
179
+
180
+ ### Acknowledgements
181
+ We sincerely thank `jina-reranker-v3` and `Qwen3-Reranker` for their valuable inspiration and contributions to the reranking community, from which we have learned a lot.
182
+
183
+ ### Citation
184
+ If you find this model useful, please consider citing our papers.
185
+ ```
186
+ @misc{zhao2026kalmrerankerv1,
187
+ title={KaLM-Reranker-V1: Fast but Not Late Interaction for Compressed Document Reranking},
188
+ author={Xinping Zhao and Jiaxin Xu and Ziqi Dai and Xin Zhang and Shouzheng Huang and Danyu Tang and Xinshuo Hu and Meishan Zhang and Baotian Hu and Min Zhang},
189
+ year={2026},
190
+ eprint={2606.22807},
191
+ archivePrefix={arXiv},
192
+ primaryClass={cs.CL},
193
+ url={https://arxiv.org/abs/2606.22807},
194
+ }
195
+
196
+ @misc{zhao2026kalmembeddingv2,
197
+ title={KaLM-Embedding-V2: Superior Training Techniques and Data Inspire A Versatile Embedding Model},
198
+ author={Xinping Zhao and Xinshuo Hu and Zifei Shan and Shouzheng Huang and Yao Zhou and Xin Zhang and Zetian Sun and Zhenyu Liu and Dongfang Li and Xinyuan Wei and Youcheng Pan and Yang Xiang and Meishan Zhang and Haofen Wang and Jun Yu and Baotian Hu and Min Zhang},
199
+ year={2026},
200
+ eprint={2506.20923},
201
+ archivePrefix={arXiv},
202
+ primaryClass={cs.CL},
203
+ url={https://arxiv.org/abs/2506.20923},
204
+ }
205
+
206
+ @misc{hu2025kalmembedding,
207
+ title={KaLM-Embedding: Superior Training Data Brings A Stronger Embedding Model},
208
+ author={Xinshuo Hu and Zifei Shan and Xinping Zhao and Zetian Sun and Zhenyu Liu and Dongfang Li and Shaolin Ye and Xinyuan Wei and Qian Chen and Baotian Hu and Haofen Wang and Jun Yu and Min Zhang},
209
+ year={2025},
210
+ eprint={2501.01028},
211
+ archivePrefix={arXiv},
212
+ primaryClass={cs.CL},
213
+ url={https://arxiv.org/abs/2501.01028},
214
+ }
215
+ ```
216
+
217
+ ### Contact
218
+ If you encounter any issues, feel free to contact us via the email: <zhaoxinping@stu.hit.edu.cn>