Text Ranking
sentence-transformers
Safetensors
Transformers
multilingual
t5gemma2
text2text-generation
reranker
encoder-decoder
FBNL
matryoshka
retrieval
RAG
Instructions to use KaLM-Embedding/KaLM-Reranker-V1-Large-R2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use KaLM-Embedding/KaLM-Reranker-V1-Large-R2 with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("KaLM-Embedding/KaLM-Reranker-V1-Large-R2") query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - Transformers
How to use KaLM-Embedding/KaLM-Reranker-V1-Large-R2 with Transformers:
# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("KaLM-Embedding/KaLM-Reranker-V1-Large-R2") model = AutoModelForMultimodalLM.from_pretrained("KaLM-Embedding/KaLM-Reranker-V1-Large-R2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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4b
|
| 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 |
+
---
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
<h1 align="center">KaLM-Reranker-V1: Fast but Not Late Interaction for Compressed Document Reranking</h1>
|
| 27 |
+
|
| 28 |
+
<p align="center">
|
| 29 |
+
<a href="https://huggingface.co/collections/KaLM-Embedding/lychee-kalm-reranker">
|
| 30 |
+
<img src="https://img.shields.io/badge/%F0%9F%A4%97_Collection-KaLM--Reranker-ffbd45.svg" alt="Hugging Face Collection">
|
| 31 |
+
</a>
|
| 32 |
+
<a href="https://arxiv.org/abs/2606.22807">
|
| 33 |
+
<img src="https://img.shields.io/badge/arXiv-2606.22807-b31b1b.svg" alt="Paper">
|
| 34 |
+
</a>
|
| 35 |
+
<a href="https://github.com/KaLM-Embedding">
|
| 36 |
+
<img src="https://img.shields.io/badge/GitHub-KaLM--Embedding-blue.svg?logo=github" alt="GitHub">
|
| 37 |
+
</a>
|
| 38 |
+
<a href="https://www.apache.org/licenses/LICENSE-2.0">
|
| 39 |
+
<img src="https://img.shields.io/badge/License-Apache--2.0-green.svg" alt="License">
|
| 40 |
+
</a>
|
| 41 |
+
</p>
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
## What is KaLM-Reranker-V1-R2?
|
| 45 |
+
|
| 46 |
+
**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:
|
| 47 |
+
|
| 48 |
+
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.
|
| 49 |
+
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.
|
| 50 |
+
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.
|
| 51 |
+
|
| 52 |
+

