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 天前
小白学大模型:从零搭建LLaMA
程序员·llm·llama
Jina AI4 天前
让 llama.cpp 支持多模态向量模型
llama
wyw00004 天前
大模型微调之LLaMA-Factory实战
llama
2202_756749694 天前
LLM大模型-大模型微调(常见微调方法、LoRA原理与实战、LLaMA-Factory工具部署与训练、模型量化QLoRA)
人工智能·深度学习·llama
JoannaJuanCV4 天前
大模型训练框架:LLaMA-Factory框架
llama·大模型训练·llama factory
骑士9991116 天前
llama_factory 安装以及大模型微调
llama
周小码7 天前
llama-stack实战:Python构建Llama应用的可组合开发框架(8k星)
开发语言·python·llama
blackoon889 天前
DeepSeek R1大模型微调实战-llama-factory的模型下载与训练
llama
johnny2339 天前
大模型微调理论、实战:LLaMA-Factory、Unsloth
llama
闲看云起10 天前
从 GPT 到 LLaMA:解密 LLM 的核心架构——Decoder-Only 模型
gpt·架构·llama