arXiv:2502.04517cs.LGcs.CL2025-02ICML被引 7

用单次调用实现高效文本生成,降低推理成本

Towards Cost-Effective Reward Guided Text Generation

  • 设计新奖励模型架构,每步仅需一次调用即可评估所有候选词
  • 推理速度比现有方法快,且生成质量接近传统RLHF方法
  • 适合需要低延迟生成的应用场景,如实时对话系统

奖励引导文本生成(RGTG)已成为离线强化学习人类反馈(RLHF)的可行替代方案。与标准RLHF不同,RGTG无需额外训练即可对齐语言模型与人类偏好。然而,其依赖奖励模型在推理阶段对每个候选词评分,带来显著的运行开销。此外,奖励模型通常仅针对完整序列训练,导致部分序列选择次优。本文提出一种新型奖励模型架构,采用Bradley-Terry损失训练,使模型在每一步生成中仅需一次调用,即可同时给出所有候选词的得分,实现高效推理。我们从理论上分析了多种RGTG奖励模型,证明先前方法在推理时倾向于选择次优序列。实验表明,本方法显著提升推理速度,减少奖励模型调用次数,且性能可媲美以往RGTG及离线RLHF方法。

原文摘要 · Abstract (English)

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.

文本生成奖励模型推理优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。