Local and Global Decoding in Text Generation

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Gareev, Daniel, Hofmann, Thomas, Krishnasamy, Ezhilmathi, Pimentel, Tiago
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866913545431547904
author Gareev, Daniel
Hofmann, Thomas
Krishnasamy, Ezhilmathi
Pimentel, Tiago
author_facet Gareev, Daniel
Hofmann, Thomas
Krishnasamy, Ezhilmathi
Pimentel, Tiago
contents Text generation, a key component in applications such as dialogue systems, relies on decoding algorithms that sample strings from a language model distribution. Traditional methods, such as top-$k$ and top-$π$, apply local normalisation to the model's output distribution, which can distort it. In this paper, we investigate the effect of this distortion by introducing globally-normalised versions of these decoding methods. Additionally, we propose an independent Metropolis-Hastings algorithm to approximate sampling from globally-normalised distributions without explicitly computing them. Our empirical analysis compares the performance of local and global normalisation across two decoding algorithms (top-$k$ and top-$π$) with various hyperparameters, using Pythia language models. Results show that, in most configurations, global decoding performs worse than the local decoding version of the same algorithms -- despite preserving the distribution's integrity. Our results suggest that distortion is an important feature of local decoding algorithms.
format Preprint
id arxiv_https___arxiv_org_abs_2410_10810
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Local and Global Decoding in Text Generation
Gareev, Daniel
Hofmann, Thomas
Krishnasamy, Ezhilmathi
Pimentel, Tiago
Computation and Language
Text generation, a key component in applications such as dialogue systems, relies on decoding algorithms that sample strings from a language model distribution. Traditional methods, such as top-$k$ and top-$π$, apply local normalisation to the model's output distribution, which can distort it. In this paper, we investigate the effect of this distortion by introducing globally-normalised versions of these decoding methods. Additionally, we propose an independent Metropolis-Hastings algorithm to approximate sampling from globally-normalised distributions without explicitly computing them. Our empirical analysis compares the performance of local and global normalisation across two decoding algorithms (top-$k$ and top-$π$) with various hyperparameters, using Pythia language models. Results show that, in most configurations, global decoding performs worse than the local decoding version of the same algorithms -- despite preserving the distribution's integrity. Our results suggest that distortion is an important feature of local decoding algorithms.
title Local and Global Decoding in Text Generation
topic Computation and Language
url https://arxiv.org/abs/2410.10810