MiniCPM: Unveiling the Potential of Small Language Models with Scalable Training Strategies
作者: Shengding Hu, Yuge Tu, Xu Han, Chaoqun He, Ganqu Cui, Xiang Long, Zhi Zheng, Yewei Fang, Yuxiang Huang, Weilin Zhao, Xinrong Zhang, Zheng Leng Thai, Kaihuo Zhang, Chongyi Wang, Yuan Yao, Chenyang Zhao, Jie Zhou, Jie Cai, Zhongwu Zhai, Ning Ding, Chao Jia, Guoyang Zeng, Dahai Li, Zhiyuan Liu, Maosong Sun
分类: cs.CL, cs.LG
发布日期: 2024-04-09 (更新: 2024-06-03)
备注: revise according to peer review
🔗 代码/项目: GITHUB
💡 一句话要点
提出MiniCPM以探索小型语言模型的可扩展训练策略
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 小型语言模型 可扩展训练 学习率调度 模型风洞实验 数据-模型扩展法则 自然语言处理 文本生成
📋 核心要点
- 现有的大型语言模型在资源效率和实验成本上存在显著挑战,限制了其广泛应用。
- MiniCPM通过引入可扩展的训练策略和WSD学习率调度器,提供了一种高效的小型语言模型解决方案。
- 实验结果表明,MiniCPM在性能上与更大规模的模型相当,且在数据-模型扩展法则上表现出更高的计算效率。
📝 摘要(中文)
随着对大型语言模型(LLMs)研究的兴趣日益增长,资源效率和实验成本问题日益突出。为此,我们提出了MiniCPM,特别是1.2B和2.4B非嵌入参数变体,表现优异,且在能力上与7B-13B LLMs相当。我们的研究不仅关注小型语言模型(SLMs),还展示了在模型和数据维度上的可扩展性。我们采用了广泛的模型风洞实验以实现稳定和最佳的模型扩展,并引入了适用于持续训练和领域适应的Warmup-Stable-Decay(WSD)学习率调度器。通过WSD LRS,我们能够高效研究数据-模型扩展法则,并得出比Chinchilla Optimal更高的计算最优数据-模型比率。此外,我们还介绍了MiniCPM系列,包括MiniCPM-DPO、MiniCPM-MoE和MiniCPM-128K,进一步巩固了MiniCPM在多样化SLM应用中的基础。
🔬 方法详解
问题定义:本论文旨在解决大型语言模型在资源效率和实验成本方面的挑战,现有方法往往需要巨大的计算资源和时间。
核心思路:我们提出MiniCPM,专注于小型语言模型的可扩展性,通过优化模型和数据的训练策略,提升其性能和效率。
技术框架:MiniCPM的整体架构包括模型风洞实验、WSD学习率调度器和多种MiniCPM变体,确保在不同规模上都能实现稳定的训练效果。
关键创新:引入WSD学习率调度器,使得在数据和模型扩展方面的研究更加高效,能够在不进行大量重训练的情况下探索最佳的数据-模型比率。
关键设计:在模型设计上,MiniCPM采用了1.2B和2.4B的非嵌入参数设置,结合了优化的损失函数和网络结构,以实现更好的训练稳定性和性能。
🖼️ 关键图片
📊 实验亮点
实验结果显示,MiniCPM在多个基准测试中表现优异,其性能与7B-13B的LLMs相当,同时在计算效率上超越了Chinchilla Optimal,展现出更高的计算最优数据-模型比率,进一步验证了小型语言模型的潜力。
🎯 应用场景
MiniCPM的研究成果在多个领域具有广泛的应用潜力,包括自然语言处理、对话系统和文本生成等。由于其高效的资源利用率,MiniCPM可以在资源受限的环境中实现高性能的语言理解和生成任务,推动小型语言模型的实际应用和发展。
📄 摘要(原文)
The burgeoning interest in developing Large Language Models (LLMs) with up to trillion parameters has been met with concerns regarding resource efficiency and practical expense, particularly given the immense cost of experimentation. This scenario underscores the importance of exploring the potential of Small Language Models (SLMs) as a resource-efficient alternative. In this context, we introduce MiniCPM, specifically the 1.2B and 2.4B non-embedding parameter variants, not only excel in their respective categories but also demonstrate capabilities on par with 7B-13B LLMs. While focusing on SLMs, our approach exhibits scalability in both model and data dimensions for future LLM research. Regarding model scaling, we employ extensive model wind tunnel experiments for stable and optimal scaling. For data scaling, we introduce a Warmup-Stable-Decay (WSD) learning rate scheduler (LRS), conducive to continuous training and domain adaptation. We present an in-depth analysis of the intriguing training dynamics that occurred in the WSD LRS. With WSD LRS, we are now able to efficiently study data-model scaling law without extensive retraining experiments on both axes of model and data, from which we derive the much higher compute optimal data-model ratio than Chinchilla Optimal. Additionally, we introduce MiniCPM family, including MiniCPM-DPO, MiniCPM-MoE and MiniCPM-128K, whose excellent performance further cementing MiniCPM's foundation in diverse SLM applications. MiniCPM models are available publicly at https://github.com/OpenBMB/MiniCPM .