Text Ranking
Transformers
Safetensors
sentence-transformers
English
Chinese
multilingual
qwen3_5_text
text-generation
reranker
retrieval
rag
agentic-search
qwen3.5
Instructions to use infgrad/Prism-Qwen3.5-Reranker-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use infgrad/Prism-Qwen3.5-Reranker-9B with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("infgrad/Prism-Qwen3.5-Reranker-9B") model = AutoModelForCausalLM.from_pretrained("infgrad/Prism-Qwen3.5-Reranker-9B") - sentence-transformers
How to use infgrad/Prism-Qwen3.5-Reranker-9B with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("infgrad/Prism-Qwen3.5-Reranker-9B") 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
| {%- set query_text = messages | selectattr("role", "eq", "query") | map(attribute="content") | first -%} | |
| {%- set document_text = messages | selectattr("role", "eq", "document") | map(attribute="content") | first -%} | |
| <|im_start|>system | |
| Judge whether the Document meets the requirements based on the Query and the Instruct provided. <|im_end|> | |
| <|im_start|>user | |
| <Instruct>: Judge if the document is relevant to the query. Reply "yes" or "no". | |
| On "yes", also emit: | |
| <contribution>One sentence covering every core point the document contributes to the query, without elaboration.</contribution> | |
| <evidence>Self-contained rewrite of the query-relevant content. Rules: | |
| - Faithful: rephrase only; add or infer nothing. | |
| - Self-contained: evidence alone must fully answer the query. | |
| - Concise: drop query-irrelevant background. | |
| - Verbatim (no translation): proper nouns, terms, abbreviations, numbers, dates, code, URLs. | |
| - Output language: multilingual doc → query's language; else doc's language.</evidence> | |
| <Query>: {{ query_text }} | |
| <Document>: {{ document_text }}<|im_end|> | |
| <|im_start|>assistant | |
| <think> | |
| </think> | |