Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 1.09 KB

hello_world.md

File metadata and controls

54 lines (41 loc) · 1.09 KB

实践教程(InternStudio 版)

环境配置

conda create -n llama3 python=3.10
conda activate llama3
conda install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 pytorch-cuda=12.1 -c pytorch -c nvidia

下载模型

安装 git-lfs 依赖

conda install git
git-lfs install

下载模型

mkdir -p ~/model
cd ~/model
git clone https://code.openxlab.org.cn/MrCat/Llama-3-8B-Instruct.git Meta-Llama-3-8B-Instruct

或者软链接 InternStudio 中的模型

ln -s /root/share/new_models/meta-llama/Meta-Llama-3-8B-Instruct ~/model/Meta-Llama-3-8B-Instruct

Web Demo 部署

cd ~
git clone https://github.com/SmartFlowAI/Llama3-XTuner-CN

安装 XTuner 时会自动安装其他依赖

cd ~
git clone -b v0.1.18 https://github.com/InternLM/XTuner
cd XTuner
pip install -e .

运行 web_demo.py

streamlit run ~/Llama3-XTuner-CN/tools/internstudio_web_demo.py \
  ~/model/Meta-Llama-3-8B-Instruct

image