# Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Models

Qwen3 Embedding trains LLM-based embedding and reranking models that top multilingual benchmarks

Yanzhao Zhang, Mingxin Li, Dingkun Long, Xin Zhang, Huan Lin, Baosong Yang and 6 more · arXiv · 2025-6-5

- **Problem** Embedding and reranking models must judge relevance under a task instruction, and that is hard to train well at scale across languages. Earlier systems were built on encoder-only models such as BERT.
- **Method** Qwen3 Embedding builds embedding and reranking models on Qwen3 LLMs. Instead of relying on community Q&A pairs, the LLM generates about 150 million weakly supervised training pairs, then fine-tunes on a filtered set.
- **Results** Qwen3-Embedding-8B reached 70.58 on MMTEB, against 64.33 for the 0.6B model. The authors report state-of-the-art results across diverse benchmarks.

## Why task-aware relevance is hard to train

Embedding and reranking sit underneath web search, question answering and recommendation, and newer systems such as retrieval-augmented generation and agents make their demands sharper. Relevance is not a fixed property of a query-document pair. It depends on the similarity criterion that a task instruction defines, so the same pair can be judged differently under a different instruction.

Earlier systems were built on encoder-only models such as BERT. Larger LLMs brought broader world knowledge and reasoning, and they also made it practical to use language models to produce and filter training data.

The target here is one family of embedding and reranking models built on Qwen3 foundation models, offered at 0.6B, 4B and 8B sizes so that users can trade efficiency against effectiveness. Training follows a staged recipe: large-scale weakly supervised training on synthetic pairs, then supervised fine-tuning on a smaller high-quality set, with model merging added at the end.

The central change is that the LLM generates the training pairs itself instead of relying mainly on pairs collected from community sources such as Q&A forums or academic papers.

## How queries, documents and instructions enter the models

The embedding model is an LLM with causal attention. An end-of-sequence token is appended to the input, and the embedding is the last-layer hidden state at that token. The instruction is concatenated with the query, while the document is passed through unchanged, so the instruction only shapes the query side of the input. Embedding dimensions differ by size: 1024 for the 0.6B model, 2560 for the 4B model and 4096 for the 8B model, and all three support custom output dimensions.

The reranker scores each query-document pair in its own context rather than comparing candidates against each other. It is therefore a point-wise scorer, and the task is framed as a binary classification. The reranker input uses the LLM chat template. A system message asks whether the document meets the requirements set by the query and the instruction, and the answer is restricted to yes or no.

The relevance score is then computed from the two answer probabilities, as in the expression below. \\\[ score(q,d) = \\frac{e^{P(yes\|I,q,d)}}{e^{P(yes\|I,q,d)} + e^{P(no\|I,q,d)}} \\\]

All models use 32K sequence length. The 0.6B reranker has 28 layers, and the 4B and 8B rerankers have 36 each. Rerankers produce no output embedding, so the dimension columns are empty for them.

## Two losses for two model types

The embedding model is trained with a contrastive loss derived from InfoNCE. Over a batch of N training instances, it pushes each query toward its positive document and away from the negatives, with cosine similarity as the score and a temperature τ. \\\[ L\_{embedding} = -\\frac{1}{N}\\sum\_{i} \\log \\frac{e^{s(q\_i,d\_i^+)/\\tau}}{Z\_i} \\\] The minus sign makes this a loss to minimize, so each term rises as the positive pair's similarity grows relative to the normalizer.

The normalizer Z\_i adds the positive term to several groups of negatives: hard negatives for the same query, other in-batch queries, and in-batch documents compared against both the positive document and the query. Each in-batch negative term is scaled by a mask factor m\_ij. The mask is 0 when a candidate's score exceeds the positive score by more than 0.1, or when the candidate document equals the positive document; otherwise it is 1.

\\\[ m\_{ij} = \\begin{cases} 0 & \\text{if } s\_{ij} \> s(q\_i,d\_i^+) + 0.1 \\text{ or } d\_j = d\_i^+ \\\\ 1 & \\text{otherwise} \\end{cases} \\\] This removes candidates that look almost as relevant as the positive, so they are not treated as clear negatives.

\\\[ L\_{reranking} = -\\log p(l \\mid P(q,d)) \\\] Both embedding stages use the embedding loss, and the reranker uses this supervised loss throughout.

## From synthetic pairs to merged checkpoints

Qwen3-32B is the foundation model used to synthesize pairs. For retrieval pairs, documents come from the multilingual pre-training corpus of Qwen3. Each document is paired with role candidates from a role library. A retrieval model picks the top five candidates, and the prompt uses them to choose a role that would plausibly ask about the document.

The prompt also sets the query type, query length, difficulty and language, so the generated pairs vary along these axes. The process yields approximately 150 million weakly supervised pairs.

