Home/Glossary/Top-p / Top-k Sampling

Parameter

What is Top-p / Top-k Sampling?

Sampling strategies that control which tokens the model considers when generating output. Top-p (nucleus sampling) considers the smallest set of tokens whose cumulative probability exceeds p (e.g., 0.9). Top-k considers only the k most likely tokens. LLMCheck recommends top-p 0.9, top-k 40 as a balanced starting point for most local LLM tasks.

Where Top-p / Top-k Sampling comes up on LLMCheck

Browse all 81 models in the index →

Related terms

All 37 terms in the LLMCheck glossary →