安装基础环境

基础环境

python环境安装

# 创建虚拟环境
python3 -m venv llamafactory
# 进入虚拟环境
source ~/llamafactory/bin/activate
# 使用清华大学python源,https://pypi.tuna.tsinghua.edu.cn/simple
pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple
git clone https://gitee.com/xqxyxchy/LLaMA-Factory.git
cd LLaMA-Factory
pip install -e ".[torch,metrics]" -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install modelscope unsloth unsloth_zoo -i https://pypi.tuna.tsinghua.edu.cn/simple

启动webui

# 访问地址 http://0.0.0.0:7860
llamafactory-cli webui

验证chat

在这里插入图片描述
在这里插入图片描述

配置数据集

# 复制文件qwen_ibps_qa.json到LLaMA-Factory/data/目录下
vi LLaMA-Factory/data/dataset_info.json
# 追加
,
  "ibps": {
    "file_name": "qwen_ibps_qa.json"
  }

执行微调

在这里插入图片描述

官网

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