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
|
@@ -157,6 +157,24 @@ On LMEB-Dialogue, a compact embedding model paired with our Nano reranker, which
|
|
| 157 |

|
| 158 |

|
| 159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
## Usage
|
| 161 |
### Using Sentence Transformers
|
| 162 |
|
|
@@ -447,24 +465,6 @@ T5Gemma2 semantic forward still runs through Transformers. It is not vLLM's
|
|
| 447 |
native HTTP `/score` implementation or a complete vLLM-native kernel port.
|
| 448 |
See [the complete installation, API and troubleshooting guide](./vllm_support/README.md).
|
| 449 |
|
| 450 |
-
#### Ablation on multi-stage training
|
| 451 |
-
|
| 452 |
-
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.
|
| 453 |
-
|
| 454 |
-

|
| 455 |
-
|
| 456 |
-

|
| 457 |
-
|
| 458 |
-
#### Potential of test-time compute scaling
|
| 459 |
-
Results show that this multi-stage strategy largely preserves reranking effectiveness while reducing the estimated online
|
| 460 |
-
computation cost by a factor of several. For example, on BEIR, KaLM-Reranker-V1-Small
|
| 461 |
-
achieves an average nDCG@10 of 61.11 under setting (c), compared with 61.17 under setting (a),
|
| 462 |
-
while reducing the estimated relative serving cost from 8.65x to 2.75x. Interestingly, settings (c)
|
| 463 |
-
and (d) outperform setting (a) on some tasks, suggesting that reranking more candidates at a low
|
| 464 |
-
compression ratio does not necessarily improve reranking quality.
|
| 465 |
-
|
| 466 |
-

|
| 467 |
-
|
| 468 |
|
| 469 |
### Acknowledgements
|
| 470 |
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.
|
|
|
|
| 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 |
## Usage
|
| 179 |
### Using Sentence Transformers
|
| 180 |
|
|
|
|
| 465 |
native HTTP `/score` implementation or a complete vLLM-native kernel port.
|
| 466 |
See [the complete installation, API and troubleshooting guide](./vllm_support/README.md).
|
| 467 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 468 |
|
| 469 |
### Acknowledgements
|
| 470 |
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.
|