赞
踩
按照GitHub上介绍的过程安装即可
GitHub - hiyouga/LLaMA-Factory: Unify Efficient Fine-Tuning of 100+ LLMshttps://github.com/hiyouga/LLaMA-Factory参考代码:
- git clone https://github.com/hiyouga/LLaMA-Factory.git
- conda create -n llama_factory python=3.10
- conda activate llama_factory
- cd LLaMA-Factory
- pip install -r requirements.txt
- pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -e .[metrics]
- python
- import torch
- print(torch.__version__)
pip uninstall torch torchvision torchaudio
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
python
- import torch
- print(torch.__version__)
- print("CUDA available: ", torch.cuda.is_available())
- print("Current CUDA device: ", torch.cuda.current_device())
- print("Device name: ", torch.cuda.get_device_name(torch.cuda.current_device()))
通过上述两个方法之一,你可以解决 PyTorch 和 CUDA 版本不匹配的问题,从而确保 PyTorch 能够正确识别并利用 GPU 进行计算。
注意:LLaMA Board 可视化界面目前仅支持单 GPU 训练,请使用命令行接口来进行分布式训练。
使用本地环境:
- export CUDA_VISIBLE_DEVICES=0 # Windows 使用 `set CUDA_VISIBLE_DEVICES=0`
-
- python webui.py
执行后:
然后就可以访问web界面了。(这里还需要去服务器安全组设置安全端口)
补充本地模型地址和数据集地址
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。