Nucleus Sampling (Top-P)

Nucleus Sampling (Top-P): Text generation sampling from smallest set of tokens whose cumulative probability exceeds threshold P. Dynamically adjusts vocabulary size based on probability distribution. More flexible than top-k. Common: P=0.9-0.95. Examples include P=0.9 for diverse generation, Dynamic vocabulary selection, Better than top-k.

In italiano: Nucleus Sampling (Top-P)Legge II · Probabilità, softmax e modelli generativi

Dynamically adjusts vocabulary size based on probability distribution. More flexible than top-k. Common: P=0.9-0.95.

Examples

  • P=0.9 for diverse generation
  • Dynamic vocabulary selection
  • Better than top-k