arXiv论文:长上下文生成退化源于采样问题,top-nsigma在温度2下保持稳定
Long-Context Generation Is a Sampling Problem (When You Turn Up the Heat)
arXiv论文指出,开源权重语言模型生成越长越差,问题出在采样器而非训练。作者在29个1B至122B参数模型、十项基准及百万token检索上测试,温度2时使用top-p、top-k或Top-H的编码智能体在100个GitHub issue中解决0个,而top-nsigma解决46至62个。候选池大小可预测生成质量(Spearman相关系数-0.77),代码与数据已公开。
论文用29个开源模型和133组采样器与温度组合,说明长文本生成退化主要取决于采样器候选池大小,而非训练不足。
arXiv:2611.22148v1 Announce Type: new Abstract: Open-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.e. the rule that picks the next token out of the model's probabilities, decides whether long and agentic generation survives and/or thrives. We test 29 open-weight models from 1B to 122B parameters on ten established benchmarks plus needle retrieval out to one million tokens, covering SWE-bench Verified coding agents, long chain-of-thought reasoning, long-form writing, long structured output and long-context reading. Samplers that keep their pool of candidate tokens small and steady as temperature rises don't lose accuracy. Samplers that let in low-probability tokens fall apart. At temperature 2, coding agents running top-p, top-k or Top-H resolve 0 of 100 GitHub issues, while the same agents running top-nsigma resolve 46 to 62 and win every issue the two samplers disagree on, on three Qwen3.5 models. Over all benchmarks top-nsigma keeps a median 100% of its temperature-1 score where top-p keeps 26%. Counting how many tokens each sampler lets through explains why. In one Llama-3.1-8B story, going from temperature 1 to 2 grows top-p's pool from 4 tokens to 51,845 while top-nsigma stays at 3. Across 133 combinations of sampler setting and temperature, the typical pool size predicts judged quality (Spearman correlation of -0.77), and when we pick the pool at temperature 1 and only apply temperature afterwards, Top-H, min-p and p-less stop collapsing. At the default temperature of 1 most samplers perform about the same, We release all code and data to the public.
来源:arXiv (AI + Vision + Imaging) · arxiv.org