Top-K Sampling

Domain: NLP Fundamentals

🎯 Motivation

Only samples from the K most likely next tokens, ignoring the long tail of unlikely ones.

📋 Concrete Example

Top-K = 40 means the model only considers the top 40 candidates and samples among them.

🔗 Analogy

Like a talent show where only the top 40 contestants get to perform - the rest are cut.