arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.12419cs.LGcs.AIcs.CL
收藏

EBFT:面向稀疏大语言模型的高效分块微调方法

EBFT: Effective and Block-Wise Fine-Tuning for Sparse LLMs

Xiamen University(厦门大学);University of Notre Dame(圣母大学)

Song Guo, Fan Wu, Lei Zhang, Xiawu Zheng, Shengchuan Zhang, Fei Chao, Yiyu Shi, Rongrong Ji

AI总结:

EBFT通过最小化分块重构误差,以采样校准和逐块反向传播实现稀疏大语言模型的高效微调,在低资源下显著超越现有方法。

摘要:

现有的稀疏大语言模型微调方法通常面临资源密集和高昂重训成本的问题。此外,许多微调方法往往依赖近似或启发式优化策略,这可能导致次优解。为解决这些问题,我们提出了一种基于最小化重构误差的高效快速稀疏大语言模型微调框架。我们的方法包括采样一个小型数据集进行校准,并利用反向传播以逐块方式迭代优化分块重构误差,旨在获得最优解。在多个基准上的大量实验一致证明了我们的方法优于其他基线。例如,在 Wikitext2 数据集上,对 70% 稀疏度的 LlamaV1-7B 模型,我们提出的 EBFT 实现了 16.88 的困惑度,优于当前最先进的 DSnoT 的 75.14 困惑度。此外,在 26% 的结构化稀疏率下,EBFT 实现了 16.27 的困惑度,优于 LoRA(困惑度 16.44)。而且,EBFT 对 LlamaV1-7B 的微调过程仅需约 30 分钟,整个框架可在单个 16GB GPU 上执行。源代码可在 https://github.com/sunggo/EBFT 获取。

英文摘要:

Existing methods for fine-tuning sparse LLMs often suffer from resource-intensive requirements and high retraining costs. Additionally, many fine-tuning methods often rely on approximations or heuristic optimization strategies, which may lead to suboptimal solutions. To address these issues, we propose an efficient and fast framework for fine-tuning sparse LLMs based on minimizing reconstruction error. Our approach involves sampling a small dataset for calibration and utilizing backpropagation to iteratively optimize block-wise reconstruction error, on a block-by-block basis, aiming for optimal solutions. Extensive experiments on various benchmarks consistently demonstrate the superiority of our method over other baselines. For instance, on the Wikitext2 dataset with LlamaV1-7B at 70% sparsity, our proposed EBFT achieves a perplexity of 16.88, surpassing the state-of-the-art DSnoT with a perplexity of 75.14. Moreover, with a structured sparsity ratio of 26\%, EBFT achieves a perplexity of 16.27, outperforming LoRA (perplexity 16.44). Furthermore, the fine-tuning process of EBFT for LlamaV1-7B only takes approximately 30 minutes, and the entire framework can be executed on a single 16GB GPU. The source code is available at https://github.com/sunggo/EBFT.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