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

预测令牌的同时预测奖励:面向大语言模型高效推理干预的非侵入式参数插入

Predicting Rewards Alongside Tokens: Non-disruptive Parameter Insertion for Efficient Inference Intervention in Large Language Model

Alibaba Group(阿里巴巴集团);The University of Manchester(曼彻斯特大学)

Chenhan Yuan, Fei Huang, Ru Peng, Keming Lu, Bowen Yu, Chang Zhou, Jingren Zhou

AI总结:

提出非侵入式参数插入方法Otter,在Transformer中插入参数以同时预测奖励信号,节省86.5%空间和98.5%时间,并兼容现有推理引擎。

摘要:

基于Transformer的大语言模型(LLMs)存在生成不安全响应、推理不可靠等问题。现有的推理干预方法试图通过微调额外的模型来产生校准信号(如奖励),以引导LLM的解码过程,从而缓解这些问题。然而,由于需要单独的模型,这种方法引入了大量的时间和空间开销。本工作提出非侵入式参数插入(Otter),在Transformer架构中插入额外参数,以在预测原始LLM输出的同时预测校准信号。Otter在多个高要求任务上实现了最先进的性能,同时节省高达86.5%的额外空间和98.5%的额外时间。此外,Otter可与现有推理引擎无缝集成,仅需一行代码更改,且参数插入后原始模型响应仍然可用。我们的代码公开于\url{https://github.com/chenhan97/Otter}。

英文摘要:

Transformer-based large language models (LLMs) exhibit limitations such as generating unsafe responses, unreliable reasoning, etc. Existing inference intervention approaches attempt to mitigate these issues by finetuning additional models to produce calibration signals (such as rewards) that guide the LLM's decoding process. However, this solution introduces substantial time and space overhead due to the separate models required. This work proposes Non-disruptive parameters insertion (Otter), inserting extra parameters into the transformer architecture to predict calibration signals along with the original LLM output. Otter offers state-of-the-art performance on multiple demanding tasks while saving up to 86.5\% extra space and 98.5\% extra time. Furthermore, Otter seamlessly integrates with existing inference engines, requiring only a one-line code change, and the original model response remains accessible after the parameter insertion. Our code is publicly available at \url{https://github.com/chenhan97/Otter}

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

↑