Prompt tuning (PT), where a small amount of trainable soft (continuous) prompt vectors is affixed to the input of language models (LM), has shown promising results across various tasks and models for parameter-efficient fine-tuning (PEFT). PT stands out from other PEFT approaches because it maintains competitive performance with fewer trainable parameters and does not drastically scale up its parameters as the model size expands. However, PT introduces additional soft prompt tokens, leading to longer input sequences, which significantly impacts training and inference time and memory usage due to the Transformer's quadratic complexity. Particularly concerning for Large Language Models (LLMs) that face heavy daily querying. To address this issue, we propose Decomposed Prompt Tuning (DePT), which decomposes the soft prompt into a shorter soft prompt and a pair of low-rank matrices that are then optimised with two different learning rates. This allows DePT to achieve better performance while saving over 20% memory and time costs compared to vanilla PT and its variants, without changing trainable parameter sizes. Through extensive experiments on 23 natural language processing (NLP) and vision-language (VL) tasks, we demonstrate that DePT outperforms state-of-the-art PEFT approaches, including the full fine-tuning baseline in some scenarios. Additionally, we empirically show that DEPT grows more efficient as the model size increases. Our further study reveals that DePT integrates seamlessly with parameter-efficient transfer learning in the few-shot learning setting and highlights its adaptability to various model architectures and sizes.
翻译:提示微调(PT)通过将少量可训练的软(连续)提示向量附加到语言模型(LM)的输入上,在参数高效微调(PEFT)的各种任务和模型中展现出良好效果。与其他PEFT方法不同,PT以更少的可训练参数维持竞争性能,且其参数量不会随模型规模扩大而急剧增长。然而,PT会引入额外的软提示token,导致输入序列变长,由于Transformer的二次复杂度特性,这会显著影响训练和推理时间及内存使用。这对面临高频日常查询的大型语言模型(LLM)尤为突出。为解决该问题,我们提出分解式提示微调(DePT),将软提示分解为更短的软提示和一对低秩矩阵,并使用两种不同的学习率进行优化。这使得DePT在保持可训练参数规模不变的情况下,相比原始PT及其变体,能实现更优性能并节省超过20%的内存与时间成本。通过在23项自然语言处理(NLP)和视觉-语言(VL)任务上的广泛实验,我们证明DePT优于最先进的PEFT方法,在某些场景下甚至超越全参数微调基线。此外,我们通过实验表明,DePT随着模型规模增大效率会进一步提升。进一步研究发现,DePT在少样本学习场景中可与参数高效迁移学习无缝集成,并突显其适应不同模型架构与规模的灵活性。