Local and Global Decoding in Text Generation
Gareev, Daniel, Hofmann, Thomas, Krishnasamy, Ezhilmathi, Pimentel, Tiago
–arXiv.org Artificial Intelligence
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-$\pi$, 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-$\pi$) 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.
arXiv.org Artificial Intelligence
Oct-14-2024
- Country:
- Oceania > Australia
- North America
- The Bahamas (0.14)
- United States
- Iowa (0.04)
- Idaho (0.04)
- New York > New York County
- New York City (0.04)
- Minnesota > Hennepin County
- Minneapolis (0.14)
- Canada > Ontario
- Toronto (0.04)
- Europe
- Switzerland > Zürich
- Zürich (0.04)
- Ireland > Leinster
- County Dublin > Dublin (0.04)
- Switzerland > Zürich
- Asia
- Singapore (0.04)
- India > Uttar Pradesh (0.04)
- China > Hong Kong (0.04)
- Middle East > UAE
- Abu Dhabi Emirate > Abu Dhabi (0.04)
- Genre:
- Research Report > New Finding (1.00)
- Industry:
- Government (0.68)
- Technology: