llm-inference-xpu 24.11

更新时间:
复制为 MD 格式

本文介绍llm-inference-xpu 24.11版本发布记录。

Main Features and Bug Fix Lists

Main Features

  • 基础镜像升级PPU SDK1.3.4。

  • 升级vLLMv0.5.3.post1版本。

Bug Fix

修复真武810E平台上qwen2-72b大模型在vllm cuda graph enable情况下出现推理乱码的问题。

镜像Asset

说明

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

公网镜像

  • egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/llm-inference-xpu:vllm0.5.3.post1-pytorch2.5.1-cuda12.4-ubuntu22.04

VPC镜像

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

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

镜像组件列表

24.11版本

llm-inference-xpu

应用场景

大模型推理

框架

pytorch

Requirements

PPU SDK v1.3.4

系统组件

  • Ubuntu 22.04

  • Python 3.10

  • Torch 2.5.1.6+ppu

  • CUDA 12.4.1

  • vllm 0.5.3.post1+cu124

  • transformers 4.46.2+ali

  • vllm-flash-attn 2.6.2+cu124

Quick Start

示例内容以qwen2.5 7b模型为例。

  1. 拉取容器

    docker pull egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/llm-inference-xpu:[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  --rm -it --gpus all --privileged --ipc=host \
    --ulimit memlock=-1 --ulimit stack=67108864  \
    -v /mnt/:/mnt/ \
    egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun/llm-inference-xpu:[tag]
  4. 执行推理测试

    测试vLLM推理对话功能。

    1. 启动Sever服务

      python3 -m vllm.entrypoints.openai.api_server \
      --model /mnt/Qwen2.5-7B-Instruct \
      --trust-remote-code \
      --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

ACS环境下使用xpu大模型推理镜像的使用指导请参见ACS集群形态的LLM大模型推理镜像使用指导

Known Issues