arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2411.05877cs.LGcs.AIcs.CLstat.ML
收藏

生成式适配器:通过单次前向传播在参数中情境化语言模型

Generative Adapter: Contextualizing Language Models in Parameters with A Single Forward Pass

Microsoft(微软);Microsoft Research(微软研究院);University of Washington(华盛顿大学)

Tong Chen, Hao Fang, Patrick Xia, Xiaodong Liu, Benjamin Van Durme, Luke Zettlemoyer, Jianfeng Gao, Hao Cheng

AI总结:

提出生成式适配器,通过自监督训练将新情境映射为低秩适配器,单次前向传播即可适应冻结语言模型,无需微调且降低推理开销,在知识获取、演示学习和个性化场景中显著提升性能。

摘要:

大型语言模型(LMs)通常通过微调或提示来适应新情境(例如定义新任务或领域文本提示)以提升性能。然而,这存在精度与计算之间的权衡——微调会带来显著的训练成本,而提示则会增加推理开销。我们提出生成式适配器(GenerativeAdapter),一种有效且高效的适应方法,直接将新情境映射为低秩语言模型适配器,从而显著降低推理开销且无需微调。适配器生成器通过自监督学习训练,可用于通过简单地将相关任务或领域情境映射到新适配器,使单个冻结语言模型适应任何新任务。我们将生成式适配器应用于两个预训练语言模型(Mistral-7B-Instruct和Llama2-7B-Chat),并在三种适应场景中评估适应后的模型:从文档中获取知识、从演示中学习以及用户个性化。在StreamingQA中,我们的方法能有效将知识注入语言模型参数,在长达32K令牌的情境下,F1分数相比监督微调模型提升63.5%(从19.5提升至31.5)。在MetaICL情境学习评估中,我们的方法在26个任务上平均准确率达44.9%,优于基础模型。在MSC上,我们的方法在记忆用户对话信息方面表现出高度竞争力,相比使用完整对话历史的提示,计算和内存成本降低4倍。综合这些结果,生成式适配器应能实现对广泛不同情境的通用适应。

英文摘要:

Large language models (LMs) are typically adapted to improve performance on new contexts (\eg text prompts that define new tasks or domains) through fine-tuning or prompting. However, there is an accuracy compute tradeoff -- fine-tuning incurs significant training cost and prompting increases inference overhead. We introduce $GenerativeAdapter$, an effective and efficient adaptation method that directly maps new contexts to low-rank LM adapters, thereby significantly reducing inference overhead with no need for finetuning. The adapter generator is trained via self-supervised learning, and can be used to adapt a single frozen LM for any new task simply by mapping the associated task or domain context to a new adapter. We apply $GenerativeAdapter$ to two pretrained LMs (Mistral-7B-Instruct and Llama2-7B-Chat) and evaluate the adapted models in three adaption scenarios: knowledge acquisition from documents, learning from demonstrations, and personalization for users. In StreamingQA, our approach is effective in injecting knowledge into the LM's parameters, achieving a 63.5% improvement in F1 score over the model with supervised fine-tuning (from $19.5$ to $31.5$) for contexts as long as 32K tokens. In the MetaICL in-context learning evaluation, our method achieves an average accuracy of $44.9$ across 26 tasks, outperforming the base model. On MSC, our method proves to be highly competitive in memorizing user information from conversations with a 4x reduction in computation and memory costs compared to prompting with full conversation history. Together, these results suggest that $GenerativeAdapter$ should allow for general adaption to a wide range of different contexts.

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

↑