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
licence info and inference API (#7)
Browse files- licence info and inference API (48a6ac22cb2116ad8424b7c638021520a0fe8d71)
README.md
CHANGED
|
@@ -6,7 +6,9 @@ tags:
|
|
| 6 |
- cross-encoder
|
| 7 |
language:
|
| 8 |
- multilingual
|
|
|
|
| 9 |
license: cc-by-nc-4.0
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
<br><br>
|
|
@@ -34,6 +36,7 @@ The model is also equipped with a flash attention mechanism, which significantly
|
|
| 34 |
|
| 35 |
# Usage
|
| 36 |
|
|
|
|
| 37 |
1. The easiest way to use `jina-reranker-v2-base-multilingual` is to call Jina AI's [Reranker API](https://jina.ai/reranker/).
|
| 38 |
|
| 39 |
```bash
|
|
|
|
| 6 |
- cross-encoder
|
| 7 |
language:
|
| 8 |
- multilingual
|
| 9 |
+
inference: false
|
| 10 |
license: cc-by-nc-4.0
|
| 11 |
+
library_name: transformers
|
| 12 |
---
|
| 13 |
|
| 14 |
<br><br>
|
|
|
|
| 36 |
|
| 37 |
# Usage
|
| 38 |
|
| 39 |
+
_This model repository is licenced for research and evaluation purposes under CC-BY-NC-4.0. For commercial usage, please refer to Jina AI's APIs, AWS Sagemaker or Azure Marketplace offerings. Please [contact us](https://jina.ai/contact-sales) for any further clarifications._
|
| 40 |
1. The easiest way to use `jina-reranker-v2-base-multilingual` is to call Jina AI's [Reranker API](https://jina.ai/reranker/).
|
| 41 |
|
| 42 |
```bash
|