LLaMA Pro: Progressive LLaMA with Block Expansion

📄 arXiv: 2401.02415v2 📥 PDF

作者: Chengyue Wu, Yukang Gan, Yixiao Ge, Zeyu Lu, Jiahao Wang, Ye Feng, Ying Shan, Ping Luo

分类: cs.CL

发布日期: 2024-01-04 (更新: 2024-05-30)

备注: Accepted by ACL 2024, Main Conference


💡 一句话要点

提出LLaMA Pro以解决大语言模型的灾难性遗忘问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大语言模型 灾难性遗忘 Transformer扩展 后训练方法 智能代理 编程辅助 数学任务

📋 核心要点

  1. 现有的大语言模型在学习新知识时容易出现灾难性遗忘,无法有效保留旧知识。
  2. 本文提出了一种通过扩展Transformer块的后训练方法,旨在在不遗忘旧知识的情况下提升模型能力。
  3. 实验结果显示,LLaMA Pro-8.3B在多个基准测试中表现优异,尤其在编程和数学任务上具有显著提升。

📝 摘要(中文)

人类通常在学习新技能时不会丧失旧技能,而大型语言模型(LLMs)却面临相反的挑战。为此,本文提出了一种新的后训练方法,通过扩展Transformer块来提升LLMs的能力。我们仅使用新语料对扩展的块进行调优,有效地提高模型的知识而不发生灾难性遗忘。实验结果表明,LLaMA Pro-8.3B在通用任务、编程和数学方面表现优异,超越了LLaMA家族中的现有开放模型,展现了作为智能代理在推理和处理多样任务方面的巨大潜力。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在学习新知识时出现的灾难性遗忘问题,现有方法在扩展模型能力时往往会导致旧知识的丧失。

核心思路:提出通过扩展Transformer块的方式进行后训练,利用新语料对扩展块进行调优,从而有效提升模型的知识而不影响已有知识。

技术框架:整体架构包括对LLaMA2-7B模型的初始化,扩展Transformer块的设计,以及对新语料的调优过程,形成一个高效的训练流程。

关键创新:最重要的创新在于通过块扩展的方式实现知识的有效积累,避免了传统方法中常见的灾难性遗忘,与现有方法相比具有本质的区别。

关键设计:在模型设计中,关键参数设置和损失函数的选择经过精心调整,以确保扩展块的有效性和模型整体性能的提升。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,LLaMA Pro-8.3B在多个基准测试中表现优异,尤其在编程和数学任务上,超越了LLaMA家族中的现有开放模型,展示了在推理和多样任务处理方面的显著提升。

🎯 应用场景

该研究的潜在应用领域包括智能助手、编程辅助工具和教育领域的智能学习系统。通过提升模型在多种任务上的表现,LLaMA Pro有望在实际应用中提供更为智能和高效的解决方案,推动语言代理的发展。

📄 摘要(原文)

Humans generally acquire new skills without compromising the old; however, the opposite holds for Large Language Models (LLMs), e.g., from LLaMA to CodeLLaMA. To this end, we propose a new post-pretraining method for LLMs with an expansion of Transformer blocks. We tune the expanded blocks using only new corpus, efficiently and effectively improving the model's knowledge without catastrophic forgetting. In this paper, we experiment on the corpus of code and math, yielding LLaMA Pro-8.3B, a versatile foundation model initialized from LLaMA2-7B, excelling in general tasks, programming, and mathematics. LLaMA Pro and its instruction-following counterpart (LLaMA Pro-Instruct) achieve advanced performance among various benchmarks, demonstrating superiority over existing open models in the LLaMA family and the immense potential of reasoning and addressing diverse tasks as an intelligent agent. Our findings provide valuable insights into integrating natural and programming languages, laying a solid foundation for developing advanced language agents that operate effectively in various environments.