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

大型语言模型(LLM)在低资源环境下的不同高效微调方法的比较分析

Comparative Analysis of Different Efficient Fine Tuning Methods of Large Language Models (LLMs) in Low-Resource Setting

Georgia Institute of Technology(佐治亚理工学院)

Krishna Prasad Varadarajan Srinivasan, Prasanth Gumpena, Madhusudhana Yattapu, Vishal H. Brahmbhatt

AI总结:

本文在低资源环境下比较了多种LLM高效微调方法,发现上下文蒸馏优于标准微调,而自适应微调和LoRA表现相当或略差,强调方法选择取决于资源和任务适应性。

摘要:

在大型语言模型(LLM)领域,arXiv:2305.16938 表明,少样本全模型微调——即香草微调(FT)和基于模式的微调(PBFT)——以及上下文学习(ICL)在域外(OOD)数据集上具有相似的泛化能力,但在任务适应性方面有所不同。然而,这两种方法都带来了挑战,尤其是在内存需求方面。在本文中,我们进一步尝试加深对 LLM 不同微调策略的理解,并旨在将多种策略置于同一平台上,与全模型微调在两个不同数据集上进行详细比较。为此,我们进行了一系列实验,首先在预训练模型上使用最先进的方法,如香草微调和基于模式的微调(PBFT),应用于 COLA 和 MNLI 两个数据集。然后,我们研究了自适应微调和 LoRA 适配器在少样本设置下的效率。最后,我们还比较了一种最近流行的替代方法——上下文蒸馏——与香草 FT 和 PBFT 在有无少样本设置下的表现。我们的研究结果表明,我们探索的这些替代策略可以展现出与香草 FT 和 PBFT 相当的域外泛化能力。PBFT 在域外(OOD)数据上的表现不如香草 FT,这强调了有效提示的必要性。此外,我们的自适应微调和 LoRA 实验表现与标准微调相当或略差,这符合预期,因为标准微调涉及对整个模型的调整。最后,我们的上下文蒸馏实验优于标准微调方法。这些发现强调,最终选择合适的微调方法取决于可用资源(内存、计算、数据)和任务适应性。

英文摘要:

In the domain of large language models (LLMs), arXiv:2305.16938 showed that few-shot full-model fine-tuning -- namely Vanilla Fine Tuning (FT) and Pattern-Based Fine Tuning (PBFT) --, and In-Context Learning (ICL) generalize similarly on Out-Of-Domain (OOD) datasets, but vary in terms of task adaptation. However, they both pose challenges, especially in term of memory requirements. In this paper, we further try to push the understanding of different fine-tuning strategies for LLM and aim to bring a myriad of these on the same pedestal for an elaborate comparison with full-model fine-tuning on two diverse datasets. To that end, we conducted a series of experiments, beginning with state-of-the-art methods like vanilla fine-tuning and Pattern-Based Fine-Tuning (PBFT) on pre-trained models across two datasets, COLA and MNLI. We then investigate adaptive fine-tuning and the efficiency of LoRA adapters in a few-shot setting. Finally, we also compare an alternative approach that has gained recent popularity -- context distillation -- with the vanilla FT and PBFT with and without few-shot setup. Our findings suggest that these alternative strategies that we explored can exhibit out-of-domain generalization comparable to that of vanilla FT and PBFT. PBFT under-performs Vanilla FT on out-of-domain (OOD) data, emphasizing the need for effective prompts. Further, our adaptive-fine tuning and LoRA experiments perform comparable or slightly worse than the standard fine-tunings as anticipated, since standard fine-tunings involve tuning the entire model. Finally, our context distillation experiments out-perform the standard fine-tuning methods. These findings underscore that eventually the choice of an appropriate fine-tuning method depends on the available resources (memory, compute, data) and task adaptability.

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

↑