Temperature & Sampling

Ask a model "write me a one-line slogan for a coffee shop" twice and you'll often get two different lines. Same prompt, same model, different answer. That isn't a bug or a hidden mood, it's the model doing exactly what it always does: rolling dice over its own

8 lessons, each with runnable code in the browser.

  1. Why the Same Prompt Gives Different Answers
  2. Temperature: The Randomness Dial
  3. Top-p and Top-k
  4. Choosing Settings for the Task
  5. The Softmax Behind Sampling
  6. Greedy vs Sampled Decoding
  7. Repetition and Frequency Penalties
  8. Seeds and Reproducibility

Compilearn home