arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.03587cs.CLcs.AIcs.LG
收藏

并非所有适配器都重要:面向语言模型内存高效微调的选择性适配器冻结

Not All Adapters Matter: Selective Adapter Freezing for Memory-Efficient Fine-Tuning of Language Models

Korea University(韩国大学);Arizona State University(亚利桑那州立大学);Soongsil University(顺天大学)

Hyegang Son, Yonglak Son, Changhoon Kim, Young Geun Kim

AI总结:

针对 adapter-tuning 资源开销较大的问题,本文提出 SAFE,依据适配器重要性提前逐步冻结不重要适配器,在保持或提升性能的同时显著降低显存、计算与训练时间。

摘要:

基于 Transformer 的大规模预训练模型取得了巨大成功。微调是将这些模型用于下游任务的标准做法。在各类微调方法中,adapter-tuning 通过引入轻量级可训练模块,同时冻结大多数预训练参数,提供了一种参数高效的微调方式。然而,现有 adapter-tuning 方法仍会造成大量资源占用。通过研究,我们表明每个适配器对任务性能和资源使用的贡献并不相同。受此洞见启发,我们提出了 Selective Adapter FrEezing(SAFE,选择性适配器冻结),它会在早期逐步冻结较不重要的适配器,以在保持性能的同时减少不必要的资源使用。实验中,SAFE 将内存使用量、计算量和训练时间分别降低了 42.85%、34.59% 和 11.82%,同时取得了与基线相当或更好的任务性能。我们还证明,SAFE 会产生正则化效应,从而平滑损失景观,使模型能够通过避免尖锐最小值实现更好的泛化。

英文摘要:

Transformer-based large-scale pre-trained models achieve great success. Fine-tuning is the standard practice for leveraging these models in downstream tasks. Among the fine-tuning methods, adapter-tuning provides a parameter-efficient fine-tuning by introducing lightweight trainable modules while keeping most pre-trained parameters frozen. However, existing adapter-tuning methods still impose substantial resource usage. Through our investigation, we show that each adapter unequally contributes to both task performance and resource usage. Motivated by this insight, we propose Selective Adapter FrEezing (SAFE), which gradually freezes less important adapters early to reduce unnecessary resource usage while maintaining performance. In our experiments, SAFE reduces memory usage, computation amount, and training time by 42.85\%, 34.59\%, and 11.82\%, respectively, while achieving comparable or better task performance compared to the baseline. We also demonstrate that SAFE induces regularization effect, thereby smoothing the loss landscape, which enables the model to generalize better by avoiding sharp minima.

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

↑