How to Choose Frequency and Presence Penalties to Control Repeated Words and New Topics
Use frequency penalty to cut words the model repeats often, presence penalty to push it toward new topics, and test each one…
WORKFLOW TAG
Control output variation, reproducibility, and repetition.
Use frequency penalty to cut words the model repeats often, presence penalty to push it toward new topics, and test each one…
Raise the repetition penalty above 1.0 in small steps, check the loop breaks, and stop before the penalty damages normal repetition.
Pass the same seed with the same model and parameters, record the seed with the output, and treat the result as a…
Change one setting at a time, keep the other at its default, and compare the outputs on the same prompts before combining…
Force llama-server to return valid JSON with response_format json_schema, or limit it further with a GBNF grammar.
Run an Ollama model with --verbose and read the eval rate, or time a curl call, to get a real tokens-per-second figure.
Save a system prompt and sampling settings as a preset in LM Studio, and pin it to a model for consistent chats.
Write a Modelfile with a base model and a system prompt, create a custom model with ollama create, and run it.
Use greedy when the output is short and the best next token is obvious, and beam search when the whole sequence matters…
Set no_repeat_ngram_size to 3 so no three-word phrase can appear twice, and check the output still reads naturally.