更新时间:2024-12-17 GMT+08:00
分享

推理场景介绍

方案概览

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

约束限制

  • 本方案目前仅适用于部分企业客户。
  • 本文档适配昇腾云ModelArts 6.3.911版本,请参考软件配套版本获取配套版本的软件包,请严格遵照版本配套关系使用本文档。
  • 资源规格推荐使用“西南-贵阳一”Region上的Lite k8s Cluster和昇腾Snt9B资源。
  • 本文档中的CCE集群版本选择v1.27~1.28。版本使用的容器引擎为Containerd。
  • 推理部署使用的服务框架是vLLM。vLLM支持v0.6.3版本。
  • 支持FP16和BF16数据类型推理。
  • Lite k8s Cluster驱动版本推荐为23.0.6。
  • 适配的CANN版本是cann_8.0.rc3。

资源规格要求

本文档中的模型运行环境是ModelArts Lite的Lite k8s Cluster。推荐使用“西南-贵阳一”Region上的资源和Ascend Snt9B。

支持的模型列表和权重文件

本方案支持vLLM的v0.6.3版本。不同vLLM版本支持的模型列表有差异,具体如表1所示。

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

序号

模型名称

是否支持fp16/bf16推理

是否支持W4A16量化

是否支持W8A8量化

是否支持W8A16量化

是否支持

kv-cache-int8量化

开源权重获取地址

1

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-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-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-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-llm-7b

x

x

x

x

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

13

deepseek-coder-33b-instruct

x

x

x

x

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

14

deepseek-llm-67b

x

x

x

x

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

15

qwen-7b

x

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

16

qwen-14b

x

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

17

qwen-72b

x

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

18

qwen1.5-0.5b

x

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

19

qwen1.5-7b

x

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

20

qwen1.5-1.8b

x

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

21

qwen1.5-14b

x

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

22

qwen1.5-32b

x

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

23

qwen1.5-72b

x

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

24

qwen1.5-110b

x

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

25

qwen2-0.5b

x

https://huggingface.co/Qwen/Qwen2-0.5B-Instruct

26

qwen2-1.5b

x

https://huggingface.co/Qwen/Qwen2-1.5B-Instruct

27

qwen2-7b

x

x

https://huggingface.co/Qwen/Qwen2-7B-Instruct

28

qwen2-72b

x

https://huggingface.co/Qwen/Qwen2-72B-Instruct

29

qwen2.5-0.5b

x

https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct

30

qwen2.5-1.5b

x

https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct

31

qwen2.5-3b

x

https://huggingface.co/Qwen/Qwen2.5-3B-Instruct

32

qwen2.5-7b

x

x

https://huggingface.co/Qwen/Qwen2.5-7B-Instruct

33

qwen2.5-14b

x

https://huggingface.co/Qwen/Qwen2.5-14B-Instruct

34

qwen2.5-32b

x

https://huggingface.co/Qwen/Qwen2.5-32B-Instruct

35

qwen2.5-72b

x

https://huggingface.co/Qwen/Qwen2.5-72B-Instruct

36

baichuan2-7b

x

x

x

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

37

baichuan2-13b

x

x

x

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

38

gemma-2b

x

x

x

x

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

39

gemma-7b

x

x

x

x

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

40

chatglm2-6b

x

x

x

x

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

41

chatglm3-6b

x

x

x

x

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

42

glm-4-9b

x

x

x

x

https://huggingface.co/THUDM/glm-4-9b-chat

43

mistral-7b

x

x

x

x

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

44

mixtral-8x7b

x

x

x

x

https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1

45

falcon-11b

x

x

x

x

https://huggingface.co/tiiuae/falcon-11B/tree/main

46

qwen2-57b-a14b

x

x

x

x

https://huggingface.co/Qwen/Qwen2-57B-A14B-Instruct

47

llama3.1-8b

x

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

48

llama3.1-70b

x

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

49

llama-3.1-405B

x

x

x

https://huggingface.co/hugging-quants/Meta-Llama-3.1-405B-Instruct-AWQ-INT4

50

llama-3.2-1B

x

x

x

x

Llama-3.2-1B-Instruct · 模型库 (modelscope.cn)

51

llama-3.2-3B

x

x

x

x

Llama-3.2-3B-Instruct · 模型库 (modelscope.cn)

52

llava-1.5-7b

x

x

x

x

https://huggingface.co/llava-hf/llava-1.5-7b-hf/tree/main

53

llava-1.5-13b

x

x

x

x

https://huggingface.co/llava-hf/llava-1.5-13b-hf/tree/main

54

llava-v1.6-7b

x

x

x

x

https://huggingface.co/llava-hf/llava-v1.6-vicuna-7b-hf/tree/main

55

llava-v1.6-13b

x

x

x

x

https://huggingface.co/llava-hf/llava-v1.6-vicuna-13b-hf/tree/main

56

llava-v1.6-34b

x

x

x

x

https://huggingface.co/llava-hf/llava-v1.6-34b-hf/tree/main

57

internvl2-8B

x

x

x

x

https://huggingface.co/OpenGVLab/InternVL2-8B/tree/main

58

internvl2-26B

x

x

x

x

https://huggingface.co/OpenGVLab/InternVL2-26B/tree/main

59

internvl2-40B

x

x

x

x

https://huggingface.co/OpenGVLab/InternVL2-40B/tree/main

60

internVL2-Llama3-76B

x

x

x

x

https://huggingface.co/OpenGVLab/InternVL2-Llama3-76B/tree/main

61

MiniCPM-v2.6

x

x

x

x

https://huggingface.co/openbmb/MiniCPM-V-2_6/tree/main

62

deepseek-v2-236b

x

x

x

x

https://huggingface.co/deepseek-ai/DeepSeek-V2

63

deepseek-v2-lite-16b

x

x

x

https://huggingface.co/deepseek-ai/DeepSeek-V2-Lite

64

qwen2-vl-2B

x

x

x

x

https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct/tree/main

65

qwen2-vl-7B

x

x

x

x

https://huggingface.co/Qwen/Qwen2-VL-7B-Instruct/tree/main

66

qwen2-vl-72B

x

x

x

x

https://huggingface.co/Qwen/Qwen2-VL-72B-Instruct/tree/main

67

qwen-vl

x

x

x

x

https://huggingface.co/Qwen/Qwen-VL

68

qwen-vl-chat

x

x

x

x

https://huggingface.co/Qwen/Qwen-VL-Chat

69

MiniCPM-v2

x

x

x

x

https://huggingface.co/HwwwH/MiniCPM-V-2

注意:需要修改源文件site-packages/timm/layers/pos_embed.py,在第46行上面新增一行代码,如下:

posemb = posemb.contiguous() #新增

posemb = F.interpolate(posemb, size=new_size, mode=interpolation,

antialias=antialias)

相关文档