更新时间:2024-06-24 GMT+08:00
分享

场景介绍

方案概览

本文档介绍了在ModelArts的Standard上使用昇腾计算资源开展常见开源大模型Llama、Qwen、ChatGLM、Yi、Baichuan等推理部署的详细过程,利用适配昇腾平台的大模型推理服务框架vLLM和华为自研昇腾Snt9B硬件,为用户提供推理部署方案,帮助用户使能大模型业务。

本方案目前仅适用于部分企业客户,完成本方案的部署,需要先联系您所在企业的华为方技术支持。

约束限制

  • 推理部署使用的服务框架是vLLM(官网地址:https://github.com/vllm-project/vllm/tree/v0.3.2,版本:v0.3.2)。
  • 仅支持FP16和BF16数据类型推理。
  • 适配的CANN版本是cann_8.0.rc2,驱动版本是23.0.5。

支持的模型列表

本方案支持的模型列表、对应的开源权重获取地址如表1所示。

表1 支持的模型列表和权重获取地址

序号

支持模型

支持模型参数量

开源权重获取地址

1

Llama

llama-7b

https://huggingface.co/huggyllama/llama-7b

2

llama-13b

https://huggingface.co/huggyllama/llama-13b

3

llama-65b

https://huggingface.co/huggyllama/llama-65b

4

Llama2-

llama2-7b

https://huggingface.co/meta-llama/Llama-2-7b-chat-hf

5

llama2-13b

https://huggingface.co/meta-llama/Llama-2-13b-chat-hf

6

llama2-70b

https://huggingface.co/meta-llama/Llama-2-70b-hf

https://huggingface.co/meta-llama/Llama-2-70b-chat-hf (推荐)

7

Llama3

llama3-8b

https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct

8

llama3-70b

https://huggingface.co/meta-llama/Meta-Llama-3-70B-Instruct

9

Yi

yi-6b

https://huggingface.co/01-ai/Yi-6B-Chat

10

yi-9b

https://huggingface.co/01-ai/Yi-9B

11

yi-34b

https://huggingface.co/01-ai/Yi-34B-Chat

12

Deepseek

deepseek-llm-7b

https://huggingface.co/deepseek-ai/deepseek-llm-7b-chat

13

deepseek-coder-instruct-33b

https://huggingface.co/deepseek-ai/deepseek-coder-33b-instruct

14

deepseek-llm-67b

https://huggingface.co/deepseek-ai/deepseek-llm-67b-chat

15

Qwen

qwen-7b

https://huggingface.co/Qwen/Qwen-7B-Chat

16

qwen-14b

https://huggingface.co/Qwen/Qwen-14B-Chat

17

qwen-72b

https://huggingface.co/Qwen/Qwen-72B-Chat

18

Qwen1.5

qwen1.5-0.5b

https://huggingface.co/Qwen/Qwen1.5-0.5B-Chat

19

qwen1.5-7b

https://huggingface.co/Qwen/Qwen1.5-7B-Chat

20

qwen1.5-1.8b

https://huggingface.co/Qwen/Qwen1.5-1.8B-Chat

21

qwen1.5-14b

https://huggingface.co/Qwen/Qwen1.5-14B-Chat

22

qwen1.5-32b

https://huggingface.co/Qwen/Qwen1.5-32B/tree/main

23

qwen1.5-72b

https://huggingface.co/Qwen/Qwen1.5-72B-Chat

24

qwen1.5-110b

https://huggingface.co/Qwen/Qwen1.5-110B-Chat

25

Baichuan

baichuan2-7b

https://huggingface.co/baichuan-inc/Baichuan2-7B-Chat

26

baichuan2-13b

https://huggingface.co/baichuan-inc/Baichuan2-13B-Chat

27

ChatGLMv2

chatglm2-6b

https://huggingface.co/THUDM/chatglm2-6b

28

chatglm3-6b

https://huggingface.co/THUDM/chatglm3-6b

29

Gemma

gemma-2b

https://huggingface.co/google/gemma-2b

30

gemma-7b

https://huggingface.co/google/gemma-7b

31

Mistral

mistral-7b

https://huggingface.co/mistralai/Mistral-7B-v0.1

操作流程

图1 操作流程图
表2 操作任务流程说明

阶段

任务

说明

准备工作

准备资源

本教程案例是基于ModelArts Standard运行的,资源规格推荐使用ModelArts Standard的公共资源池或者专属资源池中的昇腾Snt9B资源。

准备权重

准备对应模型的权重文件。

准备代码

准备AscendCloud-3rdLLM-6.3.905-xxx.zip和AscendCloud-OPP-6.3.905-xxx.zip。

准备镜像

准备推理模型适用的容器镜像。

准备Notebook

本案例在Notebook上部署推理服务进行调试,因此需要创建Notebook。

部署推理服务

在Notebook调试环境中部署推理服务

介绍如何在Notebook中配置NPU环境,部署并启动推理服务,完成精度测试和性能测试。

在推理生产环境中部署推理服务

介绍如何在创建AI应用,部署并启动推理服务,在线预测在线服务。

分享:

    相关文档

    相关产品