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

迈向具有成本效益的奖励引导文本生成

Towards Cost-Effective Reward Guided Text Generation

University of Waterloo(滑铁卢大学);Vector Institute(向量研究所);Huawei Technologies(华为技术)

Ahmad Rashid, Ruotian Wu, Rongqi Fan, Hongliang Li, Agustinus Kristiadi, Pascal Poupart

AI总结:

本文提出一种只需单次调用即可同时为所有候选token评分的奖励模型架构,显著降低奖励引导文本生成的推理开销,并在性能上保持竞争力。

摘要:

奖励引导文本生成(RGTG)已成为离线基于人类反馈的强化学习(RLHF)的一种可行替代方案。RGTG方法能够在不进行标准RLHF方法中那种进一步训练的情况下,使基线语言模型与人类偏好对齐。然而,它们依赖一个奖励模型在推理时对语言模型生成的每个候选token进行评分,从而带来显著的测试时开销。此外,奖励模型通常只被训练用于对完整序列进行评分,这可能导致对部分序列做出次优选择。在这项工作中,我们提出了一种新颖的奖励模型架构,该架构使用Bradley-Terry损失进行训练,在生成过程的每一步只需对奖励模型进行单次调用即可偏好序列的最优扩展。也就是说,所有可能候选token的分数被同时生成,从而实现高效推理。我们从理论上分析了各种RGTG奖励模型,并证明与我们的方法相比,先前技术在推理过程中会偏好次优序列。在实证方面,我们的奖励模型相比其他RGTG方法显著加快了推理速度。它需要更少的奖励模型调用次数,并且与先前的RGTG和离线RLHF方法相比具有竞争力的性能。

英文摘要:

Reward-guided text generation (RGTG) has emerged as a viable alternative to offline reinforcement learning from human feedback (RLHF). RGTG methods can align baseline language models to human preferences without further training like in standard RLHF methods. However, they rely on a reward model to score each candidate token generated by the language model at inference, incurring significant test-time overhead. Additionally, the reward model is usually only trained to score full sequences, which can lead to sub-optimal choices for partial sequences. In this work, we present a novel reward model architecture that is trained, using a Bradley-Terry loss, to prefer the optimal expansion of a sequence with just a \emph{single call} to the reward model at each step of the generation process. That is, a score for all possible candidate tokens is generated simultaneously, leading to efficient inference. We theoretically analyze various RGTG reward models and demonstrate that prior techniques prefer sub-optimal sequences compared to our method during inference. Empirically, our reward model leads to significantly faster inference than other RGTG methods. It requires fewer calls to the reward model and performs competitively compared to previous RGTG and offline RLHF methods.

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

↑