Instructions to use noooop9527/Qwen3-Reranker-0.6B-seq-cls-STv6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use noooop9527/Qwen3-Reranker-0.6B-seq-cls-STv6 with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("noooop9527/Qwen3-Reranker-0.6B-seq-cls-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) - Transformers
How to use noooop9527/Qwen3-Reranker-0.6B-seq-cls-STv6 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("noooop9527/Qwen3-Reranker-0.6B-seq-cls-STv6") model = AutoModelForSequenceClassification.from_pretrained("noooop9527/Qwen3-Reranker-0.6B-seq-cls-STv6", device_map="auto") - Notebooks
- Google Colab
- Kaggle
upload chat_template.jinja
#2
by noooop9527 - opened
- chat_template.jinja +11 -0
- config_sentence_transformers.json +4 -0
chat_template.jinja
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<|im_start|>system
|
| 2 |
+
Judge whether the Document meets the requirements based on the Query and the Instruct provided. Note that the answer can only be "yes" or "no".<|im_end|>
|
| 3 |
+
<|im_start|>user
|
| 4 |
+
<Instruct>: {{ messages | selectattr("role", "eq", "system") | map(attribute="content") | first | default("Given a web search query, retrieve relevant passages that answer the query") }}
|
| 5 |
+
<Query>: {{ messages | selectattr("role", "eq", "query") | map(attribute="content") | first }}
|
| 6 |
+
<Document>: {{ messages | selectattr("role", "eq", "document") | map(attribute="content") | first }}<|im_end|>
|
| 7 |
+
<|im_start|>assistant
|
| 8 |
+
<think>
|
| 9 |
+
|
| 10 |
+
</think>
|
| 11 |
+
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "CrossEncoder",
|
| 3 |
+
"chat_template_path": "chat_template.jinja"
|
| 4 |
+
}
|