thxCode
commited on
Commit
•
2862667
0
Parent(s):
feat: first commit
Browse filesSigned-off-by: thxCode <thxcode0824@gmail.com>
- .gitattributes +37 -0
- README.md +294 -0
- jina-reranker-v2-base-multilingual-FP16.gguf +3 -0
- jina-reranker-v2-base-multilingual-Q2_K.gguf +3 -0
- jina-reranker-v2-base-multilingual-Q3_K.gguf +3 -0
- jina-reranker-v2-base-multilingual-Q4_0.gguf +3 -0
- jina-reranker-v2-base-multilingual-Q4_K_M.gguf +3 -0
- jina-reranker-v2-base-multilingual-Q5_0.gguf +3 -0
- jina-reranker-v2-base-multilingual-Q5_K_M.gguf +3 -0
- jina-reranker-v2-base-multilingual-Q6_K.gguf +3 -0
- jina-reranker-v2-base-multilingual-Q8_0.gguf +3 -0
.gitattributes
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
37 |
+
*.gguf filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,294 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
pipeline_tag: text-classification
|
3 |
+
tags:
|
4 |
+
- transformers
|
5 |
+
- reranker
|
6 |
+
- cross-encoder
|
7 |
+
- transformers.js
|
8 |
+
language:
|
9 |
+
- multilingual
|
10 |
+
inference: false
|
11 |
+
license: cc-by-nc-4.0
|
12 |
+
library_name: transformers
|
13 |
+
---
|
14 |
+
|
15 |
+
# jina-reranker-v2-base-multilingual-GGUF
|
16 |
+
|
17 |
+
**!!! Experimental supported by [gpustack/llama-box v0.0.72+](https://github.com/gpustack/llama-box) only !!!**<br/>
|
18 |
+
|
19 |
+
**Model creator**: [Jina AI](https://huggingface.co/jinaai)<br/>
|
20 |
+
**Original model**: [jina-reranker-v2-base-multilingual](https://huggingface.co/jinaai/jina-reranker-v2-base-multilingual)<br/>
|
21 |
+
**GGUF quantization**: based on llama.cpp [f4d2b](https://github.com/ggerganov/llama.cpp/commit/f4d2b8846a6b34419ff9e9491aee6cd95e444bfc) that patched by llama-box
|
22 |
+
|
23 |
+
<br><br>
|
24 |
+
|
25 |
+
<p align="center">
|
26 |
+
<img src="https://aeiljuispo.cloudimg.io/v7/https://cdn-uploads.huggingface.co/production/uploads/603763514de52ff951d89793/AFoybzd5lpBQXEBrQHuTt.png?w=200&h=200&f=face" alt="Finetuner logo: Finetuner helps you to create experiments in order to improve embeddings on search tasks. It accompanies you to deliver the last mile of performance-tuning for neural search applications." width="150px">
|
27 |
+
</p>
|
28 |
+
|
29 |
+
<p align="center">
|
30 |
+
<b>Trained by <a href="https://jina.ai/"><b>Jina AI</b></a>.</b>
|
31 |
+
</p>
|
32 |
+
|
33 |
+
# jina-reranker-v2-base-multilingual
|
34 |
+
|
35 |
+
## Intended Usage & Model Info
|
36 |
+
|
37 |
+
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.
|
38 |
+
|
39 |
+
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.
|
40 |
+
|
41 |
+
The `jina-reranker-v2-base-multilingual` model is capable of handling long texts with a context length of up to `1024` tokens, enabling the processing of extensive inputs. To enable the model to handle long texts that exceed 1024 tokens, the model uses a sliding window approach to chunk the input text into smaller pieces and rerank each chunk separately.
|
42 |
+
|
43 |
+
The model is also equipped with a flash attention mechanism, which significantly improves the model's performance.
|
44 |
+
|
45 |
+
|
46 |
+
# Usage
|
47 |
+
|
48 |
+
_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._
|
49 |
+
1. The easiest way to use `jina-reranker-v2-base-multilingual` is to call Jina AI's [Reranker API](https://jina.ai/reranker/).
|
50 |
+
|
51 |
+
```bash
|
52 |
+
curl https://api.jina.ai/v1/rerank \
|
53 |
+
-H "Content-Type: application/json" \
|
54 |
+
-H "Authorization: Bearer YOUR_API_KEY" \
|
55 |
+
-d '{
|
56 |
+
"model": "jina-reranker-v2-base-multilingual",
|
57 |
+
"query": "Organic skincare products for sensitive skin",
|
58 |
+
"documents": [
|
59 |
+
"Organic skincare for sensitive skin with aloe vera and chamomile.",
|
60 |
+
"New makeup trends focus on bold colors and innovative techniques",
|
61 |
+
"Bio-Hautpflege für empfindliche Haut mit Aloe Vera und Kamille",
|
62 |
+
"Neue Make-up-Trends setzen auf kräftige Farben und innovative Techniken",
|
63 |
+
"Cuidado de la piel orgánico para piel sensible con aloe vera y manzanilla",
|
64 |
+
"Las nuevas tendencias de maquillaje se centran en colores vivos y técnicas innovadoras",
|
65 |
+
"针对敏感肌专门设计的天然有机护肤产品",
|
66 |
+
"新的化妆趋势注重鲜艳的颜色和创新的技巧",
|
67 |
+
"敏感肌のために特別に設計された天然有機スキンケア製品",
|
68 |
+
"新しいメイクのトレンドは鮮やかな色と革新的な技術に焦点を当てています"
|
69 |
+
],
|
70 |
+
"top_n": 3
|
71 |
+
}'
|
72 |
+
```
|
73 |
+
|
74 |
+
2. You can also use the `transformers` library to interact with the model programmatically.
|
75 |
+
|
76 |
+
Before you start, install the `transformers` and `einops` libraries:
|
77 |
+
|
78 |
+
```bash
|
79 |
+
pip install transformers einops
|
80 |
+
```
|
81 |
+
|
82 |
+
And then:
|
83 |
+
```python
|
84 |
+
from transformers import AutoModelForSequenceClassification
|
85 |
+
|
86 |
+
model = AutoModelForSequenceClassification.from_pretrained(
|
87 |
+
'jinaai/jina-reranker-v2-base-multilingual',
|
88 |
+
torch_dtype="auto",
|
89 |
+
trust_remote_code=True,
|
90 |
+
)
|
91 |
+
|
92 |
+
model.to('cuda') # or 'cpu' if no GPU is available
|
93 |
+
model.eval()
|
94 |
+
|
95 |
+
# Example query and documents
|
96 |
+
query = "Organic skincare products for sensitive skin"
|
97 |
+
documents = [
|
98 |
+
"Organic skincare for sensitive skin with aloe vera and chamomile.",
|
99 |
+
"New makeup trends focus on bold colors and innovative techniques",
|
100 |
+
"Bio-Hautpflege für empfindliche Haut mit Aloe Vera und Kamille",
|
101 |
+
"Neue Make-up-Trends setzen auf kräftige Farben und innovative Techniken",
|
102 |
+
"Cuidado de la piel orgánico para piel sensible con aloe vera y manzanilla",
|
103 |
+
"Las nuevas tendencias de maquillaje se centran en colores vivos y técnicas innovadoras",
|
104 |
+
"针对敏感肌专门设计的天然有机护肤产品",
|
105 |
+
"新的化妆趋势注重鲜艳的颜色和创新的技巧",
|
106 |
+
"敏感肌のために特別に設計された天然有機スキンケア製品",
|
107 |
+
"新しいメイクのトレンドは鮮やかな色と革新的な技術に焦点を当てています",
|
108 |
+
]
|
109 |
+
|
110 |
+
# construct sentence pairs
|
111 |
+
sentence_pairs = [[query, doc] for doc in documents]
|
112 |
+
|
113 |
+
scores = model.compute_score(sentence_pairs, max_length=1024)
|
114 |
+
```
|
115 |
+
|
116 |
+
The scores will be a list of floats, where each float represents the relevance score of the corresponding document to the query. Higher scores indicate higher relevance.
|
117 |
+
For instance the returning scores in this case will be:
|
118 |
+
```bash
|
119 |
+
[0.8311430811882019, 0.09401018172502518,
|
120 |
+
0.6334102749824524, 0.08269733935594559,
|
121 |
+
0.7620701193809509, 0.09947021305561066,
|
122 |
+
0.9263036847114563, 0.05834583938121796,
|
123 |
+
0.8418256044387817, 0.11124119907617569]
|
124 |
+
```
|
125 |
+
|
126 |
+
The model gives high relevance scores to the documents that are most relevant to the query regardless of the language of the document.
|
127 |
+
|
128 |
+
Note that by default, the `jina-reranker-v2-base-multilingual` model uses [flash attention](https://github.com/Dao-AILab/flash-attention), which requires certain types of GPU hardware to run.
|
129 |
+
If you encounter any issues, you can try call `AutoModelForSequenceClassification.from_pretrained()` with `use_flash_attn=False`.
|
130 |
+
This will use the standard attention mechanism instead of flash attention.
|
131 |
+
|
132 |
+
If you want to use flash attention for fast inference, you need to install the following packages:
|
133 |
+
```bash
|
134 |
+
pip install ninja # required for flash attention
|
135 |
+
pip install flash-attn --no-build-isolation
|
136 |
+
```
|
137 |
+
Enjoy the 3x-6x speedup with flash attention! ⚡️⚡️⚡️
|
138 |
+
|
139 |
+
|
140 |
+
3. You can also use the `transformers.js` library to run the model directly in JavaScript (in-browser, Node.js, Deno, etc.)!
|
141 |
+
|
142 |
+
If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library (v3) using:
|
143 |
+
```bash
|
144 |
+
npm i xenova/transformers.js#v3
|
145 |
+
```
|
146 |
+
|
147 |
+
Then, you can use the following code to interact with the model:
|
148 |
+
```js
|
149 |
+
import { AutoTokenizer, XLMRobertaModel } from '@xenova/transformers';
|
150 |
+
|
151 |
+
const model_id = 'jinaai/jina-reranker-v2-base-multilingual';
|
152 |
+
const model = await XLMRobertaModel.from_pretrained(model_id, { dtype: 'fp32' });
|
153 |
+
const tokenizer = await AutoTokenizer.from_pretrained(model_id);
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Performs ranking with the CrossEncoder on the given query and documents. Returns a sorted list with the document indices and scores.
|
157 |
+
* @param {string} query A single query
|
158 |
+
* @param {string[]} documents A list of documents
|
159 |
+
* @param {Object} options Options for ranking
|
160 |
+
* @param {number} [options.top_k=undefined] Return the top-k documents. If undefined, all documents are returned.
|
161 |
+
* @param {number} [options.return_documents=false] If true, also returns the documents. If false, only returns the indices and scores.
|
162 |
+
*/
|
163 |
+
async function rank(query, documents, {
|
164 |
+
top_k = undefined,
|
165 |
+
return_documents = false,
|
166 |
+
} = {}) {
|
167 |
+
const inputs = tokenizer(
|
168 |
+
new Array(documents.length).fill(query),
|
169 |
+
{ text_pair: documents, padding: true, truncation: true }
|
170 |
+
)
|
171 |
+
const { logits } = await model(inputs);
|
172 |
+
return logits.sigmoid().tolist()
|
173 |
+
.map(([score], i) => ({
|
174 |
+
corpus_id: i,
|
175 |
+
score,
|
176 |
+
...(return_documents ? { text: documents[i] } : {})
|
177 |
+
})).sort((a, b) => b.score - a.score).slice(0, top_k);
|
178 |
+
}
|
179 |
+
|
180 |
+
// Example usage:
|
181 |
+
const query = "Organic skincare products for sensitive skin"
|
182 |
+
const documents = [
|
183 |
+
"Organic skincare for sensitive skin with aloe vera and chamomile.",
|
184 |
+
"New makeup trends focus on bold colors and innovative techniques",
|
185 |
+
"Bio-Hautpflege für empfindliche Haut mit Aloe Vera und Kamille",
|
186 |
+
"Neue Make-up-Trends setzen auf kräftige Farben und innovative Techniken",
|
187 |
+
"Cuidado de la piel orgánico para piel sensible con aloe vera y manzanilla",
|
188 |
+
"Las nuevas tendencias de maquillaje se centran en colores vivos y técnicas innovadoras",
|
189 |
+
"针对敏感肌专门设计的天然有机护肤产品",
|
190 |
+
"新的化妆趋势注重鲜艳的颜色和创新的技巧",
|
191 |
+
"敏感肌のために特別に設計された天然有機スキンケア製品",
|
192 |
+
"新しいメイクのトレンドは鮮やかな色と革新的な技術に焦点を当てています",
|
193 |
+
]
|
194 |
+
|
195 |
+
const results = await rank(query, documents, { return_documents: true, top_k: 3 });
|
196 |
+
console.log(results);
|
197 |
+
```
|
198 |
+
|
199 |
+
|
200 |
+
That's it! You can now use the `jina-reranker-v2-base-multilingual` model in your projects.
|
201 |
+
|
202 |
+
|
203 |
+
In addition to the `compute_score()` function, the `jina-reranker-v2-base-multilingual` model also provides a `model.rerank()` function that can be used to rerank documents based on a query. You can use it as follows:
|
204 |
+
|
205 |
+
```python
|
206 |
+
result = model.rerank(
|
207 |
+
query,
|
208 |
+
documents,
|
209 |
+
max_query_length=512,
|
210 |
+
max_length=1024,
|
211 |
+
top_n=3
|
212 |
+
)
|
213 |
+
```
|
214 |
+
|
215 |
+
Inside the `result` object, you will find the reranked documents along with their scores. You can use this information to further process the documents as needed.
|
216 |
+
|
217 |
+
The `rerank()` function will automatically chunk the input documents into smaller pieces if they exceed the model's maximum input length. This allows you to rerank long documents without running into memory issues.
|
218 |
+
Specifically, the `rerank()` function will split the documents into chunks of size `max_length` and rerank each chunk separately. The scores from all the chunks are then combined to produce the final reranking results. You can control the query length and document length in each chunk by setting the `max_query_length` and `max_length` parameters. The `rerank()` function also supports the `overlap` parameter (default is `80`) which determines how much overlap there is between adjacent chunks. This can be useful when reranking long documents to ensure that the model has enough context to make accurate predictions.
|
219 |
+
|
220 |
+
3. Alternatively, `jina-reranker-v2-base-multilingual` has been integrated with `CrossEncoder` from the `sentence-transformers` library.
|
221 |
+
|
222 |
+
Before you start, install the `sentence-transformers` libraries:
|
223 |
+
|
224 |
+
```bash
|
225 |
+
pip install sentence-transformers
|
226 |
+
```
|
227 |
+
|
228 |
+
The [`CrossEncoder`](https://sbert.net/docs/package_reference/cross_encoder/cross_encoder.html) class supports a [`predict`](https://sbert.net/docs/package_reference/cross_encoder/cross_encoder.html#sentence_transformers.cross_encoder.CrossEncoder.predict) method to get query-document relevance scores, and a [`rank`](https://sbert.net/docs/package_reference/cross_encoder/cross_encoder.html#sentence_transformers.cross_encoder.CrossEncoder.rank) method to rank all documents given your query.
|
229 |
+
|
230 |
+
```python
|
231 |
+
from sentence_transformers import CrossEncoder
|
232 |
+
|
233 |
+
model = CrossEncoder(
|
234 |
+
"jinaai/jina-reranker-v2-base-multilingual",
|
235 |
+
automodel_args={"torch_dtype": "auto"},
|
236 |
+
trust_remote_code=True,
|
237 |
+
)
|
238 |
+
|
239 |
+
# Example query and documents
|
240 |
+
query = "Organic skincare products for sensitive skin"
|
241 |
+
documents = [
|
242 |
+
"Organic skincare for sensitive skin with aloe vera and chamomile.",
|
243 |
+
"New makeup trends focus on bold colors and innovative techniques",
|
244 |
+
"Bio-Hautpflege für empfindliche Haut mit Aloe Vera und Kamille",
|
245 |
+
"Neue Make-up-Trends setzen auf kräftige Farben und innovative Techniken",
|
246 |
+
"Cuidado de la piel orgánico para piel sensible con aloe vera y manzanilla",
|
247 |
+
"Las nuevas tendencias de maquillaje se centran en colores vivos y técnicas innovadoras",
|
248 |
+
"针对敏感肌专门设计的天然有机护肤产品",
|
249 |
+
"新的化妆趋势注重鲜艳的颜色和创新的技巧",
|
250 |
+
"敏感肌のために特別に設計された天然有機スキンケア製品",
|
251 |
+
"新しいメイクのトレンドは鮮やかな色と革新的な技術に焦点を当てています",
|
252 |
+
]
|
253 |
+
|
254 |
+
# construct sentence pairs
|
255 |
+
sentence_pairs = [[query, doc] for doc in documents]
|
256 |
+
|
257 |
+
scores = model.predict(sentence_pairs, convert_to_tensor=True).tolist()
|
258 |
+
"""
|
259 |
+
[0.828125, 0.0927734375, 0.6328125, 0.08251953125, 0.76171875, 0.099609375, 0.92578125, 0.058349609375, 0.84375, 0.111328125]
|
260 |
+
"""
|
261 |
+
|
262 |
+
rankings = model.rank(query, documents, return_documents=True, convert_to_tensor=True)
|
263 |
+
print(f"Query: {query}")
|
264 |
+
for ranking in rankings:
|
265 |
+
print(f"ID: {ranking['corpus_id']}, Score: {ranking['score']:.4f}, Text: {ranking['text']}")
|
266 |
+
"""
|
267 |
+
Query: Organic skincare products for sensitive skin
|
268 |
+
ID: 6, Score: 0.9258, Text: 针对敏感肌专门设计的天然有机护肤产品
|
269 |
+
ID: 8, Score: 0.8438, Text: 敏感肌のために特別に設計された天然有機スキンケア製品
|
270 |
+
ID: 0, Score: 0.8281, Text: Organic skincare for sensitive skin with aloe vera and chamomile.
|
271 |
+
ID: 4, Score: 0.7617, Text: Cuidado de la piel orgánico para piel sensible con aloe vera y manzanilla
|
272 |
+
ID: 2, Score: 0.6328, Text: Bio-Hautpflege für empfindliche Haut mit Aloe Vera und Kamille
|
273 |
+
ID: 9, Score: 0.1113, Text: 新しいメイクのトレンドは鮮やかな色と革新的な技術に焦点を当てています
|
274 |
+
ID: 5, Score: 0.0996, Text: Las nuevas tendencias de maquillaje se centran en colores vivos y técnicas innovadoras
|
275 |
+
ID: 1, Score: 0.0928, Text: New makeup trends focus on bold colors and innovative techniques
|
276 |
+
ID: 3, Score: 0.0825, Text: Neue Make-up-Trends setzen auf kräftige Farben und innovative Techniken
|
277 |
+
ID: 7, Score: 0.0583, Text: 新的化妆趋势注重鲜艳的颜色和创新的技巧
|
278 |
+
"""
|
279 |
+
```
|
280 |
+
|
281 |
+
# Evaluation
|
282 |
+
|
283 |
+
We evaluated Jina Reranker v2 on multiple benchmarks to ensure top-tier performance and search relevance.
|
284 |
+
|
285 |
+
| Model Name | Model Size | MKQA(nDCG@10, 26 langs) | BEIR(nDCG@10, 17 datasets) | MLDR(recall@10, 13 langs) | CodeSearchNet (MRR@10, 3 tasks) | AirBench (nDCG@10, zh/en) | ToolBench (recall@3, 3 tasks) | TableSearch (recall@3) |
|
286 |
+
| :-----------------------------: | :----------: | ------------------------- | ---------------------------- | --------------------------- | --------------------------------- | --------------------------- | ------------------------------- | ------------------------ |
|
287 |
+
| jina-reranker-v2-multilingual | 278M | 54.83 | 53.17 | 68.95 | 71.36 | 61.33 | 77.75 | 93.31 |
|
288 |
+
| bge-reranker-v2-m3 | 568M | 54.17 | 53.65 | 59.73 | 62.86 | 61.28 | 78.46 | 74.86 |
|
289 |
+
| mmarco-mMiniLMv2-L12-H384-v1 | 118M | 53.37 | 45.40 | 28.91 | 51.78 | 56.46 | 58.39 | 53.60 |
|
290 |
+
| jina-reranker-v1-base-en | 137M | - | 52.45 | - | - | - | 74.13 | 72.89 |
|
291 |
+
|
292 |
+
Note:
|
293 |
+
- NDCG@10 and MRR@10 measure ranking quality, with higher scores indicating better search results
|
294 |
+
- recall@3 measures the proportion of relevant documents retrieved, with higher scores indicating better search results
|
jina-reranker-v2-base-multilingual-FP16.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cbcdb2edbc5517ad3710ee103bf9209ef78fc413512b9bd4ec29a3a1759d59a6
|
3 |
+
size 568134720
|
jina-reranker-v2-base-multilingual-Q2_K.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7b20af37f61191b3ea4015a7e5e0de42f31584c2aa5a257713925b6f09672b1e
|
3 |
+
size 202240928
|
jina-reranker-v2-base-multilingual-Q3_K.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:be6f4216aeaa5afb59052ea6e62409527ad80c884ae8628f88c63032efe7627f
|
3 |
+
size 214853024
|
jina-reranker-v2-base-multilingual-Q4_0.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6adc070fac9582cd6c2e6713a6c97361a43855c3ae611f588bf0c9832a02216e
|
3 |
+
size 218691488
|
jina-reranker-v2-base-multilingual-Q4_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:280718d1dea776f2c2a3770437c0cc4fcf0e28e82af47dd24c7bfd2ec2f423cd
|
3 |
+
size 224995232
|
jina-reranker-v2-base-multilingual-Q5_0.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ba6bac364b238336d9b63ed6aa0305109c7203f14f98534b2be4b0000ca23d35
|
3 |
+
size 229382048
|
jina-reranker-v2-base-multilingual-Q5_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:457911207f9467a97483e8e63b7995e01204a684731baf9c193e52d2984cb5e5
|
3 |
+
size 234082208
|
jina-reranker-v2-base-multilingual-Q6_K.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1994e13cb2f79875e84b037c4211a205fd30114ef2f34651711d1c2f77fee22d
|
3 |
+
size 240740768
|
jina-reranker-v2-base-multilingual-Q8_0.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b6262328b8d8c7f0fe32b13a76ac6f038bbdb2047cb25748149ce94cf3962e93
|
3 |
+
size 307954080
|