Information-Theoretic Foundations of Online Temperature Sampling
Not on the map. Why?
Abstract (arXiv)
Repetitive, degenerate generation is a persistent failure of LLM decoding, and the standard remedies (temperature, nucleus, and top-k sampling) are static heuristics. By Kac's lemma and the AEP, a stationary source takes time exponential in its entropy to repeat a block. We therefore maximize the entropy of the sampling distributions under one cross-entropy budget that keeps the output plausible under the model. Offline, the solution is temperature sampling, with the inverse temperature as the budget's Lagrange multiplier. Our contribution is the online problem: the conditionals p1, p2, dots are revealed one at a time, and the sampling distribution qt must be chosen causally from p1, dots, pt while the budget couples the entire horizon. The optimal temperature is thus a global shadow price that must be estimated from a prefix. We propose Entropic Online Sampling (EOS), which re-solves for the temperature on each prefix. We prove it loses O(Rlog n) entropy against the offline optimum while overshooting the budget by O(Rlog n), with R an instance-dependent drift parameter. A budget-tightened variant is exactly feasible at the same rate. Conversely, every exactly feasible online algorithm must lose Omega(R), so EOS is optimal up to a log n factor. When the conditionals are drawn from a finite mixture, R=tildeO(√n). Experiments confirm that EOS tracks the offline temperature and beats fixed-temperature sampling in entropy.
Key facts. No citing papers in the map yet (data through 26 Nov 2026). Builds on 14 of its 27 references that are in the map. Submitted 10 Oct 2026.
Builds on
14 of 27 references.
References · 14
- 2020Language Models are Few-Shot Learnerscited by 33,113
- 2024The Llama 3 Herd of Modelscited by 16,114
- 2021Evaluating Large Language Models Trained on Codecited by 8,938
- 2017On Calibration of Modern Neural Networkscited by 5,356
- 2019The Curious Case of Neural Text Degenerationcited by 3,022
- 2019Can You Trust Your Model's Uncertainty? Evaluating Predictive Uncertainty Under Dataset Shiftcited by 1,356
- 2018Hierarchical Neural Story Generationcited by 1,221
- 2015A Diversity-Promoting Objective Function for Neural Conversation Modelscited by 1,099
- 2019ELI5: Long Form Question Answeringcited by 588
- 2019Neural Text Generation with Unlikelihood Trainingcited by 522
- 2020If beam search is the answer, what was the question?cited by 118
- 2020Dual Mirror Descent for Online Allocation Problemscited by 54
Built on by
Not cited yet.