llama factory进行模型微调
llama factory如何进行模型微调
·
安装基础环境
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"
}
执行微调
更多推荐
所有评论(0)