Pairs are filtered with a plain cosine similarity score, and only pairs with a similarity greater than 0.7 are kept from randomly sampled data. This leaves approximately 12 million high-quality pairs for the second stage of supervised training. The second stage also uses labeled data, so the filtered synthetic pairs are combined with high-quality supervised data rather than used alone.

After supervised fine-tuning, several checkpoints saved during fine-tuning are merged with spherical linear interpolation. The aim is better robustness and generalization across data distributions. Synthesis is presented as giving more control over quality and diversity, which matters most in low-resource languages and scenarios. The reranker pipeline skips the weakly supervised first stage and starts from supervised fine-tuning followed by merging.

## Embedding results on three benchmark suites

MMTEB combines 216 evaluation tasks: 131 from MTEB Multilingual, 41 from MTEB English v2, 32 from CMTEB and 12 code retrieval tasks from MTEB Code. The tasks span more than 250 languages, and the scores here use mean task scores.

On the MMTEB multilingual table, Qwen3-Embedding-8B reached 70.58 and Qwen3-Embedding-4B reached 69.45, while Qwen3-Embedding-0.6B reached 64.33. The authors describe the 0.6B model as trailing Gemini-Embedding while staying competitive with gte-Qwen2-7B-instruct, which is listed at 62.51 in that table.

On the English v2 benchmark, the 0.6B, 4B and 8B models reached 70.70, 74.60 and 75.22 mean task scores. On CMTEB, the same three models reached 66.33, 72.26 and 73.83, and on MTEB Code they reached 75.41, 80.06 and 80.68. The code scores for the commercial and open-source comparison models are taken from other papers, so the code comparison mixes sources.

The leaderboard values for the compared models were retrieved on June 4th, 2025, so the table compares the models' reported numbers and not a single controlled re-run.

## Reranking on retrieval subsets

Each reranker is applied to the top-100 candidates produced by Qwen3-Embedding-0.6B, so all rerankers start from the same candidate list. The evaluation covers MTEB-R, CMTEB-R, MMTEB-R, MLDR, MTEB-Code and FollowIR.

Qwen3-Reranker-0.6B scored 65.80 on MTEB-R, 71.31 on CMTEB-R, 66.36 on MMTEB-R, 67.28 on MLDR, 73.42 on MTEB-Code and 5.41 on FollowIR. The best listed baseline on MTEB-R, BGE-reranker-v2-m3, scored 57.03 on that column in the same table.

Qwen3-Reranker-8B scored 69.02 on MTEB-R and 81.22 on MTEB-Code, while Qwen3-Reranker-4B scored 69.76 on MTEB-R and 81.20 on MTEB-Code. The gain is not uniform: on FollowIR the 4B model scored 14.84 and the 8B model scored 8.05.

## What the 0.6B training ablations remove

The ablation trains Qwen3-Embedding-0.6B under four settings and reports MMTEB, MTEB English v2, CMTEB and MTEB Code v1 mean task scores. The settings are a model trained only on synthetic data, a model without synthetic data, a model without model merging, and the full model.

On MMTEB, the full model reached 64.33, while the model without synthetic data reached 61.21. The model trained only on synthetic data reached 58.49. The authors read this as showing that the large-scale weakly supervised stage is crucial for strong performance.

Without model merging, the MMTEB score was 62.56, against 64.33 for the full model. In that variant, data sampling balances the task mix instead of merging. The authors read the gap as showing that merging is also critical for strong models.

## Limits of the reported evidence

The ablations are run only on Qwen3-Embedding-0.6B, so the reported contributions of synthetic data and merging are measured for that size alone. Reranker training has no weakly supervised stage, so the reranker results do not test that part of the embedding pipeline. Reranking gains are measured on candidates from Qwen3-Embedding-0.6B, and the FollowIR scores do not rise monotonically with size.

Compared-model scores come from leaderboard values retrieved on June 4th, 2025, and some code scores are taken from other papers.

## Paper info

