How does top-k sampling constrain generation?
Reveal the answer and explore the explanation.
04MediumHigh priorityHow does top-k sampling constrain generation?
Answer
MediumHigh priority
How does top-k sampling constrain generation?
Answer
Restricts sampling to the k highest-probability tokens.
Practical example
Avoid drawing from very low-ranked candidate tokens.
Reference: Further reading ↗