arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2403.06914cs.CLcs.AI
收藏

MEND: 面向高效高效果上下文学习的元示范蒸馏

MEND: Meta dEmonstratioN Distillation for Efficient and Effective In-Context Learning

Worcester Polytechnic Institute(伍斯特理工学院);Amazon Alexa AI(亚马逊Alexa人工智能部门)

Yichuan Li, Xiyao Ma, Sixing Lu, Kyumin Lee, Xiaohu Liu, Chenlei Guo

AI总结:

本研究提出MEND元示范蒸馏框架,通过两阶段训练让模型习得蒸馏示范的元知识,无需任务级重训练即可压缩示范向量,在7类ICL任务上性能媲美或超越现有方法,同时显著降低计算开销。

摘要:

大语言模型(LLM)已展现出令人瞩目的上下文学习(ICL)能力,即LLM结合少量输入-输出对(示范样本)对给定测试输入做出预测。然而,加入示范样本会导致自注意力机制的计算开销呈二次增长。现有方案试图将冗长的示范样本蒸馏为紧凑向量,但这类方法往往需要针对特定任务重新训练,或是会折损LLM的上下文学习性能。为缓解这些挑战,我们提出元示范蒸馏(Meta dEmonstratioN Distillation,MEND)框架,该框架下的语言模型无需为新的下游任务重新训练,即可学习将任意冗长的示范样本蒸馏为向量。我们利用知识蒸馏增强MEND与LLM之间的对齐,同时实现效率与效果的提升。MEND通过包含元蒸馏预训练和微调的两阶段训练过程,习得蒸馏示范样本的元知识。我们使用仅解码器架构(GPT-2)和编码器-解码器架构(T5),在7个不同的ICL任务分区上开展了全面评估,结果验证了MEND的优异性能。它不仅能媲美甚至常常超越普通ICL及其他最先进的蒸馏模型,同时还显著降低了计算需求。这一创新有望提升大语言模型实际部署的可扩展性与效率。

英文摘要:

Large Language models (LLMs) have demonstrated impressive in-context learning (ICL) capabilities, where a LLM makes predictions for a given test input together with a few input-output pairs (demonstrations). Nevertheless, the inclusion of demonstrations leads to a quadratic increase in the computational overhead of the self-attention mechanism. Existing solutions attempt to distill lengthy demonstrations into compact vectors. However, they often require task-specific retraining or compromise LLM's in-context learning performance. To mitigate these challenges, we present Meta dEmonstratioN Distillation (MEND), where a language model learns to distill any lengthy demonstrations into vectors without retraining for a new downstream task. We exploit the knowledge distillation to enhance alignment between MEND and LLM, achieving both efficiency and effectiveness simultaneously. MEND is endowed with the meta-knowledge of distilling demonstrations through a two-stage training process, which includes meta-distillation pretraining and fine-tuning. Comprehensive evaluations across seven diverse ICL task partitions using decoder-only (GPT-2) and encoder-decoder (T5) attest to MEND's prowess. It not only matches but often outperforms the Vanilla ICL as well as other state-of-the-art distillation models, while significantly reducing the computational demands. This innovation promises enhanced scalability and efficiency for the practical deployment of large language models

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

↑