<?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>Sampling on k4i's blog</title><link>https://k4i.top/tags/sampling/</link><description>Recent content in Sampling on k4i's blog</description><generator>Hugo -- gohugo.io</generator><language>en</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/tags/sampling/index.xml" rel="self" type="application/rss+xml"/><item><title>LLM Inference Sampling: What Temperature, Top-p, and Top-k Actually Control</title><link>https://k4i.top/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/posts/llm-sampling-temperature-top-p-top-k/</guid><description>&lt;p&gt;Why does lowering &lt;code&gt;temperature&lt;/code&gt; make an answer more stable? Why does lowering &lt;code&gt;top_p&lt;/code&gt; make it more conservative? Why does a small &lt;code&gt;top_k&lt;/code&gt; feel like asking the model to choose only from the obvious candidates? These are not three separate magic styles. They are three concrete operations on the &lt;strong&gt;next-token probability distribution&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This post builds the intuition with a 5-token example, then maps the same idea to the vLLM V1 sampler.&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>inference</category><category>sampling</category><category>vllm</category><category>source-reading</category><category>ai-infra</category><category>AI</category><category>vLLM and SGLang Source Reading</category></item></channel></rss>