Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learning
Haokun Liu Derek Tam∗ Mohammed Muqeeth∗、Jay Mohta Tenghao Huang Mohit Bansal Colin Raffel Department of Computer Science University of North Carolina at Chapel Hill Equal contribution.
Abstract
Few-shot in-context learning (ICL) enables pre-trained language models to perform a previously-unseen task without any gradient-based training by feeding a small number of training examples as part of the input. ICL incurs substantial computational, memory, and storage costs because it involves processing all of the training examples every time a prediction is made. Parameter-efficient fine-tuning (PEFT) (e.g. adapter modules, prompt tuning, sparse update methods, etc.) offers an alternative paradigm where a small set of parameters are trained to enable a model to perform the new task. In this paper, we rigorously compare few-shot ICL and PEFT and demonstrate that the latter offers better accuracy as well as dramatically lower computational costs. Along the way, we introduce a new PEFT method called (IA)3 that scales activations by learned vectors, attaining stronger performance while only introducing a relatively tiny amount of new parameters. We also propose a simple recipe based on the T0 model [1] called T-Few that can be applied to new tasks without task-specific tuning or modifications. We validate the effectiveness of T-Few on completely unseen tasks by applying it to the RA
中文速览
预训练语言模型在面对新任务时,普遍采用"上下文学习"(in-context learning,ICL)——把几个示例直接拼进输入里让模型推断——但每次预测都要重新处理所有示例,计算代价极高,性能也往往不如微调。为此,研究者提出用"参数高效微调"(parameter-efficient fine-tuning,PEFT)来替代ICL,并专门设计了一种新方法(IA)³:通过让模型用少量可学习向量对内部激活值做缩放,只需更新极少量参数(比全量微调少约一万倍)就能达到更强的任务性能。结合T0预训练模型和一套固定超参数,作者封装出一套开箱即用的方案"T-Few",在完全未见过的真实场景少样本基准RAFT上首次超越人类水平,绝对精度比此前最优方法高出6%,同时计算开销大幅低于ICL。这项工作不仅证明了少样本场景下PEFT全面优于ICL,更提供了一套可直接复用于新任务的实用配方,对推动高效、实用的大模型应用具有重要意义。
原文 arXiv:2205.05638;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2205.05638v2