AI Engineering Glossary
Search
view all

Top-p sampling

Top-p sampling, also known as nucleus sampling, is a method used in text generation tasks to select the next word by considering the smallest possible set of most likely candidates that collectively reach a probability mass threshold, 'p'. For instance, if 'p' is 0.9, only the words that together hold 90% probability are considered, providing a balance between randomness and coherence in generated text compared to methods like greedy search or temperature sampling.

Search Perplexity | Ask ChatGPT | Ask Clade

a

b

c

d

e

f

g

h

i

j

k

l

m

n

o

p

q

r

s

t

u

v

w

z