提出自适应分解提示调优,提升小参数微调效果且不增加推理时间。
ADePT: Adaptive Decomposed Prompt Tuning for Parameter-Efficient Fine-tuning
- 用轻量神经网络动态生成每个词的嵌入偏移,实现自适应调整。
- 在23个NLP任务上优于现有方法,部分场景超过全量微调。
- 无需额外参数或更长推理时间,适合资源受限场景使用。
提示调优(PT)通过优化少量软虚拟标记来适配预训练大模型,而分解提示调优(DePT)通过将软提示分解为短软提示和一对低秩矩阵,提升了适配能力并加快了推理速度。然而,本文发现DePT的位置依赖嵌入偏移限制其泛化能力,且共享偏移导致优化不足。为此,我们提出自适应分解提示调优(ADePT),由短软提示与浅层共享前馈神经网络组成,通过该网络为每个输入词学习自适应嵌入偏移,实现更优的优化与泛化。ADePT在23个自然语言处理任务及4种不同规模的PLMs上均优于现有参数高效微调方法,部分场景甚至超越全量微调,且不增加推理时间或可训练参数。我们还提供了理论分析。代码已开源。
原文摘要 · Abstract (English)
Prompt Tuning (PT) enables the adaptation of Pre-trained Large Language Models (PLMs) to downstream tasks by optimizing a small amount of soft virtual tokens, which are prepended to the input token embeddings. Recently, Decomposed Prompt Tuning (DePT) has demonstrated superior adaptation capabilities by decomposing the soft prompt into a shorter soft prompt and a pair of low-rank matrices. The product of the pair of low-rank matrices is added to the input token embeddings to offset them. Additionally, DePT achieves faster inference compared to PT due to the shorter soft prompt. However, in this paper, we find that the position-based token embedding offsets of DePT restrict its ability to generalize across diverse model inputs, and that the shared embedding offsets across many token embeddings result in sub-optimization. To tackle these issues, we introduce Adaptive Decomposed Prompt Tuning (ADePT), which is composed of a short soft prompt and a shallow token-shared feed-forward neural network. ADePT utilizes the token-shared feed-forward neural network to learn the embedding offsets for each token, enabling adaptive embedding offsets that vary according to the model input and better optimization of token embedding offsets. This enables ADePT to achieve superior adaptation performance without requiring more inference time or additional trainable parameters compared to vanilla PT and its variants. In comprehensive experiments across 23 natural language processing tasks and 4 typical PLMs of different scales, ADePT consistently surpasses the other leading parameter-efficient fine-tuning methods, and even outperforms the full fine-tuning in certain scenarios. We also provide a theoretical analysis towards ADePT. Code is available at https://github.com/HungerPWAY/ADePT.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。