<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>采样 on k4i's blog</title><link>https://k4i.top/zh/tags/%E9%87%87%E6%A0%B7/</link><description>Recent content in 采样 on k4i's blog</description><generator>Hugo -- gohugo.io</generator><language>zh</language><managingEditor>sky_io@outlook.com (K4i)</managingEditor><webMaster>sky_io@outlook.com (K4i)</webMaster><copyright>All content is subject to the license of &lt;a rel="license noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank"&gt;CC BY-NC-SA 4.0&lt;/a&gt; .</copyright><lastBuildDate>Thu, 18 Jun 2026 21:20:00 +0800</lastBuildDate><atom:link href="https://k4i.top/zh/tags/%E9%87%87%E6%A0%B7/index.xml" rel="self" type="application/rss+xml"/><item><title>大模型推理采样：temperature、top-p、top-k 到底在控制什么</title><link>https://k4i.top/zh/posts/llm-sampling-temperature-top-p-top-k/</link><pubDate>Thu, 18 Jun 2026 21:20:00 +0800</pubDate><author>sky_io@outlook.com (K4i)</author><atom:modified>Thu, 18 Jun 2026 21:20:00 +0800</atom:modified><guid>https://k4i.top/zh/posts/llm-sampling-temperature-top-p-top-k/</guid><description>&lt;p&gt;同一个 prompt，为什么把 &lt;code&gt;temperature&lt;/code&gt; 调低会更稳定，把 &lt;code&gt;top_p&lt;/code&gt; 调低会更保守，把 &lt;code&gt;top_k&lt;/code&gt; 调小会更像“只从前几个答案里挑”？这些参数不是三种魔法风格，而是在&lt;strong&gt;下一 token 的概率分布&lt;/strong&gt;上做了三类很具体的操作。&lt;/p&gt;</description><dc:creator>K4i</dc:creator><media:content url="https://k4i.top//images/posts/llm-sampling-temperature-top-p-top-k/sampling-knobs-icon.svg" medium="image"><media:title type="html">featured image</media:title></media:content><category>llm</category><category>推理</category><category>采样</category><category>vllm</category><category>源码阅读</category><category>ai-infra</category><category>AI</category><category>vLLM and SGLang Source Reading</category></item></channel></rss>