Qwen2.5-VL 是 Qwen 的新旗舰视觉语言模型,也是上一代 Qwen2-VL 的重大飞跃。
Qwen2.5-VL主要特点
-
视觉理解事物:Qwen2.5-VL不仅能够熟练识别花、鸟、鱼、昆虫等常见物体,而且还能够分析图像中的文本、图表、图标、图形和布局。
-
代理性:Qwen2.5-VL直接扮演视觉代理的角色,具有推理和动态指挥工具的功能,可用于电脑和手机。
-
理解长视频并捕捉事件:Qwen2.5-VL 可以理解超过 1 小时的视频,这次它还具有通过精确定位相关视频片段来捕捉事件的新功能。
-
能够进行不同格式的视觉定位:Qwen2.5-VL 可以通过生成边界框或点来准确定位图像中的对象,并且可以为坐标和属性提供稳定的 JSON 输出。
-
生成结构化输出:对于发票、表格、表格等扫描件数据,Qwen2.5-VL 支持其内容的结构化输出,有利于金融、商业等领域的用途。
相关链接
-
主页:https://chat.qwenlm.ai/
-
GitHub:https://github.com/QwenLM/Qwen2-VL
-
Huggingface:https://huggingface.co/collections/Qwen/qwen25-vl-6795ffac22b334a837c0f9a5
-
ModelScope: https://modelscope.cn/collections/Qwen25-VL-58fbb5d31f1d47
表现
我们用 SOTA 模型以及类似模型大小的最佳模型来评估我们的模型。就旗舰模型 Qwen2.5-VL-72B-Instruct 而言,它在一系列涵盖领域和任务的基准测试中取得了有竞争力的表现,包括大学水平的问题、数学、文档理解、一般问答、数学、视频理解和视觉代理。值得注意的是,Qwen2.5-VL 在理解文档和图表方面取得了显著的优势,并且它能够充当视觉代理而无需针对特定任务进行微调。
在较小的模型方面,Qwen2.5-VL-7B-Instruct 在多项任务上的表现优于 GPT-4o-mini,而作为边缘 AI 解决方案的 Qwen2.5-VL-3B 甚至优于我们上一版本 Qwen2-VL 的 7B 模型。
模型功能
1. 全球范围的图像识别
Qwen2.5-VL通用图像识别能力大幅提升,图像类别扩展至超大量,不仅包括植物、动物、名山大川地标,还包括影视IP以及种类丰富的商品。 - 示例:景点识别 这些景点是什么?请给出它们的中文和英文名称。
- Qwen2.5-VL
```
这些景点是:左上:吉萨大金字塔(埃及的吉萨大金字塔)
右上:中国的长城
左下:自由女神像(美国的自由女神像)
右下:中国的秦始皇兵马俑
```
2. 精确的物体接地
Qwen2.5-VL 利用边界框和基于点的表示进行定位,实现分层定位和标准化 JSON 输出。这种增强的定位能力为视觉推理奠定了基础。
-
检测图像中的所有摩托车手并以坐标形式返回其位置。输出格式应为 {“bbox_2d”: [x1, y1, x2, y2], “label”: “motorcyclist”, “sub_label”: “wearing helmat” # or “not wearing helmat”}。
[{"bbox_2d": [341, 258, 397, 360], "label": "motorcyclist", "sub_label": "not wearing helmat "},{"bbox_2d": [212, 332, 274, 448], "label": "motorcyclist", "sub_label": "not wearing helmat "},{"bbox_2d": [66, 124, 112, 198], "label": "motorcyclist", "sub_label": "not wearing helmat "},{"bbox_2d": [5, 235, 63, 320], "label": "motorcyclist", "sub_label": "wearing helmat "} ]
3.增强文本识别和理解
Qwen2.5-VL将OCR识别能力提升到全新高度,多场景、多语言、多方向的文字识别和文本本地化性能增强,信息提取能力大幅提升,满足资质审核、金融业务等领域日益提升的数字化、智能化需求。
-
读取图片中所有文字,按行输出。
-
Qwen2.5-VL回答:平安喜乐 八方来财 顺风顺 水顺财神 暴富 大吉诸事皆顺 福时来运转 发财如意 有钱有势 有前程 好运来
4. 强大的文档解析功能
Qwen2.5-VL 设计了一种独特的文档解析格式,称为 QwenVL HTML 格式,该格式基于 HTML 提取布局信息。QwenVL HTML 可以在各种场景中进行文档解析,例如杂志、研究论文、网页,甚至移动端截图。
<html>
<body>
<h1 data-bbox="879 283 1605 348">Qwen2.5 Technical Report</h1>
<p data-bbox="1124 406 1360 456"></p>
<address class="author"><p>Qwen Team</p></address>
<div class="image" data-bbox="778 491 850 541"><img data-bbox="778 491 850 541"/></div>
<p data-bbox="885 491 1460 541">https://huggingface.co/Qwen</p>
<div class="image" data-bbox="778 541 850 589"><img data-bbox="778 541 850 589"/></div>
<p data-bbox="885 541 1708 589">https://modelscope.cn/organization/qwen</p>
<div class="image" data-bbox="792 589 850 639"><img data-bbox="792 589 850 639"/></div>
<p data-bbox="885 589 1584 639">https://github.com/QwenLM/Qwen2.5</p>
<h2 data-bbox="1143 681 1344 733">Abstract</h2>
<p data-bbox="434 785 2050 1252">In this report, we introduce Qwen2.5, a comprehensive series of large language models (LLMs) designed to meet diverse needs. Compared to previous iterations, Qwen 2.5 has been significantly improved during both the pre-training and post-training stages. In terms of pre-training, we have scaled the high-quality pre-training datasets from the previous 7 trillion tokens to 18 trillion tokens. This provides a strong foundation for common sense, expert knowledge, and reasoning capabilities. In terms of post-training, we implement intricate supervised finetuning with over 1 million samples, as well as multistage reinforcement learning, including offline learning DPO and online learning GRPO. Post-training techniques significantly enhance human preference, and notably improve long text generation, structural data analysis, and instruction following.</p>
<p data-bbox="434 1262 2050 1587">To handle diverse and varied use cases effectively, we present Qwen2.5 LLM series in rich configurations. The open-weight offerings include base models and instruction-tuned models in sizes of $0.5 \mathrm{~B}, 1.5 \mathrm{~B}, 3 \mathrm{~B}, 7 \mathrm{~B}, 14 \mathrm{~B}, 32 \mathrm{~B}$, and $72 \mathrm{~B}$ parameters. Quantized versions of the instruction-tuned models are also provided. Over 100 models can be accessed from Hugging Face Hub, ModelScope, and Kaggle. In addition, for hosted solutions, the proprietary models currently include two mixture-of-experts (MoE) variants: Qwen2.5-Turbo and Qwen2.5-Plus, both available from Alibaba Cloud Model Studio.</p>
<p data-bbox="434 1587 2050 2052">Qwen2.5 has demonstrated top-tier performance on a wide range of benchmarks evaluating language understanding, reasoning, mathematics, coding, human preference alignment, etc. Specifically, the open-weight flagship Qwen2.5-72B-Instruct outperforms a number of open and proprietary models and demonstrates competitive performance to the state-of-the-art open-weight model, Llama-3-405B-Instruct, which is around 5 times larger. Qwen2.5-Turbo and Qwen2.5-Plus offer superior cost-effectiveness while performing competitively against GPT-4o-mini and GPT-4o respectively. Additionally, as the foundation, Qwen2.5 models have been instrumental in training specialized models such as Qwen2.5-Math (Yang et al., 2024b), Qwen2.5-Coder (Hui et al., 2024), QwQ (Qwen Team, 2024d), and multimodal models.</p>
<div class="image" data-bbox="408 2275 2086 2800"><img data-bbox="408 2275 2086 2800"/></div>
<p data-bbox="289 2864 2202 3058">Figure 1: In the iterative development of the Qwen series, data scaling has played a crucial role. Qwen 2.5, which leverages 18 trillion tokens for pre-training, has demonstrated the most advanced capabilities within the Qwen series, especially in terms of domain expertise, underscoring the importance of scale together with mixture in enhancing the model’s capabilities.</p>
</body>
</html>
5. 增强视频理解能力
Qwen2.5-VL 的视频理解能力全面升级,在时序处理方面,我们引入了动态帧率(FPS)训练和绝对时间编码技术,使得模型不仅能够支持小时级超长视频理解,还能实现秒级事件定位,能够精准理解数小时级长视频内容,搜索视频中的特定事件,总结不同时间段的关键点,帮助用户快速高效地提取视频中蕴含的关键信息。
模型更新
Qwen2.5-VL相较于Qwen2-VL,增强了模型对时间和空间尺度的感知,并进一步简化了网络结构,提高模型效率。
时间和图像大小的感知
在空间维度上,Qwen2.5-VL不仅能将不同大小的图片动态转换为不同长度的token,还直接用图片的实际尺寸尺度来表示检测框、点等坐标,而无需进行传统的坐标归一化,让模型能够直接学习到图片的尺度。在时间维度上,引入了动态FPS(Frames Per Second)训练和绝对时间编码,将mRoPE的id直接与时间的快慢对齐,让模型能够通过时间维度id的间隔来学习到时间的节奏。
更简洁高效的视觉编码器
视觉编码器在多模态大型模型中起着至关重要的作用。我们从头开始训练了一个原生动态分辨率 ViT,包括 CLIP、视觉语言模型对齐和端到端训练阶段。为了解决多模态大型模型训练和测试阶段 ViT 负载不平衡的问题,我们引入了窗口注意,以有效减少 ViT 端的计算负载。在我们的 ViT 设置中,只有四层是全注意层,其余层使用窗口注意。最大窗口大小为 8x8,小于 8x8 的区域不需要填充;相反,它们保留其原始比例,确保模型保持原生分辨率。此外,为了简化整体网络结构,我们通过采用 RMNSorm 和 SwiGLU 结构使 ViT 架构与 LLM 更加一致。
下一步
在不久的将来,我们将进一步增强模型的解决问题和推理能力,同时融入更多模态。这将使模型更加智能,并使我们朝着能够处理多种类型输入和任务的集成式全能模型迈进。