arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.18203cs.CL
收藏

IAPT:面向大语言模型的指令感知提示微调

IAPT: Instruction-Aware Prompt Tuning for Large Language Models

East China Normal University(华东师范大学);Carnegie Mellon University(卡内基梅隆大学);University of Minnesota(明尼苏达大学);Pingan Technology(平安科技)

Wei Zhu, Aaron Xuxiang Tian, Congrui Yin, Yuan Ni, Xiaoling Wang, Guotong Xie

AI总结:

本文提出指令感知提示微调方法IAPT,仅用四个软令牌,通过在各Transformer层设置带瓶颈结构的软提示生成器并自动学习特有激活函数,在参数相当下优于基线且在多租户设置中比LoRA更高效。

摘要:

软提示微调是一种被广泛研究的参数高效微调方法。然而,它有一个明显的缺点:必须将大量软令牌插入输入序列中,以保证下游性能。因此,在大语言模型(LLM)时代,软提示微调比低秩适应(LoRA)更少被考虑。在这项工作中,我们提出了一种新颖的提示微调方法,即指令感知提示微调(IAPT),它只需要四个软令牌。首先,我们在每个Transformer层安装一个参数高效的软提示生成器,为每个输入指令生成特有的软提示。生成的软提示可以看作输入指令的语义摘要,并能够有效引导输出生成。其次,软提示生成器是具有瓶颈架构的模块,由自注意力池化操作、两个线性投影和一个激活函数组成。初步实验表明,不同Transformer层的提示生成器需要不同的激活函数。因此,我们提出借助有理函数自动学习提示生成器特有的激活函数。我们在各种任务上进行了实验,实验结果表明:(a) 我们的IAPT方法在可调参数相当的情况下能够优于最近的基线方法。(b) 在单骨干多租户设置下,我们的IAPT方法比LoRA更高效。

英文摘要:

Soft prompt tuning is a widely studied parameter-efficient fine-tuning method. However, it has a clear drawback: many soft tokens must be inserted into the input sequences to guarantee downstream performance. As a result, soft prompt tuning is less considered than Low-rank adaptation (LoRA) in the large language modeling (LLM) era. In this work, we propose a novel prompt tuning method, Instruction-Aware Prompt Tuning (IAPT), that requires only four soft tokens. First, we install a parameter-efficient soft prompt generator at each Transformer layer to generate idiosyncratic soft prompts for each input instruction. The generated soft prompts can be seen as a semantic summary of the input instructions and can effectively guide the output generation. Second, the soft prompt generators are modules with a bottleneck architecture consisting of a self-attention pooling operation, two linear projections, and an activation function. Pilot experiments show that prompt generators at different Transformer layers require different activation functions. Thus, we propose to learn the idiosyncratic activation functions for prompt generators automatically with the help of rational functions. We have conducted experiments on various tasks, and the experimental results demonstrate that (a) our IAPT method can outperform the recent baselines with comparable tunable parameters. (b) Our IAPT method is more efficient than LoRA under the single-backbone multi-tenant setting.

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

↑