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

相关推荐
寒水馨10 小时前
Windows下载、安装ollama-v0.32.1(附安装包OllamaSetup.exe)
windows·llm·大语言模型·llama·本地部署·ollama·模型运行
老刘说AI1 天前
AI服务核心: 高并发原理与性能监控调优
人工智能·神经网络·langchain·llama·持续部署
头茬韭菜2 天前
Kronos 模型推理性能基准测试报告
llama
亮亮在江湖2 天前
# 手写原生Transformers SFT脚本 vs LLaMA Factory 训练 核心完整对比
llama
染指11102 天前
61.RAG-RAG存在的问题
人工智能·llama·rag·llama_index·llamaindex
CClaris7 天前
大模型量化从0到1(九):用 llama.cpp 把模型转成 GGUF 并跑本地推理
人工智能·pytorch·python·深度学习·llama
染指11107 天前
56.llama_index-查询引擎
人工智能·llama·rag·llama_index·llamaindex
_codemonster7 天前
从零手搓大模型(七)GPT 转 Llama:从教学版 GPT 走向现代 LLM 架构
人工智能·gpt·大模型·llama
SLD_Allen8 天前
Purple Llama:Meta开源的LLM安全“紫队”工具箱
安全·开源·llama
俊俊谢8 天前
从零搭建:本地LangChain Agent调用远程LLaMA-Factory模型服务
langchain·llama