- 安装conda
- 创建python环境
python -m venv new_env_name
- 安装cuda,cudnn developer.nvidia.com/cuda-12-4-1…
- 安装torch
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
安装flash_attn2
pip install D:\迅雷下载\flash_attn-2.7.0.post2+cu124torch2.5.1cxx11abiFALSE-cp311-cp311-win_amd64.whl
下载及安装llama-factory依赖
git clone --depth 1 https://github.com/hiyouga/LLaMA-Factory.git
vs终端打开LLaMA-Factory
pip install -e ".[torch,metrics]"