Contrastive Decoding: Open-ended Text Generation as Optimization

10/27/2022
by   Xiang Lisa Li, et al.
0

Likelihood, although useful as a training loss, is a poor search objective for guiding open-ended generation from language models (LMs). Existing generation algorithms must avoid both unlikely strings, which are incoherent, and highly likely ones, which are short and repetitive. We propose contrastive decoding (CD), a more reliable search objective that returns the difference between likelihood under a large LM (called the expert, e.g. OPT-13b) and a small LM (called the amateur, e.g. OPT-125m). CD is inspired by the fact that the failures of larger LMs are even more prevalent in smaller LMs, and that this difference signals exactly which texts should be preferred. CD requires zero training, and produces higher quality text than decoding from the larger LM alone. It also generalizes across model types (OPT and GPT2) and significantly outperforms four strong decoding algorithms in automatic and human evaluations.

READ FULL TEXT
research
09/17/2023

Contrastive Decoding Improves Reasoning in Large Language Models

We demonstrate that Contrastive Decoding – a simple, computationally lig...
research
02/13/2022

A Contrastive Framework for Neural Text Generation

Text generation is of great importance to many natural language processi...
research
05/12/2023

Surfacing Biases in Large Language Models using Contrastive Input Decoding

Ensuring that large language models (LMs) are fair, robust and useful re...
research
11/19/2022

An Empirical Study On Contrastive Search And Contrastive Decoding For Open-ended Text Generation

In the study, we empirically compare the two recently proposed decoding ...
research
07/04/2023

Mitigating the Learning Bias towards Repetition by Self-Contrastive Training for Open-Ended Generation

Despite the huge progress in myriad generation tasks, pretrained languag...
research
10/25/2022

Contrastive Search Is What You Need For Neural Text Generation

Generating text with autoregressive language models (LMs) is of great im...
research
05/22/2023

Look-back Decoding for Open-Ended Text Generation

Given a prefix (context), open-ended generation aims to decode texts tha...

Please sign up or login with your details

Forgot password? Click here to reset