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-Nano-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-Nano-R2 with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("KaLM-Embedding/KaLM-Reranker-V1-Nano-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-Nano-R2 with Transformers:
# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("KaLM-Embedding/KaLM-Reranker-V1-Nano-R2") model = AutoModelForMultimodalLM.from_pretrained("KaLM-Embedding/KaLM-Reranker-V1-Nano-R2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -51,20 +51,20 @@ library_name: sentence-transformers
|
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
-
### R2 vs. the original
|
| 55 |
|
| 56 |
-
All results below use the same default compression ratio, `r=4`.
|
| 57 |
|
| 58 |
-
| Model | BEIR
|
| 59 |
|:--|--:|--:|--:|--:|--:|--:|
|
| 60 |
| Nano | 57.41 | **58.54** | **+1.13** | 62.08 | **71.11** | **+9.03** |
|
| 61 |
| Small | 60.01 | **61.07** | **+1.06** | 66.89 | **74.06** | **+7.17** |
|
| 62 |
| Large | 62.87 | **63.53** | **+0.66** | 70.07 | **74.92** | **+4.85** |
|
| 63 |
|
| 64 |
-
| Capability |
|
| 65 |
|:--|:--|:--|
|
| 66 |
| Validated MEP range | 1x-32x | **1x-128x** |
|
| 67 |
-
| Test-time compute |
|
| 68 |
| Training | Original supervised checkpoints | **High-quality SFT -> soft-label distillation -> model soup** |
|
| 69 |
| Multi-domain ranking | Strong | **Improved on BEIR for all three sizes** |
|
| 70 |
| Multilingual ranking | Limited | **Substantially improved across MIRACL's 18 languages** |
|
|
@@ -78,3 +78,43 @@ All results below use the same default compression ratio, `r=4`. Original-releas
|
|
| 78 |
| [KaLM-Reranker-V1-Large-R2](https://huggingface.co/KaLM-Embedding/KaLM-Reranker-V1-Large-R2) | 4B | 34 + 34 | 128K | 2560 | 1x-128x | Yes |
|
| 79 |
|
| 80 |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
+
### KaLM-Reranker-V1-R2 vs. the original KaLM-Reranker-V1
|
| 55 |
|
| 56 |
+
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.
|
| 57 |
|
| 58 |
+
| Model | BEIR KaLM-Reranker-V1 | BEIR KaLM-Reranker-V1-R2 | Delta | MIRACL KaLM-Reranker-V1 | MIRACL KaLM-Reranker-V1-R2 | Delta |
|
| 59 |
|:--|--:|--:|--:|--:|--:|--:|
|
| 60 |
| Nano | 57.41 | **58.54** | **+1.13** | 62.08 | **71.11** | **+9.03** |
|
| 61 |
| Small | 60.01 | **61.07** | **+1.06** | 66.89 | **74.06** | **+7.17** |
|
| 62 |
| Large | 62.87 | **63.53** | **+0.66** | 70.07 | **74.92** | **+4.85** |
|
| 63 |
|
| 64 |
+
| Capability | KaLM-Reranker-V1 | KaLM-Reranker-V1-R2 |
|
| 65 |
|:--|:--|:--|
|
| 66 |
| Validated MEP range | 1x-32x | **1x-128x** |
|
| 67 |
+
| Test-time compute | Flexible compression | **Flexible allocation of inference-time computation** |
|
| 68 |
| Training | Original supervised checkpoints | **High-quality SFT -> soft-label distillation -> model soup** |
|
| 69 |
| Multi-domain ranking | Strong | **Improved on BEIR for all three sizes** |
|
| 70 |
| Multilingual ranking | Limited | **Substantially improved across MIRACL's 18 languages** |
|
|
|
|
| 78 |
| [KaLM-Reranker-V1-Large-R2](https://huggingface.co/KaLM-Embedding/KaLM-Reranker-V1-Large-R2) | 4B | 34 + 34 | 128K | 2560 | 1x-128x | Yes |
|
| 79 |
|
| 80 |
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.
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
# Acknowledgements
|
| 85 |
+
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.
|
| 86 |
+
|
| 87 |
+
# Citation
|
| 88 |
+
If you find this model useful, please consider citing our papers.
|
| 89 |
+
```
|
| 90 |
+
@misc{zhao2026kalmrerankerv1,
|
| 91 |
+
title={KaLM-Reranker-V1: Fast but Not Late Interaction for Compressed Document Reranking},
|
| 92 |
+
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},
|
| 93 |
+
year={2026},
|
| 94 |
+
eprint={2606.22807},
|
| 95 |
+
archivePrefix={arXiv},
|
| 96 |
+
primaryClass={cs.CL},
|
| 97 |
+
url={https://arxiv.org/abs/2606.22807},
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
@inproceedings{zhao2026kalmembeddingv2,
|
| 101 |
+
title={KaLM-Embedding-V2: Superior Training Techniques and Data Inspire A Versatile Embedding Model},
|
| 102 |
+
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},
|
| 103 |
+
booktitle={The Fourteenth International Conference on Learning Representations},
|
| 104 |
+
year={2026},
|
| 105 |
+
url={https://openreview.net/forum?id=Y7qzhvWhcz}
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
@misc{hu2025kalmembedding,
|
| 109 |
+
title={KaLM-Embedding: Superior Training Data Brings A Stronger Embedding Model},
|
| 110 |
+
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},
|
| 111 |
+
year={2025},
|
| 112 |
+
eprint={2501.01028},
|
| 113 |
+
archivePrefix={arXiv},
|
| 114 |
+
primaryClass={cs.CL},
|
| 115 |
+
url={https://arxiv.org/abs/2501.01028},
|
| 116 |
+
}
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
## Contact
|
| 120 |
+
If you encounter any issues, feel free to contact us via the email: <zhaoxinping@stu.hit.edu.cn>
|