inference-xpu-pytorch 25.01
本文介绍inference-xpu-pytorch 25.01版本发布记录。
Main Features and Bug Fix Lists
Main Features
基础镜像升级PPU SDK至1.4.1。
vLLM版本升级至v0.6.4.post1。
torch版本升级至2.5.1。
Bug Fix
无
镜像Asset
通过公网拉取ACS AI容器镜像需要先获取鉴权密钥。建议您使用VPC方式加速拉取AI容器镜像,减少镜像拉取的时间。
公网镜像
egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/inference-xpu-pytorch:25.01-v1.4.1-vllm0.6.4.post1-torch2.5-cuda12.3-20250115
VPC镜像
acs-registry-vpc.{region-id}.cr.aliyuncs.com/egslingjun/{image:tag}
{region-id}为您使用的ACS产品所在的开服地域,比如:cn-beijing、cn-wulanchabu等。{image:tag}为实际镜像的名称和Tag。
镜像组件列表
25.01版本 | inference-xpu-pytorch |
应用场景 | 大模型推理 |
框架 | pytorch |
Requirements | PPU SDK v1.4.1 |
系统组件 |
|
Quick Start
以下示例内容仅通过Docker方式拉取inference-xpu-pytorch镜像,并使用Qwen2.5-7B-Instruct模型测试推理服务。
在ACS中使用inference-xpu-pytorch镜像需要通过控制台创建工作负载界面的制品中心页面选取,或者通过YAML文件指定镜像引用。
在ACS环境下使用xpu大模型推理镜像的使用指导,请参见ACS集群形态的LLM大模型推理镜像使用指导。
在ACS环境下部署DeepSeek推理服务的使用指导,请参见使用ACS快速部署运行在PG1上的DeepSeek V3/R1推理服务。
拉取推理容器镜像。
说明通过公网拉取ACS AI容器镜像需要先获取鉴权密钥。建议您使用VPC方式加速拉取AI容器镜像,减少镜像拉取的时间。
docker pull egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/inference-xpu-pytorch:[tag]下载modelscope格式的开源模型。
pip install modelscope cd /mnt modelscope download --model Qwen/Qwen2.5-7B-Instruct --local_dir ./Qwen2.5-7B-Instruct启动以下命令进入容器。
docker run -d -t --network=host --privileged --init --ipc=host \ --ulimit memlock=-1 --ulimit stack=67108864 \ -v /mnt/:/mnt/ \ egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/inference-xpu-pytorch:[tag]执行推理测试,测试vLLM推理对话功能。
启动Sever服务。
python3 -m vllm.entrypoints.openai.api_server \ --model /mnt/Qwen2.5-7B-Instruct \ --trust-remote-code --disable-custom-all-reduce \ --tensor-parallel-size 1在Client端进行测试。
curl http://localhost:8000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "/mnt/Qwen2.5-7B-Instruct", "messages": [ {"role": "system", "content": "你是个友善的AI助手。"}, {"role": "user", "content": "介绍一下深度学习。"} ]}'输出如下所示:

更多关于vLLM的使用方法请参见vLLM。
Known Issues
性能问题
MOE类大模型使用Autotune工具可以提升性能 ,VLLM支持通过硬件相关的fused_moe kernel配置文件启动kernel以提升性能的优化功能。
量化问题
VLLM默认使用Marlin Kernel对GPTQ/AWQ/W8A8/WOQ进行量化推理加速,可以通过显示指定quantization的方法来使用vllm原本的Marlin/W8A8/awq/gptq等量化推理kernel,例如可以指定使用gptq_acext/awq_acext来做量化推理,但是acext目前不支持act_order=True的量化,以及GPTQ-Int8量化权重,下个版本优化。
VLLM使用vllm-flash-attn/xformers/flashinfer作为attention的后端,默认使用vllm-flash-attn性能尚未超过GPU版本,下个版本优化VLLM量化A8W8对接acext库实现,性能需要持续优化。
目前FP8量化下速度非常慢,还没有进行PPU适配与优化,支持计划待定。
稳定性问题
VLLM多卡推理结束后会随机出现进程退出错误的社区已知问题。详细内容,请参见开源社区。