[v1] support training with fsdp2#9773
Conversation
# Conflicts: # src/llamafactory/v1/core/base_trainer.py # src/llamafactory/v1/core/utils/data_collator.py
Summary of ChangesHello @frozenleaves, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求通过集成 FSDP2 (Fully Sharded Data Parallel v2) 显著增强了 LLaMA Factory 的分布式训练能力,特别是针对 SFT (Supervised Fine-Tuning)。它引入了通过 Meta Device 进行灵活模型初始化,并支持从 Hugging Face 和 Distributed Checkpoint (DCP) 两种格式加载模型权重。此外,PR 还优化了 v1 命令行启动命令,以更好地分类训练任务,并增加了 Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Co-authored-by: frozenleaves <frozen@Mac.local> Co-authored-by: Yaowei Zheng <hiyouga@buaa.edu.cn>
Co-authored-by: frozenleaves <frozen@Mac.local> Co-authored-by: Yaowei Zheng <hiyouga@buaa.edu.cn>
What does this PR do?
新增功能支持:
完善v1 launch启动命令,在
USE_V1时,当前支持如下cli命令:以下命令与v0兼容,功能相同:
以下命令与v0不兼容:
增加 sft+fsdp2训练端到端ut,看护基本训练能力
增加 max_steps参数支持
修复部分代码bug