Sampler choice, not more training, decides high-temperature long generation
Original title: Long-Context Generation Is a Sampling Problem (When You Turn Up the Heat)
At temperature 2, top-nsigma kept a median 100% of temperature-1 accuracy while top-p kept 26% across the reported benchmarks.
Authors test 29 open-weight models from 1B to 122B on ten benchmarks plus needle retrieval to one million tokens, including coding agents, long reasoning, writing, structured output and reading. Samplers that keep a small, steady candidate pool as temperature rises retain accuracy; those that admit low-probability tokens collapse. At temperature 2, top-p, top-k and Top-H coding agents solved 0 of 100 GitHub issues, while top-nsigma solved 46 to 62 on three Qwen3.5 models. Code and data are released.
Unconfirmed: Findings are the authors' reported measurements and have not been independently replicated in the text.
- In one Llama-3.1-8B story, top-p's pool grew from 4 tokens to 51,845 at temperature 2.
- top-nsigma stayed at 3 tokens in that same example.
- Pool size predicted judged quality with a Spearman correlation of -0.77 across 133 settings.
- Fixing the temperature-1 pool and applying temperature afterward stopped Top-H, min-p and p-less collapsing.
- At the default temperature of 1, most samplers performed about the same.
From the original article
1 min read at arxiv.orgOpen-weight language models are widely observed to get worse the longer they generate. Often, attempts to fix this involve more training. At high temperature, The sampler, i.
By Allen G. Roush · arxiv.org
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.