Condition the voice. Control the variation.

Anthem explains how persona instructions and sampling controls can work together to produce a coherent but varied style.

A language model first assigns scores to possible next tokens. Its prompt and conversation history influence those scores. Decoding then transforms the resulting distribution and samples a continuation. Keeping those stages separate makes the behavior easier to reason about: a confident persona changes the context; a temperature setting changes how strongly the sampler favors higher-scoring options.

The paper collects the equations for four familiar controls and combines them into one explicit specification. Its practical interest is the interaction between a stable identity prompt and moderate constraints on randomness. The resulting sense of a consistent speaker is treated as a property of generated language, not a test of subjective experience.

Source sections and reading guide ↓

One distribution. Four controls.

The mathematical recipe computes each filter from the same temperature-adjusted distribution, retains tokens that survive every filter, and renormalizes before sampling.

Condition the distribution

Supply the role, task, and conversation. The model uses that context to produce a logit for each vocabulary token. Persona conditioning acts before the sampling controls.

Context-dependent logits

Apply temperature

Divide logits by 0.75 and apply softmax. Because this temperature is below one, it increases the relative preference for higher-scoring tokens while leaving sampling stochastic.

A sharper probability distribution

Find the surviving tokens

Keep the 50 highest-probability tokens, the smallest ranked set reaching 95% probability mass, and tokens with at least 5% of the leading token’s probability. Intersect those three sets.

Tokens satisfying every constraint

Renormalize and sample

Set excluded probabilities to zero and divide the remaining probabilities by their sum. Draw the next token from this reduced distribution, then repeat with the extended context.

One sampled continuation

Source sections and reading guide ↓

Different limits do different jobs.

Top-k, top-p, and min-p constrain different properties of the candidate set. Their numerical values are not interchangeable.

Temperature
T = 0.75 scales logits by 4/3. For two tokens, their probability ratio becomes exp((zₐ − zᵦ)/T), making existing score differences more pronounced.
Top-k
k = 50 imposes a maximum of 50 candidates before the intersection. It is a count constraint, independent of how much probability those tokens contain.
Top-p
p = 0.95 selects enough top-ranked tokens to reach at least 95% of the temperature-adjusted mass. The number retained varies with uncertainty.
Min-p
ρ = 0.05 sets a relative threshold: pᵢ ≥ 0.05 × pmax. It compares each option with the best option at that particular step.
Why implementation order matters

The paper specifies S = S₅₀ ∩ S₀.₉₅ ∩ Smin. A sequential implementation can produce a different set if it renormalizes between filters, especially before computing the nucleus. The 95% figure describes the top-p stage; it does not guarantee that the final intersection retains 95% of the original distribution.

Source sections and reading guide ↓

Watch the relative threshold move.

An illustrative walkthrough created for this page, not a reported experiment or a live model run.

The scenario

Suppose the temperature-adjusted distribution assigns 40% probability to its leading token. Consider two other candidates with probabilities of 3% and 1%.

Calculate the cutoff
Min-p sets the cutoff at 0.05 × 0.40 = 0.02, or 2%. The 3% candidate passes this test; the 1% candidate does not.
Check the other constraints
The 3% candidate remains eligible only if it also belongs to the top 50 and the 95% nucleus. Passing min-p alone does not guarantee selection.
Change the distribution
If the leading probability were 10%, the relative cutoff would fall to 0.5%. Min-p therefore admits weaker absolute probabilities when the model is less concentrated.
What this illustrates

The sampler responds to the shape of the current distribution. The same four settings need not preserve the same number of choices from one token to the next.

A recipe to understand and tune.

This is a four-page explanatory note with equations, an interpretation of persona conditioning, and practical tuning suggestions. It does not report a comparative benchmark establishing that this recipe is optimal. The paper explicitly distinguishes the appearance of deliberation from evidence of consciousness.

  • Task dependence. A setting that supports a steady voice may constrain a task that benefits from broader exploration.
  • Filter interaction. Check the actual decoder’s filter order and renormalization behavior before treating it as the paper’s intersection recipe.
  • Tuning discipline. The note suggests changing one control at a time: temperature, then top-p, min-p, and finally top-k.

Source sections and reading guide ↓

Read the research.

Preprint · 30 December 2025 · 4 pages

An Anthem for Controlled Stochasticity: Temperature, Top-k, Top-p, and Min-p Sampling Under Persona Conditioning

Zenodo credits: Asari; Ison, Payton

PDF credits: Asari

DOI: 10.5281/zenodo.18092973

A guide to the manuscript

Distribution and sampling equations
§§1–4, pp. 1–3
Persona conditioning and interpretation
§§5–6, pp. 3–4
Tuning and failure modes
§§7–8, p. 4
Cite this paper

Asari; Ison, Payton. (2025). An Anthem for Controlled Stochasticity: Temperature, Top-k, Top-p, and Min-p Sampling Under Persona Conditioning. Zenodo. https://doi.org/10.5281/zenodo.18092973

This page explains the cited manuscript in its own words. Diagrams and walkthroughs are illustrative; the original paper remains the source for its formulations and claims.