Text Ranking
sentence-transformers
Safetensors
qwen2
cross-encoder
reranker
text-embeddings-inference
Instructions to use cross-encoder-testing/mxbai-rerank-base-v2-STv6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use cross-encoder-testing/mxbai-rerank-base-v2-STv6 with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("cross-encoder-testing/mxbai-rerank-base-v2-STv6") 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
Update chat_template.jinja
Browse files- chat_template.jinja +9 -9
chat_template.jinja
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
-
<|im_start|>system
|
| 2 |
-
You are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>
|
| 3 |
-
<|im_start|>user
|
| 4 |
-
query: {{ messages
|
| 5 |
-
document: {{ messages
|
| 6 |
-
You are a search relevance expert who evaluates how well documents match search queries. For each query-document pair, carefully analyze the semantic relationship between them, then provide your binary relevance judgment (0 for not relevant, 1 for relevant).
|
| 7 |
-
Relevance:<|im_end|>
|
| 8 |
-
<|im_start|>assistant
|
| 9 |
-
|
|
|
|
| 1 |
+
<|im_start|>system
|
| 2 |
+
You are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>
|
| 3 |
+
<|im_start|>user
|
| 4 |
+
query: {{ (messages | selectattr("role", "eq", "query") | first).content }}
|
| 5 |
+
document: {{ (messages | selectattr("role", "eq", "document") | first).content }}
|
| 6 |
+
You are a search relevance expert who evaluates how well documents match search queries. For each query-document pair, carefully analyze the semantic relationship between them, then provide your binary relevance judgment (0 for not relevant, 1 for relevant).
|
| 7 |
+
Relevance:<|im_end|>
|
| 8 |
+
<|im_start|>assistant
|
| 9 |
+
|