参考:https://gitee.com/mindspore/mindformers/blob/dev/docs/model_cards/glm2.md#chatglm2-6b
1、安装环境:
昇腾NPU卡对应英伟达GPU卡,CANN对应CUDA底层; mindspore对应pytorch;mindformers对应transformers
本次环境:
CANN-6.3.RC2.b20231016
mindspore 2.0.0
mindformers (离线安装:https://gitee.com/mindspore/mindformers)
![](https://img-blog.csdnimg.cn/26e0f9ce34b7461e994093de386f0554.png)
![](https://img-blog.csdnimg.cn/dedbf371db8c4d1494b327ea650875a4.png)
查看npu使用信息:
npu-smi info
![](https://img-blog.csdnimg.cn/38701f4ddead4cbf9faac76e56850f72.png)
2、ChatGLM2模型使用
参考:https://gitee.com/mindspore/mindformers/blob/dev/docs/model_cards/glm2.md
问题参考: