inference-xpu-pytorch 25.05

更新时间:
复制为 MD 格式

本文介绍inference-xpu-pytorch 25.05版本发布记录。

Main Features and Bug Fix Lists

Main Features

  • 基础镜像操作系统版本升级至Ubuntu24.04,Python版本升级至3.12,PPU SDK升级至v1.5.1

  • vLLM镜像vLLM版本升级至0.8.5。

  • SGLang镜像SGLang版本升级至 v0.4.6.post1

  • 支持Qwen2.5-Omni,LLama4,Qwen3 Dense、MOE 系列模型。

  • 支持 DeepSeek-V3/R1 W8A8-INT8模型。

  • 支持 DeepSeek FP8模型(W8A16)原生运行。

  • 性能优化,本版本针对 MOE 算子做了性能优化,从而进一步提升了 DeepSeek-V3/R1、Qwen3 MOE 系列模型的推理性能。

Bug Fix

  • 解决通过vLLM在线推理方式运行Qwen-vl模型失败的问题。

  • 解决通过vLLM在线推理方式运行Ovis2模型失败的问题。

Contents

inference-xpu-pytorch

inference-xpu-pytorch

镜像Tag

25.05-v1.5.1-vllm0.8.5-torch2.6-cu126-20250604

25.05-v1.5.1-sglang0.4.6.post1-torch2.6-cu126-20250528

应用场景

大模型推理

大模型推理

框架

pytorch

pytorch

Requirements

PPU SDK V1.5.1

PPU SDK V1.5.1

系统组件

  • Ubuntu 24.04

  • Python 3.12

  • Torch 2.6.0

  • CUDA 12.6

  • ACCL-P 1.5.1-9

  • EIC 1.3.8

  • accelerate 1.6.0

  • apex 0.1

  • vllm 0.8.5+cu126

  • transformers 4.51.3

  • flash-attn 2.5.6

  • ray 2.46.0

  • xformers 0.0.29.post1

  • triton 3.2.0

  • flashinfer-python 0.2.2.post1

  • xgrammar 0.1.18

  • Ubuntu 24.04

  • Python 3.12

  • Torch 2.6.0

  • CUDA 12.6

  • ACCL-P 1.5.1-9

  • EIC 1.3.8

  • accelerate 1.6.0

  • vllm 0.7.2+cu126

  • sglang 0.4.6.post1

  • sgl-kernel 0.1.0

  • flashinfer-python 0.2.3

  • transformers 4.51.3

  • flash-attn 2.5.6

  • ray 2.10.0

  • xformers 0.0.29.post1

  • triton 3.1.0

  • xgrammar 0.1.19

镜像Asset

说明

通过公网拉取ACS AI容器镜像需要先获取鉴权密钥。建议您使用VPC方式加速拉取AI容器镜像,减少镜像拉取的时间。

公网镜像

  • egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/inference-xpu-pytorch:25.05-v1.5.1-vllm0.8.5-torch2.6-cu126-20250604

  • egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/inference-xpu-pytorch:25.05-v1.5.1-sglang0.4.6.post1-torch2.6-cu126-20250528

VPC镜像

  • acs-registry-vpc.{region-id}.cr.aliyuncs.com/egslingjun/{image:tag}

    {region-id}为您使用的ACS产品所在的开服地域,比如:cn-beijing、cn-wulanchabu等。
    {image:tag}为实际镜像的名称和Tag。

E2E性能评估

vLLM在线推理模式下,控制TTFT < 3S并且TPOT < 100ms ,测试满足条件的最大并发量,对比吞吐:

  • DeepSeek-R1-bf16模型:真武810E单机Output Token ThroughputSDK1.5.0版本镜像的425%

  • DeepSeek-R1-w8a8-int8模型:真武810E单机Output Token Throughput 是bf16版本模型的190%

image.png

Quick Start

以下示例内容仅通过Docker方式拉取inference-xpu-pytorch镜像,并使用Qwen2.5-7B-Instruct模型测试推理服务。

说明

ACS中使用inference-xpu-pytorch镜像需要通过控制台创建工作负载界面的制品中心页面选取,或者通过YAML文件指定镜像引用。

  1. 拉取推理容器镜像。

    说明

    通过公网拉取ACS AI容器镜像需要先获取鉴权密钥。建议您使用VPC方式加速拉取AI容器镜像,减少镜像拉取的时间。

    docker pull egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/inference-xpu-pytorch:[tag]
  2. 下载modelscope格式的开源模型。

    pip install modelscope
    cd /mnt
    modelscope download --model Qwen/Qwen2.5-7B-Instruct --local_dir ./Qwen2.5-7B-Instruct
  3. 启动以下命令进入容器。

    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]
  4. 执行推理测试,测试vLLM推理对话功能。

    1. 启动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
    2. 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": "介绍一下深度学习。"}
          ]}'

      输出如下所示:

      image.png

      更多关于vLLM的使用方法请参见vLLM

使用建议

  • 使用本镜像运行DeepSeek R1(671B)、Qwen3模型,支持的量化方法包括:

    • vLLM 0.8.5:支持AWQ(w4a16)、GPTQ (w4a16、w8a16)、per-token/per-channel a8w8(int8)量化方案(在vLLM 0.8.5上运行通过AWQGPTQ量化的模型需要加--quantization moe_wna16)。

  • 暂时不支持PG1 SDK 1.5.1 Release Note中提到的DeepEPsailSHMEM功能,支持时间待定。

  • 建议配合“1.5.1”驱动使用本镜像获得最佳性能,设置方法请参考ACS GPU Pod指定GPU型号和驱动版本GPU驱动版本说明

Known Issues

  • Qwen3-235B-A22B模型性能将在下一个迭代版本中进一步优化。

  • DeepSeek R1模型

    • 测试DeepSeek模型 --max-model-len 设置需要小于80k,否则可能会在运行中出现OOM情况。

    • vLLM镜像会存在推理乱码情况,建议关闭prefill cahcing(增加--no-enable-prefix-caching选项)。

  • 量化问题

    • SGLang 0.4.6post1镜像的AWQ(w4a16)、GPTQ (w4a16、w8a16)方案尚未验证,per-token/per-channel a8w8(int8)量化方案不支持。

  • 稳定性问题

  • 性能问题:

    • MOE类大模型使用Autotune工具可以提升性能 ,VLLM支持通过硬件相关的fused_moe kernel配置文件启动kernel以提升性能的优化功能。