You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yangapku e8e15962d8 add 72B and 1.8B Qwen models, add Ascend 910 and Hygon DCU support, add docker support 1 year ago
..
README.md add 72B and 1.8B Qwen models, add Ascend 910 and Hygon DCU support, add docker support 1 year ago
docker_qwen.sh add 72B and 1.8B Qwen models, add Ascend 910 and Hygon DCU support, add docker support 1 year ago

README.md

昇腾910架构基于mindformers推理Qwen-7B-Chat模型

环境要求

  • 硬件Ascend 910A/B

运行步骤

首先参考Qwen README下载官方模型到/path/to/Qwen-7B-Chat

下载并启动镜像

docker pull qwenllm/qwen-mindspore:latest

cd /path/to/Qwen/ascend-support

# 下载模型到此处
CHECKPOINT_PATH=/path/to/Qwen-7B-Chat

cd ascend-support

# 启动docker容器
bash docker_qwen.sh -c ${CHECKPOINT_PATH}

执行权重转换

在容器内执行下面的命令将Qwen模型转换为适配mindformers的格式:

python3 /data/qwen/mindformers/research/qwen/convert_weight.py

转换后模型的输出位置为${CHECKPOINT_PATH}/qwen-7b-chat.ckpt

执行推理

在容器内执行下面的命令,进行推理:

cd /data/qwen/mindformers/research/qwen
export PYTHONPATH=/data/qwen/mindformers:$PYTHONPATH
python3 infer_qwen.py