75,971
stars
+17
9,360
forks
343
watchers
1,629
prs
8,053
issues
36
releases
664
discussions
README
! LlamaFactory 获得亚马逊、英伟达、阿里云等的应用。 ---- 欢迎关注我们全新的开源项目——🐧 PenguinHarness:本地优先的多 Agent 应用开发平台——全自动创建、微调、部署 AI 应用! 关注并点 Star 收藏我们的项目:https://github.com/Prism-Shadow/penguin-harness https://github.com/user-attachments/assets/604eb626-0a5d-4a62-87e3-14ebade1cd5f ---- 赞助商 ❤️ | Warp,面向开发者的智能终端适用于 MacOS、Linux 和 Windows | | | ---- | ---- | ---- 使用零代码命令行与 Web UI 轻松微调百余种大模型 !GitHub Trend 👋 加入我们的微信群和 NPU 用户群。 \ [English | 中文 \] 微调大模型可以像这样轻松… https://github.com/user-attachments/assets/43b700c6-a178-41db-b1f8-8190a5d3fcfc 开始本地训练: - 请见如何使用 开始云端训练: - Colab(免费):https://colab.research.google.com/drive/1d5KQtbemerlSDSxZIfAaWXhKr30QypiK?usp=sharing - PAI-DSW(免费试用):https://gallery.pai-ml.com//preview/deepLearning/nlp/llama_factory - AMD GPU Cloud (免费试用): https://github.com/AMD-AIM/AMD_Developers_Notebooks/blob/main/zh/AMD_developer_LLaMAFactory_note_zh.md 阅读技术文档: - 入门教程:https://zhuanlan.zhihu.com/p/695287607 - 微调视频教程:https://www.bilibili.com/video/BV1djgRzxEts/ - 框架文档:https://llamafactory.readthedocs.io/zh-cn/latest/ - 框架文档(昇腾 NPU):https://llamafactory.readthedocs.io/zh-cn/latest/multibackend/npu/index.html - 官方博客:https://blog.llamafactory.net/ [!NOTE] 除上述链接以外的其他网站均为未经许可的第三方网站,请小心甄别。 目录 - 项目特色 - 官方博客 - 更新日志 - 模型 - 训练方法 - 数据集 - 软硬件依赖 - 如何使用 - 安装 LlamaFactory - 数据准备 - 快速开始 - LLaMA Board 可视化微调 - 构建 Docker - 利用 vLLM 部署 OpenAI API - 从魔搭社区下载 - 从魔乐社区下载 - 使用 W&B 面板 - 使用 SwanLab 面板 - 使用了 LlamaFactory 的项目 - 协议 - 引用 - 致谢 项目特色 - 多种模型:LLaMA、LLaVA、Mistral、Mixtral-MoE、Qwen3、Qwen3-VL、DeepSeek、Gemma、GLM、Phi 等等。 - 集成方法:(增量)预训练、(多模态)指令监督微调、奖励模型训练、PPO 训练、DPO 训练、KTO 训练、ORPO 训练等等。 - 多种精度:16 比特全参数微调、冻结微调、LoRA 微调和基于 AQLM/AWQ/GPTQ/LLM.int8/HQQ/EETQ 的 2/3/4/5/6/8 比特 QLoRA 微调。 - 先进算法:GaLore、BAdam、APOLLO、Adam-mini、Muon、OFT、DoRA、LongLoRA、LLaMA Pro、Mixture-of-Depths、LoRA+、LoftQ 和 PiSSA。 - 实用技巧:FlashAttention-2、Unsloth、Liger Kernel、KTransformers、RoPE scaling、NEFTune 和 rsLoRA。 - 广泛任务:多轮对话、工具调用、图像理解、视觉定位、视频识别和语音理解等等。 - 实验监控:LlamaBoard、TensorBoard、Wandb、MLflow、SwanLab 等等。 - 极速推理:基于 vLLM 或 SGLang 的 OpenAI 风格 API、浏览器界面和命令行接口。 最新模型的 Day-N 微调适配 | 适配时间 | 模型名称 | | ------------ | -------------------------------------------------------------------- | | Day 0 | Qwen3 / Qwen2.5-VL / Gemma 3 / GLM-4.1V / InternLM 3 / MiniCPM-o-2.6 | | Day 1 | Llama 3 / GLM-4 / Mistral Small / PaliGemma2 / Llama 4 | 官方博客 [!TIP] 我们现在拥有了 LlamaFactory 的专属博客! 网站地址:https://blog.llamafactory.net/ - 💡 KTransformers Fine-Tuning × LlamaFactory: 用2张4090级的GPU+CPU 微调 1000B规模的超大模型 (中文) - 💡 Easy Dataset × LlamaFactory: 让大模型高效学习领域知识(中文) - 💡 DataFlow × LlamaFactory: 利用数据准备流水线产出高质量数据训练 LLM(中文)| English - 💡 DataFlex × LlamaFactory: 构建在 LlamaFactory 之上的以数据为中心的动态训练系统(中文)| English - 基于 LlamaFactory 和 EasyR1 打造一站式无代码大模型强化学习和部署平台 LLM Model Hub(中文) - 通过亚马逊 SageMaker HyperPod 上的 LlamaFactory 增强多模态模型银行文档的视觉信息提取(英文) 全部博客 - LlamaFactory:微调 DeepSeek-R1-Distill-Qwen-7B 模型实现新闻
Top issues
#6792结合 GRPO 支持 DeepSeek-R1 等推理模型的复现,达到 huggingface open-r1 的类似效果60 comments · 2025-02-02#10221qwen3.5-27b 全参微调训练耗时很久43 comments · 2026-02-27#7767Hanging problem when LoRA finte-tune Qwen2.5Omni with multi-turn video-audio samples with deepspeedz341 comments · 2025-04-19#4388关于npu训练模型总结以及疑问35 comments · 2024-06-20#7396Watchdog caught collective operation timeout: WorkNCCL(SeqNum=1580, OpType=ALLREDUCE, NumelIn=466119168, NumelOut=466119168, Timeout(ms)=600000) ran for 600004 milliseconds before timing out.30 comments · 2025-03-21#8600OOM and slow tokenization after upgrade LLaMA-Factory27 comments · 2025-07-10#9474Qwen3omni-30B-A3B-Instruct Lora微调训练一直卡住25 comments · 2025-11-12#8041[question] Dose Muon Optimizer support deepspeed ?25 comments · 2025-05-13
Discussions
#10886Can anyone help me train a NodeJS / JavaScript model ?1 comments · 2026-10-10#10848Which abliterated variants are actually worth hosting? (founder, hosting them)0 comments · 2026-09-25#10843请问webui上面有办法实现多机多卡微调吗1 comments · 2026-09-20#10836Training the Qwen3.5-9B model with only_text data, how to avoid multimodal placeholders1 comments · 2026-09-15#10768Qwen3-30B-A3B-Base SFT-LORA+DeepSpeed ZERO3微调OOM问题1 comments · 2026-08-21#10750VOKO 自荐:做 AI Agent 之间的"通信协议层"0 comments · 2026-08-13#10631How should I balance learning rate and data sampling during CPT on multiple datasets?3 comments · 2026-07-06#10585Runtime reliability after fine tuning0 comments · 2026-06-16
Latest release
v0.9.5: Qwen3.5/3.6, Gemma 4, Transformers v5 v0.9.5 2026-05-30Added primary support for Qwen3.5/Qwen3.6/Gemma4 models and compatibility with Transformers v5. What's Changed [misc] set dev version by @hiyouga in https://github.com/hiyouga/LlamaFactory/pull/9703 fix(fp8): add Transformer Engine backend support by @sbhavani in https://github.com/hiyouga/LlamaFactory/pull/9705 [misc] Compatible with an empty architectures field in config.json by @tangefly in https://github.com/hiyouga/LlamaFactory/pull/9709 [model] support Youtu-LLM-2B by @isLinXu in https://github.com/hiyouga/LlamaFactory/pull/9707 [misc] lint by @hiyouga in https://github.c