BlockLLM:通过选择和优化正确的坐标块实现LLM的内存高效适配
BlockLLM: Memory-Efficient Adaptation of LLMs by Selecting and Optimizing the Right Coordinate Blocks
AI总结:
BlockLLM受块坐标下降启发,通过选择并优化少量坐标块实现LLM内存高效微调与预训练,在GLUE基准上以少于5%参数取得最先进困惑度,并显著降低内存占用。
摘要:
训练大型语言模型(LLM)进行预训练或适应新任务和新领域,随着其应用范围的扩大而变得日益关键。然而,随着模型和数据规模的增大,训练过程带来了显著的内存挑战,通常需要大量可能无法轻易获得的GPU内存。现有方法如低秩适配(LoRA)添加了可训练的低秩矩阵分解,改变了训练动态,并将模型的参数搜索限制在低秩子空间内。GaLore是一种较新的方法,采用梯度低秩投影来减少内存占用,在全参数训练设置下有效。然而,GaLore只能应用于满足“可逆性”属性的LLM层子集,从而限制了其适用性。针对这些挑战,我们引入了BlockLLM,这是一种受块坐标下降启发的方法。我们的方法精心选择并更新一小部分可训练参数,而不改变其任何架构和训练过程。BlockLLM在微调和预训练任务中均达到了最先进的性能,同时减少了底层优化过程的内存占用。我们的实验表明,仅使用不到5%的参数进行微调,BlockLLM在GLUE基准上取得了最先进的困惑度分数。在C4数据集上预训练的Llama模型上,BlockLLM能够以显著少于最先进方法的内存进行训练,同时仍保持有竞争力的性能。
英文摘要:
Training large language models (LLMs) for pretraining or adapting to new tasks and domains has become increasingly critical as their applications expand. However, as the model and the data sizes grow, the training process presents significant memory challenges, often requiring a prohibitive amount of GPU memory that may not be readily available. Existing methods such as low-rank adaptation (LoRA) add trainable low-rank matrix factorizations, altering the training dynamics and limiting the model's parameter search to a low-rank subspace. GaLore, a more recent method, employs Gradient Low-Rank Projection to reduce the memory footprint, in the full parameter training setting. However GaLore can only be applied to a subset of the LLM layers that satisfy the "reversibility" property, thus limiting their applicability. In response to these challenges, we introduce BlockLLM, an approach inspired by block coordinate descent. Our method carefully selects and updates a very small subset of the trainable parameters without altering any part of its architecture and training procedure. BlockLLM achieves state-of-the-art performance in both finetuning and pretraining tasks, while reducing the memory footprint of the underlying optimization process. Our experiments demonstrate that fine-tuning with only less than 5% of the parameters, BlockLLM achieves state-of-the-art perplexity scores on the GLUE benchmarks. On Llama model pretrained on C4 dataset, BlockLLM is able to train with significantly less memory than the state-of-the-art, while still maintaining competitive performance.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。