ToolNavs Find Useful AI Tools
Submit Sign in

Model Sampling

Explains how language models pick each next token: temperature, top-p, top-k and repetition penalties shape randomness and determinism. Learn which knobs to turn for creative writing, coding, or factual answers.

Model sampling converts a language model's probability distribution into words: temperature sharpens or flattens it, top-p and top-k set the candidate pool, repetition penalties curb loops. This topic explains parameters like temperature, top-p, top-k and repetition penalties: how they work and how to trade diversity for reliability. They change word choice, not knowledge — well-tuned, one model shifts between strict answers and creative writing.