Model repeats itself in a loop
Symptom
The same phrase or sentence repeats until the token limit.
Likely causes
- Temperature too low for the model
- Context overflowed and truncation removed instructions
- Wrong chat template or missing stop tokens
How to fix it
- Raise temperature slightly (0.6 to 0.8) and add min-p 0.05.
- Add a mild repeat penalty (1.05 to 1.1); strong values hurt coherence.
- Check the prompt isn't truncated: increase the context size.
- Verify the chat template and stop tokens.
bash
llama-cli -m model.gguf --temp 0.7 --min-p 0.05 --repeat-penalty 1.1 -c 8192Still stuck? Check the lessons or measure first with the benchmark lab.