LLaMA-Factory双卡4090微调DeepSeek-R1-Distill-Qwen-14B医学领域

unsloth单卡4090微调DeepSeek-R1-Distill-Qwen-14B医学领域后,跑通一下多卡微调。

1,准备2卡RTX 4090

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 ".[torch,metrics]"

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训练

相关推荐
忧郁的橙子.2 天前
07-大模型微调-LLama Factor微调Qwen -- 局部微调/训练医疗问答模型
llama·llama factor·微调qwen
南宫乘风3 天前
LLaMA-Factory 给 Qwen1.5 做 LoRA 微调 实战
人工智能·深度学习·llama
华农DrLai3 天前
什么是自动Prompt优化?为什么需要算法来寻找最佳提示词?
人工智能·算法·llm·nlp·prompt·llama
jjinl4 天前
1.1 llama.cpp 编译
llama
serve the people4 天前
macbook m4 LLaMA-Factory入门级微调
llama
WiSirius5 天前
LLM:基于 AgentScope + Streamlit 的 AI Agent脑暴室
人工智能·深度学习·自然语言处理·大模型·llama
掘金安东尼5 天前
llama.cpp、Ollama、LM Studio:背后是谁在做?为什么会出现?要什么机器才能跑?
llama
海天一色y5 天前
LLaMA-Factory PPO 训练实战:从 SFT 到 RLHF 完整指南
llama
接着奏乐接着舞。5 天前
5分钟本地跑起大模型
人工智能·llama
liuze4086 天前
Ollama安装
llama