AI learning

Chapter 7 · Large language models

Top-k and top-p sampling

Sampling only from the top few tokens (top-k) or the smallest set covering p% (top-p) avoids nonsense.

Preparing top-k and top-p: trim the word tail
YOUR BROWSER, YOUR CHOICE