Llama3-Chinese_v2
申请gpu资源
salloc -p gpu --gres=gpu:8
ssh gpuXX
安装git lfs
wget https://github.com/git-lfs/git-lfs/releases/download/v3.5.1/git-lfs-linux-amd64-v3.5.1.tar.gz
tar xvf git-lfs-linux-amd64-v3.5.1.tar.gz
export PATH=$HOME/git-lfs-3.5.1:$PATH
git lfs install --force
下载模型
cd $HOME
git clone https://github.com/CrazyBoyM/llama3-Chinese-chat --depth 1
git clone https://www.modelscope.cn/baicai003/Llama3-Chinese_v2.git
conda
source /opt/app/anaconda3/bin/activate
conda create -n llama3 python==3.10.9
conda activate llama3
pip install transformers -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install peft -i https://pypi.tuna.tsinghua.edu.cn/simple
推理脚本
Chinese_v2.py
cd $HOME/llama3-Chinese-chat
python Chinese_v2.py