LLM playgroundSampling

LLM Playground Settings Explained: Temperature, Top-P and More

What temperature, top-p, top-k, min-p, repetition penalty, max tokens and stop sequences do in an LLM playground, with recommended starting values.

By the Uncensored AI Model Hub editorial team· Updated · 3 min read

Playgrounds expose the settings chat apps hide. Here is what each one does.

Temperature

Scales how adventurous word choice is. 0 always picks the most likely token; 1.0 samples more freely. Start at 0.7.

Top-p (nucleus sampling)

Keeps the smallest set of tokens whose probabilities add up to p. At 0.9, the unlikely 10 percent tail is ignored.

Top-k

Keeps only the k most likely tokens. Simple but blunt; 40 is a common value.

Min-p

Drops tokens less likely than a fraction of the top token’s probability. Popular for creative local models; 0.05 to 0.1 is typical.

Repetition penalty

Discourages repeating recent tokens. 1.05 to 1.15 helps with loops; higher values make text odd.

Max tokens and stop sequences

Max tokens caps reply length. Stop sequences end generation when a string appears, useful for structured output and roleplay turns.

Try it

Run the same prompt at several settings in our LLM playground. For local apps, see llama.cpp and LM Studio guides.

Common questions

What is a good default temperature?

Around 0.7 for general chat, 0.2 to 0.4 for factual or coding tasks and 0.8 to 1.0 for creative writing.

Should I change top-p and temperature together?

Usually change one at a time. Many people leave top-p at 0.9 to 1.0 and tune temperature.

Related reading

Browse more: all guides · comparisons · glossary · free tools

Find your model in minutes.

Search the directory, check the licence and hardware, and start running uncensored AI models today.