Large 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, more and more large foundation models have become publically available. However, most of those models exhibit a major deficiency in specialized-task applications, where the step of finetuning is still required for obtaining satisfactory performance. As the number of available models and specialized tasks keeps growing, the job of general finetuning becomes highly nontrivial. In this paper, we take the first step to address this issue. We introduce an extensible and lightweight toolkit, LMFlow, which aims to simplify the finetuning and inference of general large foundation models. LMFlow offers a complete finetuning workflow for a large foundation model to support personalized training with limited computing resources. Furthermore, it supports continuous pretraining, instruction tuning, parameter-efficient finetuning, alignment tuning, and large model inference, along with carefully designed and extensible APIs. This toolkit has been thoroughly tested and is available at https://github.com/OptimalScale/LMFlow.
翻译:大型基础模型已展现出远超传统方法实现通用人类级智能的强大能力。随着该技术持续吸引人工智能领域的关注,越来越多的大型基础模型已向公众开放。然而,这些模型在专业任务应用中普遍存在重大缺陷——仍需通过微调步骤才能获得令人满意的性能。随着可用模型和专门任务数量的不断增长,通用微调工作变得极具挑战性。本文首次提出解决该问题的方案,我们开发了名为LMFlow的可扩展轻量级工具包,旨在简化通用大型基础模型的微调与推理流程。该工具包为大型基础模型提供了完整的微调工作流,支持在有限计算资源下进行个性化训练。此外,LMFlow支持持续预训练、指令微调、参数高效微调、对齐微调及大型模型推理,并配备精心设计且可扩展的API接口。该工具包已通过全面测试,用户可通过https://github.com/OptimalScale/LMFlow获取。