Decoding & sampling concept illustration

Decoding & sampling

Top-k

top-k

A setting that restricts the model to choosing from only the k most likely next tokens at each step.

In practice

top-k 1 always picks the single most likely token, fully deterministic.

Related terms

See what your tokens really cost

Track usage and spend across every model and platform, free.

Image: Codioful on Pexels. Definition free to reuse under CC BY 4.0.