arXiv:2502.00311cs.LG2025-02被引 4

通过稀疏梯度压缩,大幅降低大模型微调时的内存占用。

Sparse Gradient Compression for Fine-Tuning Large Language Models

  • 利用梯度内在稀疏性,将优化器状态投影到低维子空间。
  • 在多个下游任务上,内存减少超传统方法,性能更优。
  • 适合资源受限环境下高效微调大模型的研究者使用。

由于大语言模型(LLMs)的广泛应用及开源模型的日益普及,针对下游任务的微调变得愈发重要。然而,微调带来的高内存开销仍是主要挑战,尤其当模型规模增大时。为应对这一问题,参数高效微调(PEFT)方法被提出,以减少所需微调参数数量。但这些方法通常将优化器状态数量与模型参数维度绑定,限制了微调过程中的灵活性和控制力。本文提出稀疏梯度压缩(SGC),一种训练机制,通过将梯度投影至低维子空间来压缩优化器状态,且该子空间维度独立于原始模型参数。这种设计使优化器状态更新可在任意低维子空间中进行,从而灵活权衡内存效率与性能。实验表明,SGC在多个下游任务中显著降低优化器状态内存使用量,优于现有PEFT方法,并在数据有限和内存受限场景下均表现出更优性能。

原文摘要 · Abstract (English)

Fine-tuning large language models (LLMs) for downstream tasks has become increasingly crucial due to their widespread use and the growing availability of open-source models. However, the high memory costs associated with fine-tuning remain a significant challenge, especially as models increase in size. To address this, parameter efficient fine-tuning (PEFT) methods have been proposed to minimize the number of parameters required for fine-tuning LLMs. However, these approaches often tie the number of optimizer states to dimensions of model parameters, limiting flexibility and control during fine-tuning. In this paper, we propose sparse gradient compression (SGC), a training regime designed to address these limitations. Our approach leverages inherent sparsity in gradients to compress optimizer states by projecting them onto a low-dimensonal subspace, with dimensionality independent of the original model's parameters. By enabling optimizer state updates in an arbitrary low-dimensional subspace, SGC offers a flexible tradeoff between memory efficiency and performance. We demonstrate through experiments that SGC can decrease memory usage in optimizer states more effectively than existing PEFT methods. Furthermore, by fine-tuning LLMs on various downstream tasks, we show that SGC can deliver superior performance while substantially lowering optimizer state memory requirements, particularly in both data-limited and memory-limited settings.

大模型微调内存优化梯度压缩

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。