Skip to yearly menu bar Skip to main content


Poster

Controlled Decoding from Language Models

Sidharth Mudgal · Jong Lee · Harish Ganapathy · YaGuang Li · Tao Wang · Yanping Huang · Zhifeng Chen · Heng-Tze Cheng · Michael Collins · Trevor Strohman · Jilin Chen · Alex Beutel · Ahmad Beirami


Abstract: KL-regularized reinforcement learning (RL) is a popular alignment framework to control the language model responses towards high reward outcomes. We propose a modular solver for the RL objective, called controlled decoding (CD), that exerts control through a separate prefix scorer module, which is trained to learn a value function for the reward. The prefix scorer is used at inference time to control the generation from a frozen base model, provably sampling from a solution to the RL objective. We empirically demonstrate that CD is effective as a control mechanism on popular benchmarks. We also show that multiple prefix scorers learnt separately for different rewards may be aggregated at inference time, effectively solving a multi-objective RL problem with no additional training. We show that the benefits of applying CD transfer to an unseen base model with no further tuning. Finally, we show that CD can be applied in a blockwise decoding fashion at inference-time, essentially bridging the gap between the popular best-of-$n$ strategy and token-level control through reinforcement learning. This makes CD a promising approach for alignment of language models.

Live content is unavailable. Log in and register to view live content