arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.07282cs.CLcs.AIcs.LG
收藏

HARP:Transformer推理过程中的犹豫感知重框定

HARP: Hesitation-Aware Reframing in Transformer Inference Pass

Seoul National University(首尔大学)

Romain Storaï, Seung-won Hwang

AI总结:

HARP通过选择性额外计算和输入重框定,模拟人类犹豫机制,在多种任务上提升Transformer模型性能高达5.16%,且推理速度比束搜索快两倍。

摘要:

本文旨在通过解决推理步骤中可变的计算需求(某些token比其他token需要更多的计算资源)来提升大型语言模型的性能。我们提出了HARP,一种对“现成”Transformer前向传播的简单修改。借鉴决策中的犹豫和框架效应,HARP在模型于token生成过程中遇到不确定性时,选择性地应用额外计算。我们的方法通过暂停于困难决策点并重新框定输入以获取不同视角,模拟人类认知过程。与其他方法不同,HARP是模型无关的、无需训练且易于实现的。我们在多种下游任务和模型规模上评估了我们的方法,展示了高达+5.16%的性能提升。值得注意的是,HARP在实现这些增益的同时,推理时间比束搜索快两倍。简单却收益显著,HARP为自适应计算在提升基于Transformer的语言模型性能方面的潜力提供了见解。

英文摘要:

This paper aims to improve the performance of large language models by addressing the variable computational demands in inference steps, where some tokens require more computational resources than others. We present HARP, a simple modification to "off-the-shelf" Transformer forward pass. Drawing from hesitation and the framing effect in decision-making, HARP selectively applies additional computation when the model encounters uncertainty during token generation. Our method mimics human cognitive processes by pausing at difficult decision points and reframing inputs for a different perspective. Unlike other approaches, HARP is model-agnostic, training-free, and easy to implement. We evaluate our method across various downstream tasks and model sizes, demonstrating performance improvements up to +5.16%. Notably, HARP achieves these gains while maintaining inference times twice faster than beam search. Simple and yet with significant gains, HARP provides insights into the potential of adaptive computation for enhancing the performance of Transformer-based language models.

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

↑