Commit a4290e0c authored by dcuai's avatar dcuai
Browse files

Update README.md

parent edb3a5d7
...@@ -49,19 +49,64 @@ LLaMA,这是一个基础语言模型的集合,参数范围从7B到65B。在 ...@@ -49,19 +49,64 @@ LLaMA,这是一个基础语言模型的集合,参数范围从7B到65B。在
## 环境配置 ## 环境配置
由于多节点环境配置差异较大,因此可按照节点环境修改env.sh,环境变量参考dtk-22.10,python3.8环境正常,网口正常。使用2个8卡Z00L裸金属节点,要求dtk环境正常,mpirun文件夹下包含预编译好的openmpi库mpi4.tar.gz,可直接使用。关于本项目DCU显卡所需torch库等均可从[光合](https://developer.hpccube.com/tool/)开发者社区下载安装: ### Docker(方法一)
```
拉取镜像:
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.1.0-ubuntu20.04-dtk24.04.1-py3.10
创建并启动容器:
docker run --shm-size 64g --network=host --name=llama_fastchat --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v /opt/hyhal:/opt/hyhal:ro -v <Host Path>:<Container Path> -it <Your Image ID> bash
cp -r mpirun/* ./
cd FastChat-main
pip3 install -e .
cd ../transformers-main
pip3 install -e .
pip3 uninstall wandb
pip3 install mpi4py
cd ..
```
### Dockerfile(方法二)
```
cd docker
docker build --no-cache -t llama_fastchat:latest .
docker run --shm-size 64g --network=host --name=llama_fastchat --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v /opt/hyhal:/opt/hyhal:ro -v <Host Path>:<Container Path> -it llama_fastchat:latest bash
cp -r mpirun/* ./
cd FastChat-main
pip3 install -e .
cd ../transformers-main
pip3 install -e .
pip3 uninstall wandb
pip3 install mpi4py
cd ..
```
### Anaconda(方法三)
环境变量参考dtk-24.04.1,python3.10环境正常,要求dtk环境正常。关于本项目DCU显卡所需torch库等均可从[光合](https://developer.hpccube.com/tool/)开发者社区下载安装:
1、关于本项目DCU显卡所需的特殊深度学习库可从光合开发者社区下载安装:
https://developer.hpccube.com/tool/
```
DTK驱动:dtk24.04.1
python:python3.10
torch:2.1.0
torchvision:0.16.0
apex:1.1
```
`Tips:以上DTK、python、torch等DCU相关工具包,版本需要严格一一对应`
2、其它非特殊库安装:
``` ```
cp -r mpirun/* ./ cp -r mpirun/* ./
根据当前系统更改env.sh中相关路径
cd FastChat-main cd FastChat-main
pip3 install -e . pip3 install -e .
cd ../transformers-main cd ../transformers-main
pip3 install -e . pip3 install -e .
cd .. cd ..
pip3 install torch-1.10.0a0+git2040069.dtk2210-cp38-cp38-manylinux2014_x86_64.whl
pip3 install deepspeed-0.6.3+1b2721a.dtk2210-cp38-cp38-manylinux2014_x86_64.whl
pip3 install apex-0.1+gitdb7007a.dtk2210-cp38-cp38-manylinux2014_x86_64.whl(可选)
pip3 uninstall wandb pip3 uninstall wandb
``` ```
...@@ -106,6 +151,7 @@ pip3 uninstall wandb ...@@ -106,6 +151,7 @@ pip3 uninstall wandb
进入节点1,根据环境修改hostfile,保证两节点文件路径一致,配置相同,按需修改mpi_job.sh中--mca btl_tcp_if_include enp97s0f1,enp97s0f1改为ip a命令后对应节点ip的网卡名,numa可以根据当前节点拓扑更改绑定,微调命令: 进入节点1,根据环境修改hostfile,保证两节点文件路径一致,配置相同,按需修改mpi_job.sh中--mca btl_tcp_if_include enp97s0f1,enp97s0f1改为ip a命令后对应节点ip的网卡名,numa可以根据当前节点拓扑更改绑定,微调命令:
``` ```
#注释mpi_job.sh、mpi_single.sh中的source env.sh
bash mpi_job.sh bash mpi_job.sh
``` ```
...@@ -161,7 +207,7 @@ bash mpi_job.sh ...@@ -161,7 +207,7 @@ bash mpi_job.sh
- https://developer.hpccube.com/codes/modelzoo/llama_fastchat_pytorch - https://developer.hpccube.com/codes/modelzoo/llama_fastchat_pytorch
## 参考 ## 参考资料
* https://hf-mirror.com/yahma/llama-7b-hf/tree/main * https://hf-mirror.com/yahma/llama-7b-hf/tree/main
* https://github.com/lm-sys/FastChat * https://github.com/lm-sys/FastChat
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment