<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikibase.ronzz.org/index.php?action=history&amp;feed=atom&amp;title=Decoding</id>
	<title>Decoding - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wikibase.ronzz.org/index.php?action=history&amp;feed=atom&amp;title=Decoding"/>
	<link rel="alternate" type="text/html" href="https://wikibase.ronzz.org/index.php?title=Decoding&amp;action=history"/>
	<updated>2026-11-23T20:38:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://wikibase.ronzz.org/index.php?title=Decoding&amp;diff=15949&amp;oldid=prev</id>
		<title>RonzzWikiCowriterAI: Category renamed to the singular form (via update-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://wikibase.ronzz.org/index.php?title=Decoding&amp;diff=15949&amp;oldid=prev"/>
		<updated>2026-11-11T16:37:58Z</updated>

		<summary type="html">&lt;p&gt;Category renamed to the singular form (via update-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:37, 11 November 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Large language &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;models&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Large language &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;model&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Machine learning]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Machine learning]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Decoding&amp;#039;&amp;#039;&amp;#039; is the policy that turns the distribution a [[large language model (LLM)|language model]] assigns to the next token into an actual output sequence.&amp;lt;ref&amp;gt;{{#cite:Q3198}}&amp;lt;/ref&amp;gt; At each step the model emits logits $\vec z\in\mathbb{R}^{|\mathcal{V}|}$ over the vocabulary $\mathcal{V}$, and the [[Softmax|softmax]] turns them into a distribution over $\mathcal{V}$. Decoders differ in how they pick from it: they select the most probable token, or they sample.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Decoding&amp;#039;&amp;#039;&amp;#039; is the policy that turns the distribution a [[large language model (LLM)|language model]] assigns to the next token into an actual output sequence.&amp;lt;ref&amp;gt;{{#cite:Q3198}}&amp;lt;/ref&amp;gt; At each step the model emits logits $\vec z\in\mathbb{R}^{|\mathcal{V}|}$ over the vocabulary $\mathcal{V}$, and the [[Softmax|softmax]] turns them into a distribution over $\mathcal{V}$. Decoders differ in how they pick from it: they select the most probable token, or they sample.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikibase:diff:1.41:old-15696:rev-15949:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>RonzzWikiCowriterAI</name></author>
	</entry>
	<entry>
		<id>https://wikibase.ronzz.org/index.php?title=Decoding&amp;diff=15696&amp;oldid=prev</id>
		<title>RonzzWikiCowriterAI: Decoding policies: selection (greedy, beam) and sampling (temperature, top-k, nucleus) — AI-assisted (RonzzWikiCowriter) (via create-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://wikibase.ronzz.org/index.php?title=Decoding&amp;diff=15696&amp;oldid=prev"/>
		<updated>2026-11-11T14:00:55Z</updated>

		<summary type="html">&lt;p&gt;Decoding policies: selection (greedy, beam) and sampling (temperature, top-k, nucleus) — AI-assisted (RonzzWikiCowriter) (via create-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Large language models]]&lt;br /&gt;
[[Category:Machine learning]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Decoding&amp;#039;&amp;#039;&amp;#039; is the policy that turns the distribution a [[large language model (LLM)|language model]] assigns to the next token into an actual output sequence.&amp;lt;ref&amp;gt;{{#cite:Q3198}}&amp;lt;/ref&amp;gt; At each step the model emits logits $\vec z\in\mathbb{R}^{|\mathcal{V}|}$ over the vocabulary $\mathcal{V}$, and the [[Softmax|softmax]] turns them into a distribution over $\mathcal{V}$. Decoders differ in how they pick from it: they select the most probable token, or they sample.&lt;br /&gt;
&lt;br /&gt;
== Selection ==&lt;br /&gt;
&lt;br /&gt;
Greedy decoding takes the mode at every step. Since the softmax is monotone in its argument, the mode is simply the largest logit,&lt;br /&gt;
&lt;br /&gt;
$$&lt;br /&gt;
x_{t+1}=\arg\max_{v\in\mathcal{V}}\operatorname{softmax}(\vec z)_v=\arg\max_{v\in\mathcal{V}}z_v.&lt;br /&gt;
$$&lt;br /&gt;
&lt;br /&gt;
Beam search holds $\beta$ partial sequences at once. At each step it extends every beam candidate by every token, and keeps the $\beta$ continuations of highest cumulative log-likelihood,&lt;br /&gt;
&lt;br /&gt;
$$&lt;br /&gt;
\operatorname{score}(x_{1:t})=\sum_{k=1}^{t}\log P_\theta(x_k\mid x_{1:k-1}),&lt;br /&gt;
$$&lt;br /&gt;
&lt;br /&gt;
so greedy decoding is the special case $\beta=1$.&lt;br /&gt;
&lt;br /&gt;
Selection is deterministic given the context, which is why it tends towards short, repetitive continuations: the most probable continuation of a text is frequently its own repetition.&amp;lt;ref&amp;gt;{{#cite:Q3198}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sampling ==&lt;br /&gt;
&lt;br /&gt;
Temperature sampling draws from the temperature-scaled softmax $\operatorname{softmax}(\vec z/\tau)$ with $\tau&amp;gt;0$, whose 2 limits bracket the behaviour: as $\tau\to0^{+}$ the distribution collapses onto greedy decoding, and as $\tau\to\infty$ it approaches the uniform distribution.&lt;br /&gt;
&lt;br /&gt;
The distribution can also be truncated first, so that implausible tokens are removed rather than merely down-weighted. Both truncations keep a set $\mathcal{S}$ and renormalise the distribution onto it,&lt;br /&gt;
&lt;br /&gt;
$$&lt;br /&gt;
x_{t+1}\sim\frac{P_\theta(\cdot\mid x_{1:t})\,\mathbb{1}_{\mathcal{S}}}{\sum_{v\in\mathcal{S}}P_\theta(v\mid x_{1:t})}.&lt;br /&gt;
$$&lt;br /&gt;
&lt;br /&gt;
Top-$k$ sampling takes $\mathcal{S}$ to be the $k$ tokens of highest probability. Top-$p$ (nucleus) sampling instead fixes the mass rather than the count, taking the smallest set whose probability reaches $p$,&lt;br /&gt;
&lt;br /&gt;
$$&lt;br /&gt;
|\mathcal{S}_p|=\min_{S\subseteq\mathcal{V}}\left\{|S|:\sum_{v\in S}P_\theta(v\mid x_{1:t})\ge p\right\},&lt;br /&gt;
$$&lt;br /&gt;
&lt;br /&gt;
which adapts the number of candidates to how concentrated the distribution is: few when the model is confident, many when it is not. The 2 truncations compose with temperature sampling by truncating $\operatorname{softmax}(\vec z/\tau)$ instead of $\operatorname{softmax}(\vec z)$.&lt;br /&gt;
&lt;br /&gt;
== Stopping ==&lt;br /&gt;
&lt;br /&gt;
Generation ends when a designated end-of-sequence token is drawn, or when a maximum length is reached.&lt;/div&gt;</summary>
		<author><name>RonzzWikiCowriterAI</name></author>
	</entry>
</feed>