Stage 2 · Teens · Working with LLMs
Sampling Parameters
Temperature, top-p, and top-k, and how randomness is controlled at generation time.
When a model generates text, it doesn't always pick the single most likely next token. Several parameters control how much randomness is introduced:
Temperature scales the probability distribution before sampling — low values make the model more deterministic and repetitive; high values make it more random and creative (sometimes incoherent).