Skip to content
LLM Engineering

What is Top-k and Top-p?

Sampling filters that limit which tokens the model may pick: top-k keeps the k likeliest tokens, top-p keeps the smallest set covering probability p. They trim the weird tail without flattening style like low temperature does.

Browse all LLM Engineering terms →