Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
Qwen2.5-VL_pytorch
Commits
4cd2a2ce
Commit
4cd2a2ce
authored
Jan 28, 2026
by
raojy
Browse files
updata
parent
f8829eaa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
18 deletions
+4
-18
README.md
README.md
+4
-18
No files found.
README.md
View file @
4cd2a2ce
...
...
@@ -4,7 +4,7 @@
[
Qwen2.5-VL
](
https://qwenlm.github.io/zh/blog/qwen2.5-vl/
)
## 模型
结构
## 模型
简介
模型结构:Qwen2.5-VL 延续了上一代 Qwen-VL 中 ViT 加 Qwen2 的串联结构,三个不同规模的模型都采用了 600M 规模大小的 VIT,支持图像和视频统一输入。使模型能更好地融合视觉和语言信息,提高对多模态数据的理解能力。
● 多模态旋转位置编码(M-ROPE):Qwen2.5-VL 采用的 M-ROPE 将旋转位置编码分解成时间、空间(高度和宽度)三部分,使大规模语言模型能同时捕捉和整合一维文本、二维视觉和三维视频的位置信息,赋予了模型强大的多模态处理和推理能力。
...
...
@@ -17,14 +17,6 @@
<img
src=
"./images/arch.png"
/>
</div>
## 算法原理
Qwen2.5-VL 从头开始训练了一个原生动态分辨率的 ViT,包括 CLIP、视觉-语言模型对齐和端到端训练等阶段。为了解决多模态大模型在训练和测试阶段 ViT 负载不均衡的问题,我们引入了窗口注意力机制,有效减少了 ViT 端的计算负担。在我们的 ViT 设置中,只有四层是全注意力层,其余层使用窗口注意力。最大窗口大小为 8x8,小于 8x8 的区域不需要填充,而是保持原始尺度,确保模型保持原生分辨率。此外,为了简化整体网络结构,我们使 ViT 架构与 LLMs 更加一致,采用了 RMSNorm 和 SwiGLU 结构。
<div
align=
center
>
<img
src=
"./images/theory.png"
/>
</div>
### 环境依赖
| 软件 | 版本 |
...
...
@@ -40,7 +32,7 @@ Qwen2.5-VL 从头开始训练了一个原生动态分辨率的 ViT,包括 CLIP
推荐使用镜像: harbor.sourcefind.cn:5443/dcu/admin/base/vllm:0.9.2-ubuntu22.04-dtk25.04.2-1226-das1.7-py3.10-20251226
-
挂载地址
`-v`
,
`{docker_name}`
和
`{docker_image_name}`
根据实际模型情况修改
-
挂载地址
`-v`
```
bash
docker run
-it
\
...
...
@@ -59,7 +51,7 @@ docker run -it \
-v
/path/your_code_data/:/path/your_code_data/
\
{
docker_image_name
}
bash
示例如下
(
展示到modelzoo上的内容,就是将上面的
{
docker_image_name
}{
docker_name
}
根据实际模型填写
)
:
示例如下:
docker run
-it
\
--shm-size
60g
\
--network
=
host
\
...
...
@@ -274,16 +266,11 @@ curl http://localhost:8000/v1/chat/completions \
]
}'
```
### 多卡推理
```
# 适用于72B模型
# 启动命令
python3 -m vllm.entrypoints.openai.api_server \
--model "Qwen/Qwen2.5-VL-72B-Instruct" \
vllm serve "/home/project/weight_cache/models--Qwen--Qwen2.5-VL-72B-Instruct/models--Qwen--Qwen2.5-VL-72B-Instruct/snapshots/89c86200743eec961a297729e7990e8f2ddbc4c5" \
--served-model-name "qwen-vl" \
--tensor-parallel-size 4 \
--gpu-memory-utilization 0.95 \
...
...
@@ -320,7 +307,6 @@ curl http://localhost:8000/v1/chat/completions \
"temperature": 0.7,
"top_p": 0.8
}'
```
### 效果展示
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment