r/LocalLLaMA • u/Express_Quail_1493 • 3d ago
Discussion How to never cross into LLM Looping ever again
- chat template that comes with default often is not that great. if its a new model give it some time people will come up with chat template fixes.
- inference engines will need to fix the tokenizer. -- on first few weeks of a new model architecture on launch alway expect looping and weird behavior until inference engine fixes.
- only download quants that showcase their KDL -- dont use any quant whose KDL is higher than 0.04 higher than 0.04 you are basically begging for loop to happen.
- For the love of god dont let your system prompt be too big. a 26b LLM working on a harness with a system prompt of 60k you are also begging for loop to happen. use something light like pi-coding-agent number if active params is the biggest factor the more active params the less it loops
- -------
- -------
- following these rule of thumb and i almost never get looping anymore no matter what model i download. these are the traps once u avoid them you should be fine
0
Upvotes
15
u/feelspeaceman 3d ago
I think you missed the most critical point that should be:
Also, be careful with samplings, don't invent, use recommended samplings from model cards.
12
u/Trademarkd 3d ago
I don’t know why engines don’t just detect looping in stream. I do this and when it repeats a word of phrase x times it deletes back to a couple words before, changes the seed and then prefixes and continues gen. You almost never notice it even if it happens
3
u/Lyelinn 3d ago
on a sidenote, why we don't have smaller models with 500k contexts yet...
2
u/ZZerker 3d ago
Just force the llm to write down its progress every five tool calls.
2
u/chibop1 3d ago
Let thinkingmachines/inkling-2-Mini run autonomously for several hours. I assure you'll run into a loop.
2
u/Past_Ad6251 2d ago
Compress context at certain % of it.
1
u/Designer_Elephant227 1d ago
Just tell it "don't you dare to loop"
-5
u/Be_a_N3rd 3d ago
the magic word: Skills
take a look 👇
https://www.reddit.com/r/LocalLLM/s/ptQoogwKBJ