DropBP: Accelerating Fine-Tuning of Large Language Models by Dropping Backward Propagation

📄 arXiv: 2402.17812v4 📥 PDF

作者: Sunghyeon Woo, Baeseong Park, Byeongwook Kim, Minjung Jo, Se Jung Kwon, Dongsuk Jeon, Dongsoo Lee

分类: cs.LG, cs.CL

发布日期: 2024-02-27 (更新: 2025-02-28)

🔗 代码/项目: GITHUB


💡 一句话要点

提出DropBP以降低大语言模型微调的计算成本

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

关键词: 大语言模型 微调 计算成本 反向传播 深度学习 模型训练 参数高效微调 敏感性计算

📋 核心要点

  1. 现有大语言模型的训练在计算和内存方面存在显著的成本,尤其是在反向传播阶段。
  2. DropBP通过在反向传播中随机丢弃层,减少计算和激活内存,同时保持模型的准确性。
  3. 实验结果显示,DropBP能将训练时间减少44%,并在相同困惑度下加速收敛1.5倍。

📝 摘要(中文)

大语言模型(LLMs)在多个领域取得了显著成功,但其训练过程在前向和反向传播中通常需要大量的内存和计算资源。尽管参数高效微调(PEFT)在减少与参数相关的训练内存方面取得了一定进展,但仍未能解决显著的计算成本和激活内存问题。本文提出了一种新方法——DropBP,通过在反向传播过程中随机丢弃层,降低计算成本和激活内存,同时保持模型的准确性。DropBP根据每层的敏感性分配适当的丢弃率,从而稳定训练过程。实验结果表明,DropBP能够将训练时间减少44%,并在相同的困惑度下加速收敛1.5倍,同时在单个NVIDIA A100 GPU上支持更长序列的训练,提升吞吐量79%。

🔬 方法详解

问题定义:本文旨在解决大语言模型在训练过程中面临的高计算成本和内存消耗问题,尤其是在反向传播阶段。现有的参数高效微调方法虽然能减少参数相关的内存使用,但未能有效降低计算成本和激活内存的需求。

核心思路:DropBP的核心思想是通过在反向传播过程中随机丢弃某些层,从而训练由未丢弃层和残差连接生成的浅层子模块。这种方法能够有效降低计算负担,同时保持模型的准确性。

技术框架:DropBP的整体架构包括层的随机丢弃机制和敏感性计算模块。首先,在反向传播过程中随机选择要丢弃的层;其次,计算每层的敏感性,以便为每层分配合适的丢弃率,从而稳定训练过程。

关键创新:DropBP的主要创新在于其随机丢弃层的策略,这与传统的全层反向传播方法形成了鲜明对比。通过这种方式,DropBP不仅能减少计算成本,还能与各种参数高效微调方法正交集成。

关键设计:DropBP在实现过程中设置了层的丢弃率,并设计了敏感性计算机制,以确保训练过程的稳定性和有效性。具体的参数设置和损失函数设计在论文中有详细描述。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,DropBP能够将训练时间减少44%,并在相同困惑度下加速收敛1.5倍。此外,DropBP在单个NVIDIA A100 GPU上支持更长序列的训练,吞吐量提升达到79%,在Intel Gaudi2 HPU上更是达到117%的提升。

🎯 应用场景

DropBP方法在大语言模型的训练中具有广泛的应用潜力,尤其是在需要处理大规模数据和长序列输入的场景。其降低计算成本和内存消耗的能力,使得在资源受限的环境中进行高效训练成为可能,未来可广泛应用于自然语言处理、对话系统等领域。

📄 摘要(原文)

Large language models (LLMs) have achieved significant success across various domains. However, training these LLMs typically involves substantial memory and computational costs during both forward and backward propagation. While parameter-efficient fine-tuning (PEFT) considerably reduces the training memory associated with parameters, it does not address the significant computational costs and activation memory. In this paper, we propose Dropping Backward Propagation (DropBP), a novel approach designed to reduce computational costs and activation memory while maintaining accuracy. DropBP randomly drops layers during backward propagation, which is essentially equivalent to training shallow submodules generated by undropped layers and residual connections. Additionally, DropBP calculates the sensitivity of each layer to assign an appropriate drop rate, thereby stabilizing the training process. DropBP is not only applicable to full fine-tuning but can also be orthogonally integrated with all types of PEFT by dropping layers during backward propagation. Specifically, DropBP can reduce training time by 44% with comparable accuracy to the baseline, accelerate convergence to the same perplexity by 1.5x, and enable training with a sequence length 6.2x larger on a single NVIDIA-A100 GPU. Furthermore, our DropBP enabled a throughput increase of 79% on a NVIDIA A100 GPU and 117% on an Intel Gaudi2 HPU. The code is available at https://github.com/WooSunghyeon/dropbp.