[论文解读] Towards Green AI in Fine-tuning Large Language Models via Adaptive Backpropagation
GreenTrainer 是一种用于大语言模型的新型微调方法,通过自适应选择基于反向传播成本和对模型准确率贡献的可训练张量,将 FLOPs 最多降低 64%,且无显著准确率损失。其性能优于 LoRA,在相当的 FLOPs 降低水平下,准确率最高可提升 4%,通过动态、以目标为导向的计算优化实现更绿色的 AI 训练。
Fine-tuning is the most effective way of adapting pre-trained large language models (LLMs) to downstream applications. With the fast growth of LLM-enabled AI applications and democratization of open-souced LLMs, fine-tuning has become possible for non-expert individuals, but intensively performed LLM fine-tuning worldwide could result in significantly high energy consumption and carbon footprint, which may bring large environmental impact. Mitigating such environmental impact towards Green AI directly correlates to reducing the FLOPs of fine-tuning, but existing techniques on efficient LLM fine-tuning can only achieve limited reduction of such FLOPs, due to their ignorance of the backpropagation cost in fine-tuning. To address this limitation, in this paper we present GreenTrainer, a new LLM fine-tuning technique that adaptively evaluates different tensors' backpropagation costs and contributions to the fine-tuned model accuracy, to minimize the fine-tuning cost by selecting the most appropriate set of tensors in training. Such selection in GreenTrainer is made based on a given objective of FLOPs reduction, which can flexibly adapt to the carbon footprint in energy supply and the need in Green AI. Experiment results over multiple open-sourced LLM models and abstractive summarization datasets show that, compared to fine-tuning the whole LLM model, GreenTrainer can save up to 64% FLOPs in fine-tuning without any noticeable model accuracy loss. Compared to the existing fine-tuning techniques such as LoRa, GreenTrainer can achieve up to 4% improvement on model accuracy with on-par FLOPs reduction.
研究动机与目标
- 为解决大规模大语言模型微调带来的高能耗和碳足迹问题,通过降低训练过程中的 FLOPs 来实现。
- 克服现有方法仅关注参数更新 FLOPs 而忽略反向传播成本的局限性。
- 开发一种技术,根据灵活的 FLOPs 降低目标,自适应选择对反向传播最具影响力的张量。
- 通过根据能源供应碳足迹动态调整可训练张量的选择,最小化 FLOPs 降低过程中的准确率损失。
- 实现可持续的绿色 AI 微调,平衡不同能源环境下的计算效率与模型性能。
提出的方法
- GreenTrainer 自适应评估神经网络张量在反向传播中的重要性,基于其对模型准确率的贡献和计算成本。
- 其制定了一种可灵活调整的 FLOPs 降低目标,可根据能源供应的碳足迹进行调节,从而实现实时的效率与准确率权衡。
- 该方法仅对最关键的张量启用反向传播,从而降低激活梯度计算的 FLOPs,该部分占总训练 FLOPs 的至少 33%。
- 它使用运行时张量重要性度量,避免依赖输入归因方法,后者对模型参数不适用。
- 该方法通过聚焦于选择性反向传播而非参数更新,与现有的 LoRA 风格参数高效微调技术兼容。
- 该方法支持多种大语言模型规模和架构,包括 OPT 和 LLaMA,并已开源供社区使用。
实验结果
研究问题
- RQ1选择性反向传播是否能在保持模型准确率的前提下,显著降低大语言模型微调的 FLOPs?
- RQ2基于反向传播成本和贡献的可训练张量自适应选择,如何影响微调的效率与准确率?
- RQ3与全量微调及现有方法(如 LoRA)相比,GreenTrainer 能将 FLOPs 降低多少?
- RQ4GreenTrainer 在不同规模的大语言模型和下游任务上的性能表现如何?
- RQ5该方法是否可灵活调节,以适配能源供应中变化的碳足迹水平?
主要发现
- 与全量微调相比,GreenTrainer 将微调 FLOPs 最多降低 64%,在多个数据集和模型上均无明显准确率损失。
- 在 OPT-6.7B 模型上,GT-0.4 在 SciTLDR 数据集上比 LoRA 节省 60% 的 FLOPs,同时保持相同准确率。
- 与 LoRA 相比,GreenTrainer 在相同 FLOPs 降低水平下,于 SciTLDR 数据集上 ROUGE 分数最高提升 4%。
- 对于 OPT-350M 模型,GT-0.5 在 SciTDR 数据集上节省 50% 的 FLOPs,并实现 2%-4% 更高的准确率。
- 在更大模型如 OPT-2.7B 和 OPT-6.7B 上,GreenTrainer 在 FLOPs 降低方面持续优于 LoRA,且保持或提升准确率。
- 该方法在模型规模上具有良好的可扩展性,从 350M 到 6.7B 参数,均在效率和性能方面表现出一致优势。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。