paper-with-me

Papers

Contrastive Decoding: Open-ended Text Generation as Optimization

2022-10-27 · Xiang Lisa Li, Ari Holtzman, Daniel Fried, Percy Liang, Jason Eisner, Tatsunori Hashimoto, Luke Zettlemoyer, Mike Lewis

Given a language model (LM), maximum probability is a poor decoding objective for open-ended generation, because it produces short and repetitive text. On the other hand, sampling can often produce incoherent text that drifts from the original topics. We propose contrastive decoding (CD), a reliable decoding approach that optimizes a contrastive objective subject to a plausibility constraint. The contrastive objective returns the difference between the likelihood under a large LM (called the expert, e.g. OPT-13B) and a small LM (called the amateur, e.g. OPT-125M), and the constraint ensures that the outputs are plausible. CD is inspired by the fact that the failures of larger LMs (e.g., repetition, incoherence) are even more prevalent in smaller LMs, and that this difference signals which texts should be preferred. CD requires zero additional training, and produces higher quality text than decoding from the larger LM alone. It also works across model scales (OPT-13B and GPT2-1.5B) and significantly outperforms four strong decoding algorithms (e.g., nucleus, top-k) in automatic and human evaluations across wikipedia, news and story domains.

📄 PDF Abstract BibTeX arXiv:2210.15097

Code (2)

xiangli1999/contrastivedecoding 공식 구현 jax
yxuansu/contrastive_search_versus_contrastive_decoding pytorch

Tasks

Language ModelingLanguage ModellingText Generation

Similar Papers 제목 키워드 기반

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

2022-11-19 · Yixuan Su, Jialu Xu

In the study, we empirically compare the two recently proposed decoding methods, i.e. Contrastive Search (CS) and Contrastive Decoding (CD), for open-ended text generation. The automatic evaluation results suggest that, …

DiversityText Generation

Adaptive Contrastive Search: Uncertainty-Guided Decoding for Open-Ended Text Generation

2024-07-26 · Esteban Garces Arias, Julian Rodemann, Meimingwei Li, Christian Heumann 외

Decoding from the output distributions of large language models to produce high-quality text is a complex challenge in language modeling. Various approaches, such as beam search, sampling with temperature, $k-$sampling, …

DiversityLanguage ModelingLanguage ModellingText Generation

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

2023-07-04 · Jian Guan, Minlie Huang

Despite the huge progress in myriad generation tasks, pretrained language models (LMs) such as GPT2 still tend to generate repetitive texts with maximization-based decoding algorithms for open-ended generation. We attrib…

AttributeSentence

GUARD: Glocal Uncertainty-Aware Robust Decoding for Effective and Efficient Open-Ended Text Generation

2025-08-28 · Yuanhao Ding, Esteban Garces Arias, Meimingwei Li, Julian Rodemann 외 arxiv

Open-ended text generation faces a critical challenge: balancing coherence with diversity in LLM outputs. While contrastive search-based decoding strategies have emerged to address this trade-off, their practical utility…

Text Generation

Explaining and Improving Contrastive Decoding by Extrapolating the Probabilities of a Huge and Hypothetical LM

2024-11-03 · Haw-Shiuan Chang, Nanyun Peng, Mohit Bansal, Anil Ramakrishna 외

Contrastive decoding (CD) (Li et al., 2023) improves the next-token distribution of a large expert language model (LM) using a small amateur LM. Although CD is applied to various LMs and domains to enhance open-ended tex…

LAMBADAText Generation