Skip to content

Top-K Sampling

A text generation strategy where the model only considers the K most probable next tokens at each step, redistributing probability among them. Lower K values produce more focused text; higher K values allow more variety.

Related terms

TemperatureTop-P Sampling (Nucleus Sampling)Logits
← Back to glossary