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
Update README.md
Browse files
README.md
CHANGED
|
@@ -59,6 +59,17 @@ library_name: sentence-transformers
|
|
| 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 |
|
|
|
|
| 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 |
+
### R2 Training Checkpoints (Stages 1–3)
|
| 63 |
+
|
| 64 |
+
We release the checkpoints from the three-stage training pipeline described in the third version of our paper. Stage 1 uses supervised fine-tuning; Stage 2 produces two checkpoints through soft-label distillation; and Stage 3 combines them through model soup to produce the final R2 models.
|
| 65 |
+
|
| 66 |
+
| Stage | Checkpoint | Nano | Small | Large |
|
| 67 |
+
| :--- | :--- | :--- | :--- | :--- |
|
| 68 |
+
| Stage 1 | Supervised fine-tuning | [KaLM-Reranker-V1-Nano-R2-Stage1](https://huggingface.co/Yuki131/KaLM-Reranker-V1-Nano-R2-Stage1) | [KaLM-Reranker-V1-Small-R2-Stage1](https://huggingface.co/Yuki131/KaLM-Reranker-V1-Small-R2-Stage1) | [KaLM-Reranker-V1-Large-R2-Stage1](https://huggingface.co/Yuki131/KaLM-Reranker-V1-Large-R2-Stage1) |
|
| 69 |
+
| Stage 2 | Distillation (`r64-a32`) | [KaLM-Reranker-V1-Nano-R2-Stage2-r64-a32](https://huggingface.co/Yuki131/KaLM-Reranker-V1-Nano-R2-Stage2-r64-a32) | [KaLM-Reranker-V1-Small-R2-Stage2-r64-a32](https://huggingface.co/Yuki131/KaLM-Reranker-V1-Small-R2-Stage2-r64-a32) | [KaLM-Reranker-V1-Large-R2-Stage2-r64-a32](https://huggingface.co/Yuki131/KaLM-Reranker-V1-Large-R2-Stage2-r64-a32) |
|
| 70 |
+
| Stage 2 | Distillation (`r96-a48`) | [KaLM-Reranker-V1-Nano-R2-Stage2-r96-a48](https://huggingface.co/Yuki131/KaLM-Reranker-V1-Nano-R2-Stage2-r96-a48) | [KaLM-Reranker-V1-Small-R2-Stage2-r96-a48](https://huggingface.co/Yuki131/KaLM-Reranker-V1-Small-R2-Stage2-r96-a48) | [KaLM-Reranker-V1-Large-R2-Stage2-r96-a48](https://huggingface.co/Yuki131/KaLM-Reranker-V1-Large-R2-Stage2-r96-a48) |
|
| 71 |
+
| Stage 3 | Final R2 model | [KaLM-Reranker-V1-Nano-R2](https://huggingface.co/KaLM-Embedding/KaLM-Reranker-V1-Nano-R2) | [KaLM-Reranker-V1-Small-R2](https://huggingface.co/KaLM-Embedding/KaLM-Reranker-V1-Small-R2) | [KaLM-Reranker-V1-Large-R2](https://huggingface.co/KaLM-Embedding/KaLM-Reranker-V1-Large-R2) |
|
| 72 |
+
|
| 73 |
### KaLM-Reranker-V1-R2 vs. the original KaLM-Reranker-V1
|
| 74 |
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.
|
| 75 |
|