LMFlow:一个用于大型基础模型微调与推理的可扩展工具包
LMFlow: An Extensible Toolkit for Finetuning and Inference of Large Foundation Models
AI总结:
本文提出可扩展轻量级工具包 LMFlow,旨在简化基础模型的领域与任务感知微调,支持持续预训练、指令微调、参数高效微调、推理加速及多模态微调等完整工作流,以降低科学语言模型训练难度。
摘要:
基础模型已展现出远超传统方法的通用人类级智能能力。随着该技术持续吸引人工智能社区的关注,越来越多的基础模型正变得公开可用。然而,大多数此类模型的一个显著不足在于其在专业领域和任务特定应用中的表现,这需要具备领域和任务感知能力的微调来开发有效的科学语言模型。随着可用基础模型和专门任务的数量不断增长,训练科学语言模型的工作变得高度复杂。在本文中,我们着手解决这一问题。我们介绍了一个可扩展且轻量级的工具包 LMFlow,旨在简化通用基础模型的领域和任务感知微调。LMFlow 为基础模型提供完整的微调工作流,以支持在有限计算资源下进行专门训练。此外,它支持持续预训练、指令微调、参数高效微调、对齐微调、推理加速、长上下文泛化、模型定制,甚至多模态微调,并配有精心设计且可扩展的 API。该工具包已经过充分测试,可在 https://github.com/OptimalScale/LMFlow 获取。
英文摘要:
Foundation models have demonstrated a great ability to achieve general human-level intelligence far beyond traditional approaches. As the technique keeps attracting attention from the AI community, an increasing number of foundation models are becoming publicly accessible. However, a significant shortcoming of most of these models lies in their performance in specialized-domain and task-specific applications, necessitating domain- and task-aware fine-tuning to develop effective scientific language models. As the number of available foundation models and specialized tasks keeps growing, the job of training scientific language models becomes highly nontrivial. In this paper, we initiate steps to tackle this issue. We introduce an extensible and lightweight toolkit, LMFlow, which aims to simplify the domain- and task-aware finetuning of general foundation models. LMFlow offers a complete finetuning workflow for a foundation model to support specialized training with limited computing resources. Furthermore, it supports continuous pretraining, instruction tuning, parameter-efficient finetuning, alignment tuning, inference acceleration, long context generalization, model customization, and even multimodal finetuning, along with carefully designed and extensible APIs. This toolkit has been thoroughly tested and is available at https://github.com/OptimalScale/LMFlow.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。