LLaMA-Factory微调工具

https://github.com/hiyouga/LLaMA-Factory/blob/main/README_zh.md
https://llamafactory.readthedocs.io/zh-cn/latest/

安装时确保python在虚拟环境中

git clone --depth 1 https://github.com/hiyouga/LLaMA-Factory.git
cd LLaMA-Factory
pip install -e ".[torch,metrics]"

如果安装成功使用llamafactory-cli version查看版本

不要开启系统代理,否则webui会启动失败
启动web界面llamafactory-cli webui

本地测试模型
Qwen2.5-1.5B
DeepSeek-R1-1.5B-Distill

自定义数据集,LLaMA-Factory目录下的data目录,将json数据集放入data目录中,编辑dataset_info.json,添加

"ziji": {
    "file_name": "data.json"
  },