Closed XYZliang closed 4 days ago
目前lmdeploy pytorch engine对于昇腾平台的支持为 Atlas 800T A2机型(Atlas 800I 推理系列产品尚未测试,但是应该是能够支持的),目前没有支持910A。在华为CANN官方文档上大模型部分的融合算子都是不支持 910A 的。如下图所示普通算子 aclnnAbs
支持 910A 但是大模型融合算子 aclnnIncreFlashAttentionV4
和 aclnnApplyRotaryPosEmb
不支持 910A。详情见链接。
感谢您的解答,希望华为能加快适配。。
通过内部工作人员询问,800T A2内置的是910B的芯片,910B 的兄弟可以尝试尝试,这条Issues给用华为昇腾的兄弟提个醒吧
感谢您的解答,希望华为能加快适配。。
据我所知,华为这边针对老的910A芯片可能不太会支持大模型算子了,如果是老的硬件在大模型领域确实不好办。
感谢您的解答,希望华为能加快适配。。
据我所知,华为这边针对老的910A芯片可能不太会支持大模型算子了,如果是老的硬件在大模型领域确实不好办。
是,昨天也跟专家咨询过。难办,准备换 910B 了
Checklist
Describe the bug
感谢对国产化平台的支持,发现 0.6.0 版本添加了对PyTorchEngine 华为昇腾平台的支持,立马进行了测试。模型似乎成功加载,但是在进行推理时会报错,具体请看下面日志。
Reproduction
lmdeploy serve api_server --backend pytorch --device ascend /home/ma-user/work/model/qwen/Qwen2-7B-Instruct
其中/home/ma-user/work/model/qwen/Qwen2-7B-Instruct
是下载的Qwen2-7B-Instruct
模型,并修改config.json
中的torch_dtype
为float16
(昇腾 910 系列并不支持 bf16,lmdeploy也暂未支持显式指定)lmdeploy serve api_server --backend pytorch --device ascend
是参考文档在昇腾设备上部署的示例Environment
机器环境为: 使用国产华为欧拉+国产arm芯片+8卡昇腾910A npu的华为modelArts平台内,使用华为官方的pytorch_2.1.0-cann_8.0.rc1-py_3.9-euler_2.10.7-aarch64的modelArts镜像
使用模型为支持列表中的 qwen2 系列 7B 模型,来自modelscope的下载
安装遵守文档顺序,新建 3.10 环境后首先手动安装 torch 和 torch-npu(2.1.0),克隆最新仓库(20240914中午),从源码进行安装
Error traceback