LLaMA-Factory双卡4090微调DeepSeek-R1-Distill-Qwen-14B医学领域
unsloth单卡4090微调DeepSeek-R1-Distill-Qwen-14B医学领域后,跑通一下多卡微调。1,准备2卡RTX 4090
https://i-blog.csdnimg.cn/direct/042d7802ef8a4c5c9e3022f249c4fb0d.png
https://i-blog.csdnimg.cn/direct/ae6b7b322eb34f4d8019bcb516280d90.png
2,准备数据集
医学领域
pip install -U huggingface_hub
export HF_ENDPOINT=https://hf-mirror.com
huggingface-cli download --resume-download --repo-type dataset FreedomIntelligence/medical-o1-reasoning-SFT --local-dir FreedomIntelligence/medical-o1-reasoning-SFT
3,安装LLaMA-Factory 和下载模子
须要提前搭建好docker微调环境
下载模子 ,须要是 safetensors 权重文件
git clone --depth 1 https://github.com/hiyouga/LLaMA-Factory.git
cd LLaMA-Factory
pip install -e "."
llamafactory-cli webui
# llamafactory-cli version
INFO 04-12 04:48:24 __init__.py:190] Automatically detected platform cuda.
----------------------------------------------------------
| Welcome to LLaMA Factory, version 0.9.3.dev0 |
| |
| Project page: https://github.com/hiyouga/LLaMA-Factory |
----------------------------------------------------------
/workspace# python toShareGPT.py 转换数据集
4,注册数据集
cp /datasets/medical_sharegpt_format.json ./LLaMA-Factory/data/
修改 `data/dataset_info.json`,添加自定义数据集:
"medical_sharegpt_format": {
"file_name": "medical_sharegpt_format.json",
"formatting": "sharegpt",
"columns": {
"messages": "conversations",
"system": "system"
}
}
5,llamafactory-cli webui练习
https://i-blog.csdnimg.cn/direct/0b2dfcce9be84e70b9656cf07c7c0c39.png
https://i-blog.csdnimg.cn/direct/7a9b53c5de654b37999f712ef10ca46d.png
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]