Skip to main content
CodeLint.Dev Dev Tools

Sampling Parameters Guide

Every parameter that controls how LLMs generate text — temperature, top-p, top-k, penalties, and more.

Quick Presets

Parameter Reference

Scales the logits (raw model output scores) before applying softmax to convert them into a probability distribution. The most fundamental sampling parameter.

Controls randomness and creativity. Low values make output deterministic and focused; high values make output diverse and creative.

Low value

Near 0: deterministic — always picks the highest-probability token. Good for code, facts, structured data.

High value

Near 2: very random — equal probability for many tokens. Risk of incoherence or hallucination.

Tips
  • 0.0–0.3: factual Q&A, code generation, classification, data extraction
  • 0.5–0.8: balanced conversations, summarisation, translation
  • 0.9–1.2: creative writing, brainstorming, varied outputs
  • 1.5–2.0: poetry, experimental text — monitor for quality degradation
  • Temperature and top-p interact: reduce one if you increase the other