GO-V.ORG
As seen in

Top-p sampling

Top-p sampling, also known as nucleus sampling, is a stochastic decoding strategy for generating sequences from autoregressive probabilistic models.[src] It was originally proposed by Ari Holtzman, Yejin Choi and colleagues in 2019 for natural language generation to address the issue of repetitive and nonsensical text generated by other common decoding methods like beam search.[src] The technique has since been applied in other scientific fields, such as protein engineering and geophysics.[src] In top-p sampling, a probability threshold p is set, and the next item in a sequence is sampled only from the smallest possible set of high-probability candidates whose cumulative probability exceeds p.[src] This method adapts the size of the candidate pool based on the model's certainty, making it more flexible than top-k sampling, which samples from a fixed number of candidates.[src] Due to its effectiveness, top-p sampling is a widely used technique in many large language model applications.[src]

Top-p sampling, also known as nucleus sampling, is a stochastic decoding strategy for generating sequences from autoregressive probabilistic models.[src] It was originally proposed by Ari Holtzman, Yejin Choi and colleagues in 2019 for natural language generation to address the issue of repetitive and nonsensical text generated by other common decoding methods like beam search.[src] The technique has since been applied in other scientific fields, such as protein engineering and geophysics.[src] In top-p sampling, a probability threshold p is set, and the next item in a sequence is sampled only from the smallest possible set of high-probability candidates whose cumulative probability exceeds p.[src] This method adapts the size of the candidate pool based on the model's certainty, making it more flexible than top-k sampling, which samples from a fixed number of candidates.[src] Due to its effectiveness, top-p sampling is a widely used technique in many large language model applications.[src] \sum_{x \in V^{(p)}} P(x|x_{1}, \dots, x_{t-1}) \geq p In this formula, P(x|x_{1}, \dots, x_{t-1}) represents the probability of a token x given the preceding tokens x_{1}, \dots, x_{t-1} .[src] If we set p = 0.8 : The tokens are sorted by probability: [the, a, cat, dog, eats].[src] The cumulative probability is calculated: the: 0.5 the + a: 0.5 + 0.2 = 0.7 the + a + cat: 0.7 + 0.1 = 0.8 The nucleus is the smallest set with cumulative probability ≥ 0.8, which is V^{(0.8)} = \{\text{the, a, cat}\} .[src] The probabilities for this set are rescaled to sum to 1: P(the) = 0.5 / 0.8 = 0.625 P(a) = 0.2 / 0.8 = 0.25 P(cat) = 0.1 / 0.8 = 0.125 The next token is then sampled from this new distribution, meaning dog and eats have a 0% chance of being chosen.[src]

16 sentences · 16 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Top-p sampling." encyclopegia.org, 2026, https://encyclopegia.org/wiki/top-p-sampling. Accessed 04 December 2026.

Chicago

"Top-p sampling." encyclopegia.org. Accessed December 4, 2026. https://encyclopegia.org/wiki/top-p-sampling.

APA

encyclopegia.org. (2026). Top-p sampling. Retrieved December 4, 2026, from https://encyclopegia.org/wiki/top-p-sampling

Accessed December 4, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

top

stub · references available

Top Secret

stub · references available

Top Model O Reality

stub · references available

Top Model of the World

stub · references available

Top Secret

stub · references available

Top Gun

stub · references available

Top

stub · references available

Mahasz Rádiós Top 40

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1368853719 · 0.5 · snapshot enwiki-001368853719

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.