Qwen3 Reranker - An open-source text re-ranking model from Alibaba Tongyi
Qwen3 Reranker is a text re-ranking model released by Alibaba's Tongyi Qianwen team, belonging to the Qwen3 model family. It employs a single-tower cross-encoder architecture, inputting text pairs and outputting relevance scores. The model undergoes multi-stage training...
What is Qwen3 Reranker?
Qwen3 Reranker is a text re-ranking model released by Alibaba's Tongyi Qianwen team, belonging to the Qwen3 model family. It employs a single-tower cross-encoder architecture, inputting text pairs and outputting relevance scores. The model utilizes a multi-stage training paradigm, trained on high-quality labeled data and a large number of synthetic training pairs, supporting over 100 languages, covering mainstream natural languages and various programming languages. In terms of performance, Qwen3 Reranker-8B achieved a high score of 72.94 on the MTEB leaderboard, and Qwen3 Reranker-0.6B has also surpassed Jina and BGE Rerankers.
Qwen3 Reranker's main functions
- Text relevance assessmentQwen3 Reranker can accept text pairs such as user queries and candidate documents as input. The model calculates and outputs a relevance score between the two text pairs; a higher score indicates a stronger relevance between the text pairs.
- Text reorderingBased on relevance scores, Qwen3 Reranker can sort candidate texts, placing the texts most relevant to the user's query at the top.
-
Optimize search resultsIn semantic retrieval scenarios, this feature helps users find the most relevant information faster, improving retrieval efficiency and accuracy.
-
Supports multiple languagesQwen3 Reranker supports over 100 languages, including major natural languages and various programming languages.
Qwen3 Reranker's technical principles
-
Single-tower cross encoder architectureQwen3 Reranker employs a single-tower cross-encoder architecture, concatenating the query and candidate documents before inputting them into the model. This architecture can process text pairs simultaneously, enabling deep interactive analysis and more accurately assessing the relevance between text pairs.
-
Command awareness capabilityThe model supports dynamically defining task objectives through instructions, such as "judging the relevance of legal documents," enabling the model to flexibly adjust the relevance assessment criteria according to different tasks and scenarios.
-
Input/output formatThe input format is a specific chat template, including commands, queries, and documents. The model output is a relevance score, determined by calculating the probability of "yes" or "no".
-
Multi-stage training paradigmThe training process of Qwen3 Reranker includes multiple stages. In the supervised fine-tuning stage, high-quality labeled data is used directly for training to improve efficiency. Synthetic data is then utilized to further enhance model performance.
-
High-quality data filteringIn selecting training data, Qwen3 Reranker uses a variety of high-quality labeled datasets, such as MS MARCO, NQ, and HotpotQA. High-quality synthetic data pairs are selected using cosine similarity.
-
Model fusion technologyThe Spherical Linear Interpolation (SLERP) technique is used to fuse parameters from multiple model checkpoints saved during the fine-tuning stage. This better preserves the geometric properties of the model parameters and improves the model's robustness and generalization performance across different data distributions.
-
Supervised Fine-tuning Loss (SFT Loss)Qwen3 Reranker optimizes the supervised fine-tuning loss function, learning to distinguish between relevant and irrelevant documents by maximizing the probability of the correct label ("yes" or "no"). This binary classification approach simplifies the reranking task, leveraging the instruction-following capability of the Qwen3 model.
Qwen3 Reranker's project address
- HuggingFace model library:https://huggingface.co/collections/Qwen/qwen3-reranker
Application scenarios of Qwen3 Reranker
-
Semantic retrievalIn scenarios such as search engines and question-answering systems, search results are reordered to prioritize the display of the most relevant content.
-
Text classificationBy evaluating the correlation between text and category labels, it assists in text classification tasks and improves classification accuracy.
-
Sentiment AnalysisIn sentiment analysis, the relevance of comments or texts to sentiment tags is ranked to aid in the determination of sentiment tendencies.
-
Code searchIn the code repository, code snippets are sorted according to their relevance to user queries, helping developers quickly find relevant code.