Text Ranking
Transformers
Safetensors
multilingual
t5gemma2
text2text-generation
reranker
encoder-decoder
FBNL
Retrieval
RAG
Instructions to use KaLM-Embedding/KaLM-Reranker-V1-Small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KaLM-Embedding/KaLM-Reranker-V1-Small with Transformers:
# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("KaLM-Embedding/KaLM-Reranker-V1-Small") model = AutoModelForMultimodalLM.from_pretrained("KaLM-Embedding/KaLM-Reranker-V1-Small") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -190,14 +190,14 @@ def main() -> None:
|
|
| 190 |
print("scores:", reranker.predict(pairs, instruction=instruction))
|
| 191 |
print("rankings:", reranker.rank(query, documents, instruction=instruction))
|
| 192 |
|
| 193 |
-
# scores: [0.9999822378158569, 3.187565198459197e-06]
|
| 194 |
-
# rankings: [{'corpus_id': 0, 'score': 0.9999822378158569}, {'corpus_id': 1, 'score': 3.187565198459197e-06}]
|
| 195 |
-
|
| 196 |
|
| 197 |
if __name__ == "__main__":
|
| 198 |
main()
|
| 199 |
|
| 200 |
-
|
|
|
|
|
|
|
|
|
|
| 201 |
```
|
| 202 |
|
| 203 |
# Citation
|
|
|
|
| 190 |
print("scores:", reranker.predict(pairs, instruction=instruction))
|
| 191 |
print("rankings:", reranker.rank(query, documents, instruction=instruction))
|
| 192 |
|
|
|
|
|
|
|
|
|
|
| 193 |
|
| 194 |
if __name__ == "__main__":
|
| 195 |
main()
|
| 196 |
|
| 197 |
+
'''
|
| 198 |
+
scores: [0.9999822378158569, 3.187565198459197e-06]
|
| 199 |
+
rankings: [{'corpus_id': 0, 'score': 0.9999822378158569}, {'corpus_id': 1, 'score': 3.187565198459197e-06}]
|
| 200 |
+
'''
|
| 201 |
```
|
| 202 |
|
| 203 |
# Citation
|