A Critical Look At Tokenwise Reward-Guided Text Generation

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Rashid, Ahmad, Wu, Ruotian, Grosse, Julia, Kristiadi, Agustinus, Poupart, Pascal
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912606635163648
author Rashid, Ahmad
Wu, Ruotian
Grosse, Julia
Kristiadi, Agustinus
Poupart, Pascal
author_facet Rashid, Ahmad
Wu, Ruotian
Grosse, Julia
Kristiadi, Agustinus
Poupart, Pascal
contents Large language models (LLMs) can be improved by aligning with human preferences through fine-tuning -- the so-called reinforcement learning from human feedback (RLHF). However, the cost of fine-tuning an LLM is prohibitive for many users. Due to their ability to bypass LLM fine-tuning, prediction-time tokenwise reward-guided text generation (RGTG) methods have recently been proposed. They use a reward model trained on full sequences to score partial sequences during decoding in a bid to steer the generation towards sequences with high rewards. However, these methods have so far been only heuristically motivated and poorly analyzed. In this work, we show that reward models trained on full sequences are not compatible with scoring partial sequences. To alleviate this, we propose to train a Bradley-Terry reward model on partial sequences explicitly, and autoregressively sample from the implied tokenwise policy during decoding. We study the properties of this reward model and the resulting policy: we show that this policy is proportional to the ratio of two distinct RLHF policies. Our simple approach outperforms previous RGTG methods and performs similarly to strong offline baselines without large-scale LLM fine-tuning. Code for our work is available at https://github.com/ahmadrash/PARGS
format Preprint
id arxiv_https___arxiv_org_abs_2406_07780
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle A Critical Look At Tokenwise Reward-Guided Text Generation
Rashid, Ahmad
Wu, Ruotian
Grosse, Julia
Kristiadi, Agustinus
Poupart, Pascal
Machine Learning
Computation and Language
Large language models (LLMs) can be improved by aligning with human preferences through fine-tuning -- the so-called reinforcement learning from human feedback (RLHF). However, the cost of fine-tuning an LLM is prohibitive for many users. Due to their ability to bypass LLM fine-tuning, prediction-time tokenwise reward-guided text generation (RGTG) methods have recently been proposed. They use a reward model trained on full sequences to score partial sequences during decoding in a bid to steer the generation towards sequences with high rewards. However, these methods have so far been only heuristically motivated and poorly analyzed. In this work, we show that reward models trained on full sequences are not compatible with scoring partial sequences. To alleviate this, we propose to train a Bradley-Terry reward model on partial sequences explicitly, and autoregressively sample from the implied tokenwise policy during decoding. We study the properties of this reward model and the resulting policy: we show that this policy is proportional to the ratio of two distinct RLHF policies. Our simple approach outperforms previous RGTG methods and performs similarly to strong offline baselines without large-scale LLM fine-tuning. Code for our work is available at https://github.com/ahmadrash/PARGS
title A Critical Look At Tokenwise Reward-Guided Text Generation
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2406.07780