- **Authors**: Yanzhao Zhang, Mingxin Li, Dingkun Long, Xin Zhang, Huan Lin, Baosong Yang, Pengjun Xie, An Yang, Dayiheng Liu, Junyang Lin, Fei Huang, Jingren Zhou
- **Venue**: arXiv · Preprint
- **First published**: 2025-6-5
- **Added**: 2026-11-12
- **Updated**: 2025-6-11
- **Version**: v3
- **arXiv**: 2506.05176
- **Category**: cs.CL
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/2506.05176v3) · [PDF ↗](https://arxiv.org/pdf/2506.05176v3)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Yanzhao Zhang, Mingxin Li, Dingkun Long, Xin Zhang, Huan Lin, Baosong Yang, Pengjun Xie, An Yang, Dayiheng Liu, Junyang Lin, Fei Huang, Jingren Zhou (2025). Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Models. arXiv:2506.05176v3. https://arxiv.org/abs/2506.05176v3

**BibTeX**

```
@misc{zhang2025qwen3,
  title = {{Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Models}},
  author = {Yanzhao Zhang and Mingxin Li and Dingkun Long and Xin Zhang and Huan Lin and Baosong Yang and Pengjun Xie and An Yang and Dayiheng Liu and Junyang Lin and Fei Huang and Jingren Zhou},
  year = {2025},
  eprint = {2506.05176},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.05176v3}
}
```

## Related papers

- [M3-Embedding: Multi-Linguality, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation](https://refivu.com/en/papers/c3b40084-e91f-4769-ab5c-b3256a5b92f7-m3-embedding-multi-linguality-multi-functionality-multi.md)
- [Unsupervised Dense Information Retrieval with Contrastive Learning](https://refivu.com/en/papers/2fbce187-1a33-4d74-941c-36d004c9a79b-unsupervised-dense-information-retrieval-with-contrastive.md)
- [Explanations that Transfer: Interpreting Medical Retrieval with Sparse AutoEncoders](https://refivu.com/en/papers/fcc9b660-cb5e-4a36-99e8-e9d43824526d-explanations-that-transfer-interpreting-medical-retrieval.md)
- [Dream to Control: Learning Behaviors by Latent Imagination](https://refivu.com/en/papers/20a4d063-3ef9-48fc-88cb-307287206e29-dream-to-control-learning-behaviors-by-latent-imagination.md)
- [Learning deep representations by mutual information estimation and maximization](https://refivu.com/en/papers/0ecc4e49-5a6d-49c7-a22d-0464db0ce259-learning-deep-representations-by-mutual-information.md)

## Other paper commentary

- [Semantic Similarity in a Taxonomy: An Information-Based Measure and its Application to Problems of Ambiguity in Natural Language](https://refivu.com/en/papers/2aedc905-eee8-4237-bf2e-929c6d3718a0-semantic-similarity-in-a-taxonomy-an-information-based.md)
- [Unsupervised Data Augmentation for Consistency Training](https://refivu.com/en/papers/7940975d-f8e6-4178-9d29-c4dc7f994398-unsupervised-data-augmentation-for-consistency-training.md)
- [Universal Sentence Encoder](https://refivu.com/en/papers/832f78a9-5914-4e69-88eb-9c85196eb17b-universal-sentence-encoder.md)
- [Deep Learning Based Text Classification: A Comprehensive Review](https://refivu.com/en/papers/f32bf8ee-1bca-48a8-92cd-28ac97a169bd-deep-learning-based-text-classification-a-comprehensive.md)
- [Deep Learning for Sentiment Analysis : A Survey](https://refivu.com/en/papers/423bc94d-8ef5-42e2-a68f-87cb54c7636d-deep-learning-for-sentiment-analysis-a-survey.md)
- [CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation](https://refivu.com/en/papers/eb07d47d-3eb5-4fba-ba4e-7d3bd33335aa-codet5-identifier-aware-unified-pre-trained-encoder-decoder.md)
- [Stacked Attention Networks for Image Question Answering](https://refivu.com/en/papers/aa94a5f2-b4fb-441a-af4b-22eda9ad2985-stacked-attention-networks-for-image-question-answering.md)
- [A guide to convolution arithmetic for deep learning](https://refivu.com/en/papers/7690e8f8-368e-4a59-a827-7093c4415777-a-guide-to-convolution-arithmetic-for-deep-learning.md)
- [Activation Functions: Comparison of trends in Practice and Research for Deep Learning](https://refivu.com/en/papers/b7691c32-6640-47d3-9dda-c4586bd48272-activation-functions-comparison-of-trends-in-practice-and.md)
- [Explainable Artificial Intelligence: Understanding, Visualizing and Interpreting Deep Learning Models](https://refivu.com/en/papers/6bd22a78-4fb3-465f-b297-2113b18ee3f2-explainable-artificial-intelligence-understanding.md)
- [Learning Hand-Eye Coordination for Robotic Grasping with Deep Learning and Large-Scale Data Collection](https://refivu.com/en/papers/7027eeb7-fc1d-48f5-a7af-9efbaa9ad813-learning-hand-eye-coordination-for-robotic-grasping-with.md)
- [SCA-CNN: Spatial and Channel-wise Attention in Convolutional Networks for Image Captioning](https://refivu.com/en/papers/51e17bf0-d47d-4aca-8ce3-e07e4204a821-sca-cnn-spatial-and-channel-wise-attention-in.md)

## Terms in this paper

- [cosine similarity](https://refivu.com/en/terms/3baa01a8760d-cosine-similarity)
- [InfoNCE](https://refivu.com/en/terms/9909993ddc7f-infonce)
- [supervised fine-tuning (SFT)](https://refivu.com/en/terms/b08583cba2aa-supervised-fine-tuning-sft)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/d7cee9c8-e38d-4e30-b35b-f069db83f282-qwen3-embedding-advancing-text-embedding-and-reranking)
