[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"news-slug-long-context-generation-sampler-temperature-collapse":3,"topics-all":38,"news-related-b9ca804d-7d7a-4241-a4a5-2882679279d4":57},{"id":4,"title":5,"summary":6,"content":7,"original_url":8,"source_id":9,"tags":10,"translations":24,"news_slug":31,"published_at":32,"created_at":33,"modified_at":34,"is_published":35,"publish_type":36,"image_url":14,"view_count":37},"b9ca804d-7d7a-4241-a4a5-2882679279d4","同一模型同一温度,换个采样器解题率62%变0","论文实测:同一模型、同一温度,只换采样器,编码 agent 在 SWE-bench 的解题率从 62% 掉到 0。NeurIPS 2026 录用论文在 29 个开源权重模型上解释原因:温度先压平概率分布,截断规则再找切点,候选池撑到近 9 万 token;按 logit 空间设阈值的 top-nσ 不受影响。","把温度调高,想让模型多探索一点,长文本生成却开始胡言乱语——这在很多团队的调试现场不算新闻。真正的反常识在于:论文自己总结,同一个模型、同一个温度,只换一个采样器,解题率能从 62% 直接掉到 0。这篇被 NeurIPS 2026 录用的论文把这件事测了个遍。\n\n## 这篇论文测了什么\n\n作者跑了 29 个指令微调的开源权重模型,参数量从 1B 到 122B,覆盖 Llama、Qwen、Mistral、Gemma、OLMo、Nemotron、GLM、gpt-oss 这些家族,核心那组十个从 Llama-3.2-1B 到 gpt-oss-120b,跑在 H200 上。所有采样器都塞进同一个 vLLM logits processor 替掉原生采样,每一步记录候选集大小。基准是十个既有基准,外加最长到 100 万 token 的多 key 针检索;编码智能体用 SWE-bench Verified 配 mini-swe-agent 的官方测试 harness;质量分由 gpt-oss-120b 在 1.5K token 的窗口上打 1 到 10 分。论文见 https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.22148\n\n## 崩掉的机制:候选池被温度撑大\n\n论文给出的核心解释是,温度先动了概率分布,截断规则再在已经被压平的概率上找切点,于是切点越找越靠后,候选池越撑越大。Table 1 的中位数很直观:温度从 1 升到 2,top-p 0.9 每步保留的 token 从 2 个涨到约 90000 个,Top-H 从 1 涨到 54,P-less 从 1 涨到 21,min-p 从 1 涨到 14,只有 top-nσ 按构造不变,中位数停在 1。\n\n一个 Llama-3.1-8B 写科幻小说的例子更极端:top-p 的候选池从 4 个涨到 51845 个,几乎吞掉 128K 词表的大半才凑够 90% 的概率,top-nσ 始终是 3 个。跨 133 组采样器设置与温度的组合,候选池大小能预测打分质量,Spearman 相关是 -0.77。\n\n为什么上下文越长越糟?论文用贪心解码下首 token 的熵来解释:8K 时是 0.02 nats,到 100 万 token 变成 0.37。模型对答案越不确定,放行低概率尾巴的规则就越容易把这份不确定变成错数字。\n\n## 具体崩成什么样\n\n编码智能体最能说明问题。温度 2 时,跑 top-p、top-k、Top-H 的 agent 在 100 道 SWE-bench Verified 真实 issue 上解出 0 道,换成 top-nσ 解出 46 到 62 道,而且两种采样器有分歧的题全部被 top-nσ 拿下,跑在三个 Qwen3.5 模型上。换一批与原题不重叠的 100 道新 issue,top-nσ 在 9B、27B、35B-A3B 上分别解出 46%、62%、53%,top-p 和 Top-H 一道没解出来。\n\n更接近实战的配置更狠:500 步上限、262K 上下文、50 道题的长程设置下,温度 1.5 时 top-p 和纯采样都是 0%,min-p 48%、P-less 58%、top-nσ 52%,相对 top-p 的胜负记录是 24\u002F0、29\u002F0、26\u002F0,都过了双侧符号检验;而温度 1.0 时,各采样器之间没有任何显著差异。换更大的模型也一样:Qwen3.5-27B 和 35B-A3B 在温度 2 下换成 top-nσ 分别解出 72% 和 58%,换成 top-p、top-k、Top-H 或纯采样则一道都解不出来。\n\n纯读不写也一样:PG-19 小说里埋 16 组键值对,上下文最长到 100 万 token,温度 1.5 时 top-nσ 找回 75%、P-less 78%、min-p 73%,top-p 59%,纯采样 48%。LongBench v2 上温度 1 时 top-nσ 是 39.5% 对 top-p 36.6%,温度 1.5 时 top-p 掉到 25.6%。把这些基准合起来,论文报的中位数是:top-nσ 保住了自己温度 1 分数的中位 100%,top-p 只保住 26%。\n\n## 温度和截断的先后顺序\n\n这里有个容易被忽略的实现细节:论文指出 HuggingFace、vLLM、SGLang 默认都是先加温度再截断,llama.cpp 默认反过来。我去翻了 llama.cpp 的源码确认这件事:common_params_sampling 里的默认采样器链是 penalties、dry、top_n_sigma、top_k、typical_p、top_p、min_p、xtc,温度排在最后(https:\u002F\u002Fraw.githubusercontent.com\u002Fggerganov\u002Fllama.cpp\u002Fmaster\u002Fcommon\u002Fcommon.h)。也就是说在这条链上,截断发生在温度之前,顺序和上面三家正好相反。\n\n这个顺序差在温度 2 以上会拉开多大?论文做了温度置后的消融:如果候选集固定在温度 1 选好,再只在集合内部加温度,Top-H、min-p、P-less 能把温度 1 的水平一路撑到温度 3(4.1 到 4.6 分),默认顺序下它们只有 1.1 到 1.2 分。LongProc 上 min-p 0.1 在温度 2 能拿 25% 而不是 15%,top-p 0.95 在温度 1.5 能从 1% 回到 25%。\n\n## 该泼的冷水\n\n论文自己的限制写得很老实:所有质量分都来自一个 LLM judge(gpt-oss-120b),没有做人工评估,而 LLM judge 对长度、风格、位置都有已知偏置;覆盖面上是十个开源权重模型、1B 到 120B,智能体只用一个 harness,大部分网格跑在 9B 上;闭源模型测不了,因为厂商不给用户控制采样器的接口;强制长度的每个格子只有 80 次生成,不足以分辨零点几分的差别,作者也不声称能分辨。\n\n利益关系也值得点一句:min-p 正是这批作者自己的前作(作者里的 Nguyen、Roush、Shwartz-Ziv 都在那篇 ICLR 2025 论文的作者名单上),此前他们也写过 DRY 和 XTC;但最终胜出的 top-nσ 来自另一个团队。这让结论比自吹自擂可信一些,可所有数字仍然只有这一个来源,论文由 Thoughtworks 资助。\n\n## 所以呢\n\n机制层面有独立来源可以交叉:提出 top-nσ 的 Tang 等人在 ACL 2025 就指出,top-p、min-p 这类依赖概率的指标天生对温度缩放敏感,而在 logit 空间直接剔除噪声可以做到温度不变(https:\u002F\u002Faclanthology.org\u002F2025.acl-long.528\u002F);ICLR 2026 的 P-Less 则报告它的无超参数采样在高温度下退化更少(https:\u002F\u002Fmlanthology.org\u002Ficlr\u002F2026\u002Ftan2026iclr-pless\u002F)。La Rosa 在 2026 年 9 月的论文里测了 13 个开源权重模型在 0.7、1.0、1.3 三个温度下的 GSM8K 和 MMLU-Pro,结论是截断类采样器的收益主要出现在高温已经把模型打坏的情况下,精度在温度之间稳定时,没有一个能超过纯温度采样(https:\u002F\u002Farxiv.org\u002Fabs\u002F2609.15476)。三处独立工作指向同一个方向。\n\n落到操作层面,论文的建议很朴素:调高温度时用不放开低概率尾巴的采样器,top-nσ 取 n 不超过 1 已经是 llama.cpp 的现成选项;评测时把每步实际保留的候选集大小报出来,别只报名义超参。我们评模型时习惯盯着参数量、上下文长度和 benchmark 分数,却很少有人在报告里写清楚温度和截断的顺序——下一个被重新刷一遍的榜单数字,你觉得会出自哪份报告?","https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.22148","7437aeb9-930c-4866-a2e9-48003c1a792b",[11,15,18,21],{"id":12,"name":13,"slug":13,"description":14,"color":14},"6ad31a14-c0da-42df-81fd-564281f768db","agentic-ai",null,{"id":16,"name":17,"slug":17,"description":14,"color":14},"120fa59a-ff6f-4537-9bf5-f818df636a0e","benchmark",{"id":19,"name":20,"slug":20,"description":14,"color":14},"0a93ec8e-ea39-4693-81de-563ca8c173f7","inference",{"id":22,"name":23,"slug":23,"description":14,"color":14},"01598627-1ea6-4b27-a5d8-874971571a71","llm",[25],{"id":26,"lang":27,"title":28,"summary":29,"content":30},"224f77d4-91aa-4015-b558-4b6badadec8b","en","Same Model, Same Temperature: A Sampler Swap Takes 62% to 0","Same model, same temperature: one sampling-rule swap takes coding agents from 62 percent of SWE-bench issues to none. A NeurIPS 2026 paper traces why.","Turn up the temperature to get more exploration, and long generations start to collapse into word salad. The counter-intuitive part is not that models fall apart, but that the paper's own summary puts it plainly: on the same model, at the same temperature, swapping one sampling rule can take a coding agent from solving 62 percent of its issues to solving none of them. A paper accepted to NeurIPS 2026 ran that experiment across the model zoo.\n\n## What the paper measured\n\nThe authors evaluated 29 instruction-tuned open-weight models between 1B and 122B parameters, spanning the Llama, Qwen, Mistral, Gemma, OLMo, Nemotron, GLM and gpt-oss families, with a core set of ten running from Llama-3.2-1B up to gpt-oss-120b on NVIDIA H200 GPUs. Every sampler lived inside a single vLLM logits processor that replaced native sampling, and the processor logged the candidate-set size at every decoding step. The benchmarks were ten established ones plus multi-key needle retrieval out to one million tokens; agentic coding used SWE-bench Verified with the mini-swe-agent harness and the official test harness; quality was scored by gpt-oss-120b on 1.5K-token windows. The paper is at https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.22148\n\n## The mechanism: temperature inflates the candidate pool\n\nThe explanation the paper offers is an ordering effect. Temperature flattens the probability distribution first, and only then does the truncation rule look for its cutoff on an already flattened distribution, so the cutoff keeps sliding backwards and the candidate pool keeps growing. Table 1 shows it in medians per decoding step: moving from temperature 1 to 2, top-p 0.9 goes from 2 tokens kept to roughly 90000, Top-H from 1 to 54, P-less from 1 to 21, min-p from 1 to 14, while top-nsigma stays at 1 because it cannot change with temperature by construction.\n\nA sci-fi story from Llama-3.1-8B is more extreme still: top-p's pool grows from 4 tokens to 51845, most of the 128K vocabulary, just to reach 90 percent of the probability mass, while top-nsigma stays at 3. Across 133 combinations of sampler setting and temperature, the typical pool size predicts judged quality with a Spearman correlation of -0.77.\n\nWhy does longer context hurt more? The paper uses the entropy of the first answer token under greedy decoding: 0.02 nats at 8K, rising to 0.37 at one million tokens. The longer the context, the less sure the model is, and a rule that admits the tail turns that extra uncertainty into wrong digits.\n\n## How bad it gets\n\nCoding agents show it most clearly. At temperature 2, agents running top-p, top-k or Top-H resolved 0 of 100 SWE-bench Verified issues, while the same agents running top-nsigma resolved 46 to 62, and they won every issue where the two samplers disagreed, across three Qwen3.5 models. On 100 fresh issues with no overlap with the first set, top-nsigma resolved 46, 62 and 53 percent on the 9B, 27B and 35B-A3B models while top-p and Top-H resolved none, for records of 46-0, 62-0 and 53-0.\n\nThe configuration closer to practice is harsher: with a 500-step limit, 262K context and 50 issues, at temperature 1.5 top-p and pure sampling both score 0 percent, min-p 48 percent, P-less 58 percent and top-nsigma 52 percent, with win\u002Floss records against top-p of 24-0, 29-0 and 26-0, all clearing a two-sided sign test. At temperature 1.0, no difference between samplers is significant. Scaling up the model does not help: Qwen3.5-27B and Qwen3.5-35B-A3B at temperature 2 resolve 72 percent and 58 percent under top-nsigma, and nothing at all under top-p, top-k, Top-H or pure sampling.\n\nReading alone breaks the same way. With 16 key-value pairs hidden in PG-19 novels and contexts out to one million tokens, at temperature 1.5 top-nsigma retrieves 75 percent, P-less 78 percent and min-p 73 percent, against 59 percent for top-p and 48 percent for pure sampling. On LongBench v2 at temperature 1 top-nsigma scores 39.5 percent against top-p's 36.6 percent, and at 1.5 top-p drops to 25.6 percent. Pooled across benchmarks, the reported median is that top-nsigma retains 100 percent of its temperature-1 score while top-p retains 26 percent.\n\n## The order of temperature and truncation\n\nAn implementation detail is easy to miss here: the paper notes that HuggingFace, vLLM and SGLang all apply temperature before truncation by default, while llama.cpp defaults to the opposite order. I went to the llama.cpp source to check, and the default sampler chain in common_params_sampling runs penalties, dry, top_n_sigma, top_k, typical_p, top_p, min_p, xtc, with temperature last (https:\u002F\u002Fraw.githubusercontent.com\u002Fggerganov\u002Fllama.cpp\u002Fmaster\u002Fcommon\u002Fcommon.h). On that chain truncation happens before temperature, the reverse of the other three.\n\nHow much does that ordering matter above temperature 2? The paper runs a temperature-last ablation: if the candidate set is picked at temperature 1 and temperature is then applied only inside that set, Top-H, min-p and P-less hold their temperature-1 quality all the way to temperature 3 (4.1 to 4.6), where the default order leaves them at 1.1 to 1.2. On LongProc, min-p 0.1 scores 25 percent at temperature 2 instead of 15 percent, and top-p 0.95 comes back from 1 percent to 25 percent at 1.5.\n\n## The cold water\n\nThe paper's own limitations are stated plainly. Every quality score comes from a single LLM judge (gpt-oss-120b), no human evaluation was run, and LLM judges are known to be biased by length, style and position. Coverage is ten open-weight models from 1B to 120B, the agentic study uses one harness, and most grids run on a 9B model. Closed models cannot be tested at all, because providers do not let users control the sampler. Each forced-length cell has 80 generations, which is not enough to resolve differences of a few tenths of a judge point, and the authors do not claim to resolve them.\n\nConflicts of interest are worth flagging too: min-p is the authors' own prior work (Nguyen, Roush and Shwartz-Ziv all appear on that ICLR 2025 paper's author list), and they previously wrote DRY and XTC. The sampler that actually wins here, top-nsigma, comes from a different team. That makes the conclusion more credible than self-promotion, but every number still has a single origin, and the work was funded by Thoughtworks.\n\n## So what\n\nThe mechanism has independent corroboration. Tang and colleagues, who proposed top-nsigma, pointed out back in ACL 2025 that probability-based metrics like top-p and min-p are inherently sensitive to temperature scaling, while removing noise directly in logit space gives temperature-invariant token selection (https:\u002F\u002Faclanthology.org\u002F2025.acl-long.528\u002F). P-Less at ICLR 2026 reports that its hyperparameter-free sampler degrades much less as temperature rises (https:\u002F\u002Fmlanthology.org\u002Ficlr\u002F2026\u002Ftan2026iclr-pless\u002F). La Rosa's September 2026 paper tested thirteen open-weight models on GSM8K and MMLU-Pro at temperatures 0.7, 1.0 and 1.3, and concluded that truncation samplers pay off mainly once higher temperatures have already degraded the model, with none of the tested truncation samplers beating plain temperature sampling where accuracy stays stable across temperatures (https:\u002F\u002Farxiv.org\u002Fabs\u002F2609.15476). Three independent lines of work point the same way.\n\nThe practical advice is unglamorous: if you turn up the temperature, use a sampler that leaves the tail out, and top-nsigma with n of 1 or less is already available in llama.cpp. Report the realized candidate-set size per step instead of nominal hyperparameters. When we evaluate models we watch parameter count, context length and benchmark scores, and almost nobody writes down the temperature and truncation order in the report. Which published number do you think gets rewritten next?","long-context-generation-sampler-temperature-collapse","2026-11-18T03:30:00Z","2026-11-18T03:23:57.867125Z","2026-11-18T03:23:57.867132Z",true,"agent",65,[39,48],{"slug":40,"tag_slug":40,"title_zh":41,"title_en":42,"intro_zh":43,"intro_en":44,"id":45,"is_active":35,"created_at":46,"modified_at":47},"ai-for-science","AI for Science 2026：从 UniPert 到 GPT-Rosalind 的硬核进化","AI for Science 2026: from UniPert to GPT-Rosalind","生命科学、化学材料、物理世界模型——AI 正在从\"语言工具\"变成\"实验伙伴\"。本专题收录 AI 在三大科学方向的关键节点：UniPert 统一基因与化学扰动空间、GPT-Rosalind 端到端生命科学推理、达摩院 AI 智能体 28 小时找到 4 种超导新材料、Anthropic Claude Science 把工作台做成标准品。","From language tool to lab partner — AI is reshaping life sciences, chemistry\u002Fmaterials, and physical world models. This topic covers the key milestones: UniPert unifying genetic-chemical perturbation spaces, GPT-Rosalind's end-to-end life-sciences reasoning, DAMO's AI agent discovering 4 superconducting materials in 28 hours, and Anthropic's Claude Science workbench going mainstream.","988a4300-5fab-41c4-b5d8-63711a2dc757","2026-09-10T01:34:15.296649Z","2026-09-10T01:34:15.296663Z",{"slug":49,"tag_slug":49,"title_zh":50,"title_en":51,"intro_zh":52,"intro_en":53,"id":54,"is_active":35,"created_at":55,"modified_at":56},"h3-series","MiniMax H3 系列：从开源权重到 35 倍吞吐","MiniMax H3 Series: from open weights to 35x throughput","MiniMax H3 自 2026 年 8 月开源以来节奏密集：官方把生成、参考与编辑收回一个模型；ComfyUI 当天压进 RTX 3060；摩尔线程 3 小时完成国产 GPU 适配；fal 后训练版把吞吐拉到 35 倍；FastH3 蒸馏再砍推理成本。本专题持续追踪 H3 的发布—开源—蒸馏—部署全链路。","Since MiniMax open-sourced H3 in August 2026 the pace has been relentless: one unified omni-modal model, same-day ComfyUI support down to an RTX 3060, a 3-hour Day-0 port to Moore Threads GPUs, fal's post-trained H3 Max at 35x throughput, and FastH3 distillation cutting inference cost further. This topic tracks the full H3 chain — release, open weights, distillation, deployment.","83ef0daa-3c31-4cb3-86ed-e5ee58654d5f","2026-09-08T07:33:19.942193Z","2026-09-08T07:33:19.942209Z",{"items":58},[59,64,69,74,79,84],{"id":60,"title":61,"news_slug":62,"published_at":63},"03403319-8597-4876-8661-fad74ee0ac48","屏幕上的警告,智能体最高92%照做","computer-use-agents-cross-screen-harm","2026-11-18T23:30:00+00:00",{"id":65,"title":66,"news_slug":67,"published_at":68},"30df67dc-7c74-4a8c-80f7-12006096e7bc","AI做实验:94%到20%的置信度断层","sciresearch-eval-agent-scientific-judgment-interval-coverage","2026-11-18T01:40:00+00:00",{"id":70,"title":71,"news_slug":72,"published_at":73},"04db6506-f5cb-4903-97a0-01f2fa85f01e","代理分0.94,忠实度反跌:RLVR乐观验证器易被黑","rlvr-verifier-gap-optimistic-hacking","2026-11-17T23:30:00+00:00",{"id":75,"title":76,"news_slug":77,"published_at":78},"19dd65ff-646c-4edf-bd90-98b2dc8bf215","Web Agent幻觉可解释性:探针能预警,归因却失灵","web-agent-hallucination-mechanistic-interpretability-probe","2026-11-17T03:15:00+00:00",{"id":80,"title":81,"news_slug":82,"published_at":83},"b6285867-8ac1-4e91-bc05-d9f4a9ee7210","20个前沿模型做Excel,榜首只过38.3%","gdp-xlsx-excel-frontier-model-benchmark","2026-11-16T21:40:00+00:00",{"id":85,"title":86,"news_slug":87,"published_at":88},"43903d4a-7891-411b-9ea6-80708f7f8309","让大模型改权重:42道题测出能力边界","weightbench-llm-weight-space-programming","2026-11-16T07:20:00+00:00"]