inference-xpu-pytorch 25.02
本文介绍inference-xpu-pytorch 25.02版本发布记录。
Main Features and Bug Fix Lists
Main Features
基础镜像升级PG1 SDK至1.4.2。
vLLM版本升级至v0.7.2。
支持DeepSeek模型。
发布SGLang v0.4.2 + CUDA12.3镜像。
支持集合通信库ACCL-P 1.4.0-7。
Bug Fix
修改vLLM测试时版本显示问题。
修复vLLM加载LoRA且开启TP并行时custom allreduce kernel会出现hang的问题。
镜像Asset
通过公网拉取ACS AI容器镜像需要先获取鉴权密钥。建议您使用VPC方式加速拉取AI容器镜像,减少镜像拉取的时间。
公网镜像
egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/inference-xpu-pytorch:25.02-v1.4.2-vllm0.7.2-torch2.5-cuda12.3-20250304
egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/inference-xpu-pytorch:25.02-v1.4.2-vllm0.6.4.post1-sglang0.4.2-torch2.5-cuda12.3-20250304
VPC镜像
acs-registry-vpc.{region-id}.cr.aliyuncs.com/egslingjun/{image:tag}
{region-id}为您使用的ACS产品所在的开服地域,比如:cn-beijing、cn-wulanchabu等。{image:tag}为实际镜像的名称和Tag。
镜像组件列表
25.02版本 | inference-xpu-pytorch | inference-xpu-pytorch |
镜像Tag | 25.02-v1.4.2-vllm0.7.2-torch2.5-cuda12.3-20250304 | 25.02-v1.4.2-vllm0.6.4.post1-sglang0.4.2-torch2.5-cuda12.3-20250304 |
应用场景 | 大模型推理 | 大模型推理 |
框架 | pytorch | pytorch |
Requirements | PG1 SDK v1.4.2 | PG1 SDK v1.4.2 |
系统组件 |
|
|
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
DeepSeek
测试DeepSeek模型
--max-model-len设置需要小于80000,否则可能会在运行中出现OOM。SGLang不支持跑INT8量化模型。
性能问题
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量化下速度非常慢,还没有进行PG1适配与优化,支持计划待定。
稳定性问题
vLLM多卡推理结束后会随机出现进程退出错误的社区已知问题,详见开源社区的issue。