Qwen releases Qwen3-VL-Embedding and Qwen3-VL-Reranker models for multimodal search. They process text, images, and videos, generating embeddings for retrieval and reranking for precision. Supporting 30+ languages, these models achieve state-of-the-art results in benchmarks like MMEB-v2.
点击下方名片关注AIGC Studio公众号!获取最新AI前沿应用/AIGC实践教程!
2025年6月,千问开源了面向文本的Qwen3-Embedding和Qwen3-ReRanker 模型系列,在多语言文本检索、聚类和分类等多项下游任务中取得了业界领先的性能,被社区开发者广泛使用。近日Qwen推出家族的最新成员:Qwen3-VL-Embedding 和 Qwen3-VL-Reranker模型系列,它们基于近期开源且功能强大的 Qwen3-VL 基础模型构建而成。该套件专为多模态信息检索和跨模态理解而设计,可接受包括文本、图像、屏幕截图和视频在内的多种输入,以及包含这些模态混合的输入。
Embedding 模型生成高维向量,可用于检索和聚类等广泛应用,而 Reranker 模型则旨在改进这些结果,从而建立最先进的多模态搜索的综合流程。
Qwen3-VL-Embedding-8B具有以下特性:
模型类型:多模态嵌入 支持的语言:30多种语言 支持的输入方式:文本、图像、屏幕截图、视频以及任意多模态组合(例如,文本+图像、文本+视频) 参数数量:8B 上下文长度:32k 嵌入维度:最大可达 4096,支持用户自定义输出维度,范围从 64 到 4096。
相关链接
模型:https://huggingface.co/Qwen/Qwen3-VL-Embedding-8B 代码:https://github.com/QwenLM/Qwen3-VL-Embedding 博客:https://qwen.ai/blog?id=qwen3-vl-embedding
核心特性
多模态通用性 两个模型系列均可在统一框架内处理包含文本、图像、截图和视频的输入。它们在图文检索、视频文本匹配、视觉问答(VQA)以及多模态内容聚类等多样化任务中达到了业界领先水平。
统一表示学习(Embedding) 通过充分利用Qwen3-VL基础模型的优势,Qwen3-VL-Embedding模型能够生成语义丰富的向量表示,在共享空间中同时捕获视觉和文本信息,从而实现高效的跨模态相似度计算和检索。
高精度重排序(Reranker) 我们同步提供Qwen3-VL-Reranker系列作为 Embedding模型的补充。Qwen3-VL-Reranker接收输入对(Query, Document), 其中查询和文档均可包含任意单一或混合模态——并输出精确的相关性分数。在实际检索场景中,Embedding和Reranker模型通常协同工作:Embedding模型负责初始召回阶段,Reranker模型负责重排序阶段,这种两阶段流程显著提升了最终检索精度。
卓越的实用性:继承Qwen3-VL的多语言能力,该系列支持超过30种语言,适合全球化应用。模型提供灵活的向量维度选择、可定制的任务指令,以及向量量化后的强劲性能。这些特性使开发者能够轻松将两个模型集成到现有流程中,用于需要强大跨语言和跨模态理解能力的应用场景。
模型概述
与文本Qwen3-Embedding和Qwen3-ReRanker模型系列类似,Qwen3-VL-Embedding 采用双塔架构,Qwen3-VL-Reranker采用单塔架构。我们设计了一套多阶段训练范式,充分发挥Qwen3-VL底座模型的通用多模态语义理解能力,为复杂、大规模的多模态检索任务提供高质量的语义表示和精确的重排序机制。
Embedding模型接收单模态或混合模态输入,并将其映射为高维语义向量。具体而言,我们提取基座模型最后一层中对应 [EOS] token 的隐藏状态向量,作为输入的最终语义表示。这种方法确保了大规模检索所需的高效独立编码能力。
Reranking模型接收输入对 (Query, Document) 并进行联合编码。它利用基座模型内的交叉注意力(Cross-Attention)机制,实现 Query 和 Document 之间更深层、更细粒度的跨模态交互和信息融合。模型最终通过预测两个特殊 token(yes 和 no)的生成概率来表达输入对的相关性分数。
评测结果
Qwen3-VL-Embedding
在MMEB-v2和MMTEB基准测试上评估了Qwen3-VL-Embedding 模型的性能。
Qwen3-VL-Embedding-8B模型在MMEB-V2上取得了业界领先的结果,超越了所有先前的开源模型和闭源商业服务。在不同检索模态的细分性能上,模型在图像、视觉文档和视频检索子任务中均取得了SOTA 结果。
在纯文本多语言MMTEB基准测试上,Qwen3-VL-Embedding模型与同等规模的纯文本 Qwen3-Embedding模型相比有少许的性能差距。与评测排行榜上其他同等规模的模型相比,它仍然展现出极具竞争力的性能表现。
Qwen3-VL-Reranker
使用了MMEB-v2和MMTEB检索基准中各子任务的检索数据集进行评测。对于视觉文档检索,采用了JinaVDR和ViDoRe v3数据集。
评测结果表明,所有Qwen3-VL-Reranker模型的性能均持续优于基础 Embedding模型和基线Reranker模型,其中8B 版本在大多数任务中达到了最佳性能。
使用示例
Embedding模型使用示例
from scripts.qwen3_vl_embedding import Qwen3VLEmbedder
import numpy as np
import torch
# Define a list of query texts
queries = [
{"text": "A woman playing with her dog on a beach at sunset."},
{"text": "Pet owner training dog outdoors near water."},
{"text": "Woman surfing on waves during a sunny day."},
{"text": "City skyline view from a high-rise building at night."}
]
# Define a list of document texts and images
documents = [
{"text": "A woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust."},
{"image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"},
{"text": "A woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust.", "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"}
]
# Specify the model path
model_name_or_path = "Qwen/qwen3-vl-embedding-2B"
# Initialize the Qwen3VLEmbedder model
model = Qwen3VLEmbedder(model_name_or_path=model_name_or_path)
# We recommend enabling flash_attention_2 for better acceleration and memory saving,
# model = Qwen3VLEmbedder(model_name_or_path=model_name_or_path, dtype=torch.float16, attn_implementation="flash_attention_2")
# Combine queries and documents into a single input list
inputs = queries + documents
embeddings = model.process(inputs)
# Compute similarity scores between query embeddings and document embeddings
similarity_scores = (embeddings[:4] @ embeddings[4:].T)
# Print out the similarity scores in a list format
print(similarity_scores.tolist())
# [[0.83203125, 0.74609375, 0.73046875], [0.5390625, 0.373046875, 0.48046875], [0.404296875, 0.326171875, 0.357421875], [0.1298828125, 0.06884765625, 0.10595703125]]
Reranking模型使用示例
from scripts.qwen3_vl_reranker import Qwen3VLReranker
import numpy as np
import torch
# Specify the model path
model_name_or_path = "Qwen/Qwen3-VL-Reranker-2B"
# Initialize the Qwen3VLEmbedder model
model = Qwen3VLReranker(model_name_or_path=model_name_or_path)
# We recommend enabling flash_attention_2 for better acceleration and memory saving,
# model = Qwen3VLReranker(model_name_or_path=model_name_or_path, dtype=torch.float16, attn_implementation="flash_attention_2")
# Combine queries and documents into a single input list
inputs = {
"instruction": "Retrieval relevant image or text with user's query",
"query": {"text": "A woman playing with her dog on a beach at sunset."},
"documents": [
{"text": "A woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust."},
{"image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"},
{"text": "A woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust.", "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"}
],
"fps": 1.0
}
scores = model.process(inputs)
print(scores)
# [0.8408790826797485, 0.6197134852409363, 0.7778129577636719]感谢你看到这里,添加小助手 AIGC_Tech 加入官方 AIGC读者交流群,下方扫码加入 AIGC Studio 星球,获取前沿AI应用、AIGC实践教程、大厂面试经验、AI学习路线以及IT类入门到精通学习资料等,欢迎一起交流学习💗~
没有评论:
发表评论