Text Ranking
Transformers
PyTorch
ONNX
Safetensors
Transformers.js
sentence-transformers
multilingual
text-classification
reranker
cross-encoder
custom_code
🇪🇺 Region: EU
Instructions to use jinaai/jina-reranker-v2-base-multilingual with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jinaai/jina-reranker-v2-base-multilingual with Transformers:
# Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("jinaai/jina-reranker-v2-base-multilingual", trust_remote_code=True, device_map="auto") - Transformers.js
How to use jinaai/jina-reranker-v2-base-multilingual with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-ranking', 'jinaai/jina-reranker-v2-base-multilingual'); - sentence-transformers
How to use jinaai/jina-reranker-v2-base-multilingual with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("jinaai/jina-reranker-v2-base-multilingual", trust_remote_code=True) 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) - Notebooks
- Google Colab
- Kaggle
chore: update readme
Browse files
README.md
CHANGED
|
@@ -24,7 +24,7 @@ license: cc-by-nc-4.0
|
|
| 24 |
|
| 25 |
## Intended Usage & Model Info
|
| 26 |
|
| 27 |
-
`jina-reranker-v2-base-multilingual` is a transformer-based model that has been fine-tuned for text reranking task, which is a crucial component in many information retrieval systems. It is a cross-encoder model that takes a query and a document pair as input and outputs a score indicating the relevance of the document to the query. The model is trained on a large dataset of query-document pairs and is capable of reranking documents in multiple languages with high accuracy.
|
| 28 |
|
| 29 |
Compared with the state-of-the-art reranker models, including the previous released `jina-reranker-v1-base-en`, the **Jina Reranker v2** model has demonstrated competitiveness across a series of benchmarks targeting for text retrieval, multilingual capability, function-calling-aware and text-to-SQL-aware reranking, and code retrieval tasks.
|
| 30 |
|
|
|
|
| 24 |
|
| 25 |
## Intended Usage & Model Info
|
| 26 |
|
| 27 |
+
The **Jina Reranker v2** (`jina-reranker-v2-base-multilingual`) is a transformer-based model that has been fine-tuned for text reranking task, which is a crucial component in many information retrieval systems. It is a cross-encoder model that takes a query and a document pair as input and outputs a score indicating the relevance of the document to the query. The model is trained on a large dataset of query-document pairs and is capable of reranking documents in multiple languages with high accuracy.
|
| 28 |
|
| 29 |
Compared with the state-of-the-art reranker models, including the previous released `jina-reranker-v1-base-en`, the **Jina Reranker v2** model has demonstrated competitiveness across a series of benchmarks targeting for text retrieval, multilingual capability, function-calling-aware and text-to-SQL-aware reranking, and code retrieval tasks.
|
| 30 |
|