|
| 53 |
+
|
| 54 |
+
| Capability | KaLM-Reranker-V1 | KaLM-Reranker-V1-R2 |
|
| 55 |
+
|:--|:--|:--|
|
| 56 |
+
| Validated MEP range | 1x-32x | **1x-128x** |
|
| 57 |
+
| Test-time compute | Flexible compression | **Flexible allocation of inference-time computation** |
|
| 58 |
+
| Training | Supervised checkpoints | **High-quality SFT -> soft-label distillation -> model soup** |
|
| 59 |
+
| Multi-domain ranking | Strong | **Improved on BEIR for all three sizes** |
|
| 60 |
+
| Multilingual ranking | Limited | **Substantially improved across MIRACL's 18 languages** |
|
| 61 |
+
|
| 62 |
+
### KaLM-Reranker-V1-R2 vs. the original KaLM-Reranker-V1
|
| 63 |
+
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.
|
| 64 |
+
|
| 65 |
+
#### BEIR β Multi-domain Reranking
|
| 66 |
+
|
| 67 |
+
| Model | KaLM-Reranker-V1 | KaLM-Reranker-V1-R2 | Delta |
|
| 68 |
+
|:--|--:|--:|--:|
|
| 69 |
+
| Nano | 57.41 | **58.54** | **+1.13** |
|
| 70 |
+
| Small | 60.01 | **61.07** | **+1.06** |
|
| 71 |
+
| Large | 62.87 | **63.53** | **+0.66** |
|
| 72 |
+
|
| 73 |
+
#### MIRACL β Multilingual Reranking
|
| 74 |
+
|
| 75 |
+
| Model | KaLM-Reranker-V1 | KaLM-Reranker-V1-R2 | Delta |
|
| 76 |
+
|:--|--:|--:|--:|
|
| 77 |
+
| Nano | 62.08 | **71.11** | **+9.03** |
|
| 78 |
+
| Small | 66.89 | **74.06** | **+7.17** |
|
| 79 |
+
| Large | 70.07 | **74.92** | **+4.85** |
|
| 80 |
+
|
| 81 |
+
#### BEIR β Compression Robustness
|
| 82 |
+
|
| 83 |
+
| Model | 2x | 4x | 8x | 16x | 32x | 64x | 128x |
|
| 84 |
+
|:--|--:|--:|--:|--:|--:|--:|--:|
|
| 85 |
+
| KaLM-Reranker-V1-Nano | 57.69 | 57.41 | 56.46 | 55.19 | 52.88 | β | β |
|
| 86 |
+
| **KaLM-Reranker-V1-Nano-R2** | **58.75** | **58.54** | **58.17** | **57.47** | **56.74** | **55.88** | **55.11** |
|
| 87 |
+
| **Delta** | **+1.06** | **+1.13** | **+1.71** | **+2.28** | **+3.86** | β | β |
|
| 88 |
+
| KaLM-Reranker-V1-Small | 60.32 | 60.01 | 59.38 | 58.18 | 55.98 | β | β |
|
| 89 |
+
| **KaLM-Reranker-V1-Small-R2** | **61.17** | **61.07** | **60.74** | **60.25** | **59.54** | **58.84** | **58.20** |
|
| 90 |
+
| **Delta** | **+0.85** | **+1.06** | **+1.36** | **+2.07** | **+3.56** | β | β |
|
| 91 |
+
| KaLM-Reranker-V1-Large | 63.14 | 62.87 | 62.46 | 61.74 | 60.33 | β | β |
|
| 92 |
+
| **KaLM-Reranker-V1-Large-R2** | **63.69** | **63.53** | **63.15** | **62.70** | **62.18** | **61.60** | **61.23** |
|
| 93 |
+
| **Delta** | **+0.55** | **+0.66** | **+0.69** | **+0.96** | **+1.85** | β | β |
|
| 94 |
+
|
| 95 |
+
#### MIRACL β Compression Robustness
|
| 96 |
+
|
| 97 |
+
| Model | 2x | 4x | 8x | 16x | 32x | 64x | 128x |
|
| 98 |
+
|:--|--:|--:|--:|--:|--:|--:|--:|
|
| 99 |
+
| KaLM-Reranker-V1-Nano | 63.07 | 62.08 | 60.05 | 57.01 | 52.21 | β | β |
|
| 100 |
+
| **KaLM-Reranker-V1-Nano-R2** | **71.63** | **71.11** | **70.38** | **69.38** | **68.02** | **66.85** | **66.01** |
|
| 101 |
+
| **Delta** | **+8.56** | **+9.03** | **+10.33** | **+12.37** | **+15.81** | β | β |
|
| 102 |
+
| KaLM-Reranker-V1-Small | 67.28 | 66.89 | 65.36 | 62.96 | 59.07 | β | β |
|
| 103 |
+
| **KaLM-Reranker-V1-Small-R2** | **74.34** | **74.06** | **73.61** | **72.60** | **71.81** | **70.82** | **70.16** |
|
| 104 |
+
| **Delta** | **+7.06** | **+7.17** | **+8.25** | **+9.64** | **+12.74** | β | β |
|
| 105 |
+
| KaLM-Reranker-V1-Large | 70.30 | 70.07 | 69.63 | 68.25 | 65.94 | β | β |
|
| 106 |
+
| **KaLM-Reranker-V1-Large-R2** | **75.12** | **74.92** | **74.50** | **73.85** | **73.26** | **72.46** | **71.97** |
|
| 107 |
+
| **Delta** | **+4.82** | **+4.85** | **+4.87** | **+5.60** | **+7.32** | β | β |
|
| 108 |
+
|
| 109 |
+
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.
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
### Model family
|
| 114 |
+
|
| 115 |
+
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.
|
| 116 |
+
|
| 117 |
+
| Models | Activated Params. | Non-Embedding Params. | Embedding Params. | #Layers (encoder + decoder) | Sequence Length | Document Token Dim. | MEP Support | Instruction Aware | Test-Time Compute |
|
| 118 |
+
| ------------------------------------------------------------------------------------------------- | -----------------: | --------------------: | ----------------: | --------------------------: | --------------: | ------------------: | ----------: | ----------------: | ----------------: |
|
| 119 |
+
| [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 |
|
| 120 |
+
| [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 |
|
| 121 |
+
| [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 |
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
### Prompt Template
|
| 126 |
+
```python
|
| 127 |
+
f"<Document>: {document}"
|
| 128 |
+
|
| 129 |
+
```
|
| 130 |
+
```python
|
| 131 |
+
(
|
| 132 |
+
f"<bos><start_of_turn>user\n"
|
| 133 |
+
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"
|
| 134 |
+
f"<Instruct>: {task_instruction}\n"
|
| 135 |
+
f"<Query>: {query}<end_of_turn>\n"
|
| 136 |
+
f"<start_of_turn>model\n\n\n\n"
|
| 137 |
+
)
|
| 138 |
+
|
| 139 |
+
```
|
| 140 |
+
|
| 141 |
+

|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
### Evaluation
|
| 145 |
+
#### BEIR
|
| 146 |
+
|
| 147 |
+
The KaLM-Reranker-V1 series matches or outperforms strong industrial rerankers from the Qwen, BGE, Jina, and Mxbai families.
|
| 148 |
+

|
| 149 |
+
|
| 150 |
+
#### MIRACL
|
| 151 |
+
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,
|
| 152 |
+
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)).
|
| 153 |
+

|
| 154 |
+
|
| 155 |
+
#### LMEB
|
| 156 |
+
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.
|
| 157 |
+

|
| 158 |
+

|
| 159 |
+
|
| 160 |
+
#### Ablation on multi-stage training
|
| 161 |
+
|
| 162 |
+
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.
|
| 163 |
+
|
| 164 |
+

|
| 165 |
+
|
| 166 |
+

|
| 167 |
+
|
| 168 |
+
#### Potential of test-time compute scaling
|
| 169 |
+
Results show that this multi-stage strategy largely preserves reranking effectiveness while reducing the estimated online
|
| 170 |
+
computation cost by a factor of several. For example, on BEIR, KaLM-Reranker-V1-Small
|
| 171 |
+
achieves an average nDCG@10 of 61.11 under setting (c), compared with 61.17 under setting (a),
|
| 172 |
+
while reducing the estimated relative serving cost from 8.65x to 2.75x. Interestingly, settings (c)
|
| 173 |
+
and (d) outperform setting (a) on some tasks, suggesting that reranking more candidates at a low
|
| 174 |
+
compression ratio does not necessarily improve reranking quality.
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
|
| 178 |
+
|
| 179 |
+
### Acknowledgements
|
| 180 |
+
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.
|
| 181 |
+
|
| 182 |
+
### Citation
|
| 183 |
+
If you find this model useful, please consider citing our papers.
|
| 184 |
+
```
|
| 185 |
+
@misc{zhao2026kalmrerankerv1,
|
| 186 |
+
title={KaLM-Reranker-V1: Fast but Not Late Interaction for Compressed Document Reranking},
|
| 187 |
+
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},
|
| 188 |
+
year={2026},
|
| 189 |
+
eprint={2606.22807},
|
| 190 |
+
archivePrefix={arXiv},
|
| 191 |
+
primaryClass={cs.CL},
|
| 192 |
+
url={https://arxiv.org/abs/2606.22807},
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
@misc{zhao2026kalmembeddingv2,
|
| 196 |
+
title={KaLM-Embedding-V2: Superior Training Techniques and Data Inspire A Versatile Embedding Model},
|
| 197 |
+
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},
|
| 198 |
+
year={2026},
|
| 199 |
+
eprint={2506.20923},
|
| 200 |
+
archivePrefix={arXiv},
|
| 201 |
+
primaryClass={cs.CL},
|
| 202 |
+
url={https://arxiv.org/abs/2506.20923},
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
@misc{hu2025kalmembedding,
|
| 206 |
+
title={KaLM-Embedding: Superior Training Data Brings A Stronger Embedding Model},
|
| 207 |
+
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},
|
| 208 |
+
year={2025},
|
| 209 |
+
eprint={2501.01028},
|
| 210 |
+
archivePrefix={arXiv},
|
| 211 |
+
primaryClass={cs.CL},
|
| 212 |
+
url={https://arxiv.org/abs/2501.01028},
|
| 213 |
+
}
|
| 214 |
+
```
|
| 215 |
+
|
| 216 |
+
### Contact
|
| 217 |
+
If you encounter any issues, feel free to contact us via the email: <zhaoxinping@stu.hit.edu.cn>
|