Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Models
arXiv ↗PDF ↗Paper ↗Website ↗Code ↗
TL;DR. Qwen3 Embedding is a family of six open models (Apache 2.0): embedders and rerankers at 0.6B, 4B and 8B, all initialised from Qwen3 LLMs. The embedders keep causal attention, pool the last-layer state of the end-of-text token, and train in three steps: weak supervision on about 150M synthetic pairs written by Qwen3-32B, fine-tuning on about 7M labelled plus 12M filtered synthetic pairs, and slerp merging of checkpoints. The rerankers are pointwise yes/no classifiers trained with SFT and merging. Qwen3-Embedding-8B reports 70.58 Mean(Task) on MMTEB, then the highest mean on the leaderboard.
Why it matters now. These are among the most-used open retrieval models in 2025 RAG and agent stacks, and they are a common first stage in deep-research experiments, including as teachers for smaller models such as Jasper. The report is short, but it shows a whole first-stage + reranker stack built from one LLM family, and its ablation quantifies how much synthetic weak supervision and model merging matter.
Key idea
Section titled “Key idea”Embedder. For an instruction , query and document , the query input is ‹instruction› ‹query›<|endoftext|>, documents are encoded without instruction, and the embedding is the final-layer hidden state at the end token. Matryoshka (MRL) training lets users truncate dimensions. The InfoNCE normaliser includes hard negatives, in-batch documents, in-batch queries and document–document pairs, each with a false-negative mask:
where if the score exceeds or is the positive, and 1 otherwise. The loss is averaged over the batch.
Reranker. The instruction, query and document go into a chat template whose system prompt asks for “yes” or “no”. The score is the softmax over the two next-token logits, , and training is SFT on the label token: .
Data. Qwen3-32B writes about 150M pairs for retrieval, bitext mining, classification and STS. For retrieval, each document from Qwen3’s multilingual pretraining corpus is first matched to five candidate personas (from Persona Hub), and the LLM picks a persona, question type (keywords, knowledge, summary, yes/no, background) and difficulty (high school to PhD) before writing a query of given length and language. Pairs with cosine above 0.7 (about 12M) are kept for fine-tuning alongside about 7M labelled pairs (MS MARCO, NQ, HotpotQA, NLI, DuReader, T2-Ranking, MIRACL, MLDR, Mr. TyDi, Multi-CPR, CodeSearchNet and others).
Merging. Checkpoints saved during fine-tuning are combined by spherical linear interpolation (slerp). Rerankers skip the weak stage.
Key results
Section titled “Key results”Embedding, Mean(Task) (paper Tables 2 and 3; baseline scores copied from the MTEB leaderboard on June 4, 2025).
| Model | Size | MMTEB | MMTEB Retrieval | MTEB (eng, v2) | CMTEB | MTEB (Code) |
|---|---|---|---|---|---|---|
| BGE-M3 | 0.6B | 59.56 | 54.60 | — | — | — |
| multilingual-e5-large-instruct | 0.6B | 63.22 | 57.12 | 65.53 | — | 65.0 |
| Gemini Embedding | — | 68.37 | 67.71 | 73.30 | — | 74.66 |
| Qwen3-Embedding-0.6B | 0.6B | 64.33 | 64.64 | 70.70 | 66.33 | 75.41 |
| Qwen3-Embedding-4B | 4B | 69.45 | 69.60 | 74.60 | 72.26 | 80.06 |
| Qwen3-Embedding-8B | 8B | 70.58 | 70.88 | 75.22 | 73.83 | 80.68 |
Reranking the top 100 from Qwen3-Embedding-0.6B (Table 4; each benchmark’s default metric, as reported):
| Model | MTEB-R | CMTEB-R | MMTEB-R | MLDR | FollowIR |
|---|---|---|---|---|---|
| Qwen3-Embedding-0.6B (no rerank) | 61.82 | 71.02 | 64.64 | 50.26 | 5.09 |
| BGE-reranker-v2-m3 (0.6B) | 57.03 | 72.16 | 58.36 | 59.51 | −0.01 |
| gte-multilingual-reranker-base (0.3B) | 59.51 | 74.08 | 59.44 | 66.33 | −1.64 |
| Qwen3-Reranker-0.6B | 65.80 | 71.31 | 66.36 | 67.28 | 5.41 |
| Qwen3-Reranker-4B | 69.76 | 75.94 | 72.74 | 69.97 | 14.84 |
| Qwen3-Reranker-8B | 69.02 | 77.45 | 72.94 | 70.19 | 8.05 |
Limitations and open questions
Section titled “Limitations and open questions”- Zero-shot status is unstated. The SFT mix includes training splits of datasets that appear in the evaluated benchmarks.
- Thin ablations. Only the 0.6B embedder is ablated, with one run per setting; the loss, mask and persona prompts are not ablated, and reranker training is not analysed.
- No cost reporting. No encoding or reranking latency, and no study of MRL truncation quality.
- Reranker scaling is uneven. 4B beats 8B on some benchmarks, which a single run cannot explain.
- Hyperparameters are sparse. Temperature, batch sizes, step counts and merge weights are not given.
Connections
Section titled “Connections”- Lineage: E5-Mistral (last-token pooling, synthetic data), GritLM, NV-Embed.
- Rerankers: monoT5 (token-logit relevance), Rank1 (reasoning rerankers), reranker map.
- Same leaderboard: Llama-Embed-Nemotron-8B, Gemini Embedding, Jasper-Token-Compression (a distilled 0.6B student), MTEB / MMTEB.
- Use in agents: BrowseComp-Plus, Deep research is a retrieval problem.
Questions to think through
These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.
- Derive / compute
The Qwen3 reranker scores a (query, document) pair from the next-token logits for "yes" and "no": score = exp(z_yes) / (exp(z_yes) + exp(z_no)). (a) Show that the score depends only on z_yes − z_no and write it as a sigmoid. (b) Document A has logits (2.0, −1.0) and document B has (4.0, 2.0). Which ranks higher, and why does B's larger "yes" logit not matter? (c) Reranking the top 100 for one query with 512-token query–document inputs costs about 2 · params · tokens FLOPs. Estimate the per-query time for the 0.6B and 8B rerankers on a GPU sustaining 125 TFLOP/s.
What a strong answer covers
- (a) Divide numerator and denominator by exp(z_yes): score = 1 / (1 + exp(−(z_yes − z_no))) = σ(z_yes − z_no). The other vocabulary logits play no role.
- (b) A: σ(3) ≈ 0.953; B: σ(2) ≈ 0.881. A ranks higher. A shared shift of both logits cancels; only the log-odds of yes over no is used.
- (c) Tokens: 100 · 512 = 51,200. 8B: 2 · 8e9 · 51,200 ≈ 8.2e14 FLOPs, about 6.6 s at 125 TFLOP/s. 0.6B: about 6.1e13 FLOPs, about 0.5 s. The 4B model is about 3.3 s.
- Implication: pointwise cross-encoders scale linearly in candidate count and model size, so the 8B reranker suits small candidate sets or offline use; the 0.6B reranker is the practical default.
- The paper writes the formula with P inside the exponent; in practice the logits are used, which gives the same ranking.
- Mechanism
Qwen3's embedding loss puts five kinds of terms in the InfoNCE denominator for query qᵢ: the positive, K hard negatives, other in-batch queries qⱼ, other in-batch documents compared with the positive dᵢ⁺, and other in-batch documents compared with qᵢ. Each non-positive term is multiplied by a mask that drops it when its score exceeds s(qᵢ, dᵢ⁺) + 0.1 or when the document is the positive itself. (a) Explain what the query–query and document–document terms train for. (b) With s(qᵢ, dᵢ⁺) = 0.62, which of these in-batch scores are masked: 0.75, 0.70, 0.40? (c) Contrast this mask with the NV-Retriever-style 95% rule used for mining.
What a strong answer covers
- (a) Query–query ("same-tower") terms keep different queries apart, which helps symmetric tasks such as STS and clustering where both sides are the same kind of text. Document–document terms keep the positive apart from other documents, shaping the document space directly.
- (b) Threshold 0.62 + 0.1 = 0.72: 0.75 is masked (likely a false negative or duplicate); 0.70 and 0.40 stay in the denominator.
- The mask is applied per batch at training time, using the current model's scores, so it adapts as the model changes; it also applies to the mined hard negatives.
- (c) The 95% rule is relative and applied offline with a teacher during mining (drop candidates scoring above 0.95 · s⁺); Qwen3's mask is additive (+0.1 above s⁺) and online. The additive margin is permissive: a negative scoring higher than the positive by up to 0.1 still counts.
- Llama-Embed-Nemotron later reports, on a 1B ablation, that this richer denominator does not beat hard negatives alone, so the extra terms are a design choice, not a settled gain.
- What if…
Table 5 trains Qwen3-Embedding-0.6B four ways: synthetic weak stage only; no synthetic weak stage; no model merging; and the full recipe. Report the MMTEB and MTEB(eng, v2) numbers, rank the contributions of the two ingredients, and say what the table cannot tell you.
What a strong answer covers
- MMTEB / MTEB(eng, v2) Mean(Task): only synthetic 58.49 / 60.63; without synthetic weak stage 61.21 / 65.59; without merging 62.56 / 68.18; full 64.33 / 70.70.
- Removing the synthetic weak stage costs 3.1 points on MMTEB and 5.1 on English; removing merging costs 1.8 and 2.5. Both matter; the weak stage matters more.
- The synthetic-only model already reaches 58.49 MMTEB, close to BGE-M3's 59.56, with no labelled data.
- Limits: only the 0.6B size; no ablation of the 12M filtered synthetic pairs in SFT, the mask, or the persona-based prompts; "without merging" uses data sampling to balance tasks, so it changes two things at once; no seeds or variance.
- Critique
The report claims state-of-the-art results "across diverse benchmarks" and that its rerankers "surpass all baseline reranking methods". As a reviewer from the IR side, identify problems with (i) training–evaluation overlap, (ii) the reranker comparison and (iii) the leaderboard comparison, and propose fixes.
What a strong answer covers
- (i) The SFT data lists MS MARCO, NQ, HotpotQA, MIRACL, MLDR, Mr. TyDi, DuReader and T2-Ranking, whose train splits correspond to MTEB, CMTEB and MMTEB evaluation sets; the report gives no zero-shot percentage. MLDR appears both in training and as a reranking benchmark.
- (ii) All rerankers rerank the same Qwen3-Embedding-0.6B top 100, which is fair for comparing rerankers, but the baselines are 0.3B to 0.6B models while Qwen3-Reranker goes to 8B; size-matched, the 0.6B reranker loses to gte-multilingual-reranker on CMTEB-R (71.31 vs 74.08). No latency is reported.
- Bigger is not monotonic: Reranker-4B beats 8B on MTEB-R (69.76 vs 69.02) and FollowIR (14.84 vs 8.05), which suggests variance or tuning effects that a single run cannot resolve.
- (iii) Baseline scores are copied from the MTEB leaderboard on June 4, 2025; rankings by mean differ from Borda rankings (Llama-Embed-Nemotron later ranks above Qwen3-8B by Borda despite a lower mean).
- Fixes: report a zero-shot percentage and a held-out subset; size- and latency-matched reranker baselines; multiple seeds for rerankers; held-out retrieval such as BRIGHT or new TREC tracks.
- Design
You are building the retriever for a deep-research agent over a 100K-document web corpus (as in BrowseComp-Plus), with about 20 search calls per question and a 2-second budget per call on one GPU. Choose sizes for the Qwen3 embedder and reranker, the candidate depth k, and the instructions, and say what you would measure.
What a strong answer covers
- Index: 100K documents is small; even 8B embeddings (4096-d, 16 KB each in fp32) need about 1.6 GB, so index once with the 8B or 4B embedder and use MRL truncation only if memory demands it.
- Query encoding is cheap (one short sequence). Reranking dominates: at about 512 tokens per pair, the 0.6B reranker handles about 100 candidates in 0.5 s; the 4B handles about 30 in 1 s; the 8B fits only about 20 to 30 within budget.
- Agent queries are short, keyword-like and iterative; write a retrieval instruction matching that style and test it against the default, since the models are instruction-aware.
- Measure Recall@k of the first stage at k = 20, 50, 100 against gold evidence documents, then end-to-end answer accuracy and search calls per question with and without reranking.
- BrowseComp-Plus reports that a stronger retriever both raises accuracy and reduces the number of search calls, so retrieval quality pays twice.
- Connect
Qwen3 Embedding keeps causal attention and pools the final EOS token, while Llama-Embed-Nemotron removes the causal mask and mean-pools. Its reranker frames relevance as a yes/no next-token prediction. Relate each choice to an earlier system in the IR literature and say which design an IR lab could most cheaply reuse.
What a strong answer covers
- Last-token pooling with causal attention follows E5-Mistral and the earlier GTE-Qwen2 models: with causal masking only the final token has seen the whole input. Bidirectional conversion follows LLM2Vec and NV-Embed.
- The yes/no reranker follows monoT5, which scores relevance from "true" vs "false" token logits; the chat template with an empty think block echoes reasoning rerankers such as Rank1 but does not use reasoning at scoring time.
- Synthetic queries from a strong LLM follow the E5-Mistral and Gecko line; Qwen3 adds persona-based configuration to diversify query types and difficulty.
- Cheapest to reuse: the pointwise yes/no fine-tuning of an open LLM on existing qrels (no weak stage needed, as the rerankers show) and checkpoint merging, which costs nothing at inference.