arXiv:2410.06364cs.LG2024-10ICML被引 3

用压缩技巧让大模型微调更省内存、更快更准

Sketch to Adapt: Fine-Tunable Sketches for Efficient LLM Adaptation

  • 将模型权重压缩成可微调的紧凑草图,统一压缩与微调流程
  • 在小模型上实现比LoRA等方法更高的准确率,参数量少7.3倍
  • 适合需要高效微调大模型的科研与工业场景

大规模语言模型(LLM)微调面临参数量巨大的挑战。现有参数高效微调(PEFT)方法通常采用附加适配器,但受限于低秩假设,性能常不理想。本文发现,数据压缩中的压缩技术(sketching)可作为高效的微调策略,无需低秩约束。提出SketchTune,将模型权重压缩为可微调的紧凑草图,整合压缩与微调,避免传统方法复杂的双路径计算,显著提升训练与推理效率。该方法基于矩阵近似理论,证明了某些矩阵更适合用压缩方式逼近。在Llama和Mistral模型上的大量实验表明,SketchTune在多种任务上优于主流PEFT方法:使用2.6-3.5倍更小的基模型,超越LoRA、DoRA、S2FT在常识与数学基准的表现;在GSM8K任务上精度比LoftQ高14.48%,同时仅需7.3倍更少的可训练参数。代码已开源。

原文摘要 · Abstract (English)

Adapting pre-trained large language models (LLMs) is crucial but challenging due to their enormous size. Parameter-efficient fine-tuning (PEFT) techniques typically employ additive adapters applied to frozen model weights. To further reduce memory usage, model weights are often compressed through quantization. However, existing PEFT methods often yield suboptimal model quality because they rely on restrictive assumptions, such as low-rank constraints on adapters to limit the number of trainable parameters. We find that sketching, a popular data compression technique, can serve as an efficient LLM adaptation strategy while avoiding the low-rank assumption. We introduce SketchTune, a compressive adaptation strategy that compresses LLM weights into compact fine-tunable sketches, integrating compression and adaptation into a unified framework. This integration eliminates the need for complex two-path computation in existing PEFT techniques, enabling faster and more memory-efficient training and inference. SketchTune is supported by mathematical insights into matrix classes that are better approximated using sketching rather than low-rank methods. Our extensive evaluations with Llama and Mistral models demonstrate that SketchTune outperforms leading PEFT methods across diverse tasks while using substantially smaller base models and comparable trainable parameters. As a highlight, SketchTune outperforms LoRA, DoRA, and S2FT on commonsense and math benchmarks using 2.6-3.5$\times$ smaller base models and exceeds LoftQ in accuracy by 14.48% on GSM8K with 7.3$\times$ fewer trainable parameters. Our code is available at https://github.com/LeanModels/SketchTune.

大模型微调压缩适配参数效率

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