Files
enginex-ascend-910-vllm/README.md
luopingyi a05ba4e086 Update README.md
新增模型结果 [2025.10.23]
2025-10-23 10:03:38 +08:00

116 lines
5.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# enginex-ascend-910-vllm
运行于【昇腾-910】系列算力卡的【文本生成】引擎基于 vLLM 引擎进行架构特别适配优化,支持 Qwen、DeepSeek、Llama 等最新开源模型
## 镜像
Latest RC Version: git.modelhub.org.cn:9443/enginex-ascend/vllm-ascend:v0.11.0rc0
## 总览
vLLM 昇腾插件 (`vllm-ascend`) 是一个由社区维护的让vLLM在Ascend NPU无缝运行的后端插件。
此插件是 vLLM 社区中支持昇腾后端的推荐方式。它遵循[[RFC]: Hardware pluggable](https://github.com/vllm-project/vllm/issues/11162)所述原则通过解耦的方式提供了vLLM对Ascend NPU的支持。
使用 vLLM 昇腾插件可以让类Transformer、混合专家(MOE)、嵌入、多模态等流行的大语言模型在 Ascend NPU 上无缝运行。
## 准备
- 硬件Atlas 800I A2 Inference系列、Atlas A2 Training系列、Atlas 800I A3 Inference系列、Atlas A3 Training系列、Atlas 300I Duo实验性支持
- 操作系统Linux
- 软件:
* Python >= 3.9, < 3.12
* CANN >= 8.2.rc1 (Ascend HDK 版本参考[这里](https://www.hiascend.com/document/detail/zh/canncommercial/82RC1/releasenote/releasenote_0000.html))
* PyTorch >= 2.7.1, torch-npu >= 2.7.1.dev20250724
* vLLM (与vllm-ascend版本一致)
## QuickStart
1、从 modelscope上下载支持的模型例如 Qwen/Qwen3-8B
```python
modelscope download --model Qwen/Qwen3-8B README.md --local_dir ./model
```
2、使用Dockerfile生成镜像
从仓库的【软件包】栏目下载基础镜像 git.modelhub.org.cn:9443/enginex-ascend/cann:8.2.rc1-910b-ubuntu22.04-py3.11
使用 Dockerfile 生成 镜像
```python
docker build -f Dockerfile -t ascend-vllm:dev .
```
3、启动docker
```python
docker run -it --rm \
-p 10086:80 \
--name test-ascend-my-1 \
-v `pwd`:/host \
-e ASCEND_VISIBLE_DEVICES=1 \
--device /dev/davinci1:/dev/davinci0 \
--device /dev/davinci_manager \
--device /dev/devmm_svm \
--device /dev/hisi_hdc \
-v ./model:/model \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
-v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
-v /etc/ascend_install.info:/etc/ascend_install.info \
--privileged \
ascend-vllm:dev \
vllm serve /model --served-model-name qwen3-8b --max-model-len 4096
```
4、测试服务
```python
curl -X POST http://localhost:10086/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-8b",
"messages": [{"role": "user", "content": "你好"}],
"stream": true
}'
```
## 测试数据集
视觉多模态任务数据集见 vlm-dataset
## 昇腾-910系列上模型运行测试结果
在昇腾-910系列上对部分模型进行适配测试方式为在 Nvidia A100 和 昇腾-910B4 加速卡上对对应数据集进行测试,获取运行时间
### 视觉多模态
| 模型名称 | 昇腾-910B4运行时间/s | Nvidia A100运行时间/s |
| ----------------------- | -------------- | ----------------- |
| Qwen2.5-VL-3B-Instruct | 7.5688 | 3.4735 |
| Qwen2.5-VL-7B-Instruct | 10.6117 | 4.5430 |
| Qwen2-VL-7B-Instruct | 4.3974 | 2.7123 |
| Qwen2-VL-2B-Instruct | 7.9134 | 2.6749 |
| InternVL2_5-1B-MPO | 3.6658 | 1.9166 |
| InternVL2-8B | 15.8963 | 3.7747 |
| InternVL2_5-2B | 11.3071 | 2.3767 |
| InternVL2_5-1B | 10.9917 | 2.0399 |
| InternVL2_5-4B | 11.0892 | 2.6751 |
| InternVL2-1B | 4.6318 | 2.0094 |
| InternVL2_5-8B-MPO | 10.7414 | 2.6034 |
| Phi-3.5-vision-instruct | 14.5275 | 3.4563 |
| MiniCPM-V-4_5 | 31.9896 | 3.4504 |
| InternVL3-1B-hf | 19.9975 | 2.8482 |
| InternVL3-8B-Instruct | 9.6205 | 2.4711 |
| InternVL3-2B-hf | 17.7860 | 3.0497 |
| InternVL3-9B | 13.1422 | 3.7643 |
| MiniCPM-V-4 | 13.7100 | 3.7743 |
| llava-1.5-7b-hf | 8.8733 | 2.5678 |
| MiMo-VL-7B-RL | 28.3977 | 8.8021 |
| InternVL2-4B | 29.3529 | 7.0642 |
| Ovis2-1B | 7.2425 | 2.3312 |
| Ovis2-4B | 7.7620 | 2.8215 |
| Ovis2.5-2B | 36.8895 | 12.5388 |
| Ovis1.6-Gemma2-9B | 19.6222 | 8.7423 |
### 统一多模态(暂时用视觉多模态的数据集测试)
| 模型名称 | 昇腾-910B4运行时间/s | Nvidia A100运行时间/s |
| ----------------------- | -------------- | ----------------- |
| Qwen2.5-Omni-3B | 13.9121 | 10.6149 |
| Qwen2.5-Omni-7B | 12.8182 | 4.3004 |