Top-p Sampling

Also known as: nucleus sampling

Quick definition

A decoding method that samples from the smallest token set with cumulative probability at least p.

A decoding method that samples from the smallest token set with cumulative probability at least p.

Lower p values narrow the candidate pool, while higher values permit more diverse continuations.

Example: A writing model uses top-p sampling to vary draft phrasings.

Common use cases: Creative generation and decoding configuration.

Examples

  • A writing model uses top-p sampling to vary draft phrasings.

Use cases

  • Creative generation and decoding configuration.

Frequently asked questions

What is Top-p Sampling?

A decoding method that samples from the smallest token set with cumulative probability at least p.

What should I know about Top-p Sampling?

Lower p values narrow the candidate pool, while higher values permit more diverse continuations.

Categories and tags