Language models generate long texts by repeatedly picking the next word using a "temperature" setting. High temperature makes the model more creative, but often causes nonsense, repetitions, or loops, especially in long outputs.
The study tested 29 open-weight models (1 to 122 billion parameters) on ten benchmarks including coding, reasoning, and writing tasks. They compared different samplers, rules for choosing the next word, focusing on how their candidate set (the pool of words considered) changes with temperature.
Samplers that keep their candidate set small and stable at high temperature, like top-nsigma, maintain most of their accuracy. Top-p, which enlarges the pool drastically, fails completely on at temperature 2 (0 issues solved vs. 46-62). This shows sampling method matters more than model size for long high-temperature generation.
