cd /news/large-language-models/llama-cpp-qwen-devolves-into-repeati… · home topics large-language-models article
[ARTICLE · art-113293] src=forum.level1techs.com ↗ pub= topic=large-language-models verified=true sentiment=· neutral

Llama.cpp Qwen devolves into repeating /'s

A user reports that Gemma 4:26B, a 26-billion-parameter mixture-of-experts model, begins repeating tokens and entering loops as context length approaches 80,000 tokens, with severe degradation above that threshold. The user suggests adding a repeat penalty of 1.1 to 1.15 to llama.cpp flags, such as '--repeat-penalty 1.1', to mitigate the issue, though they note that nonsensical character repetitions might indicate hardware faults.

read1 min views2 publishedAug 27, 2026

I have this problem with Gemma4:26B. it is fine at low context, but as the context starts approaching 80k tokens, it starts entering frequent loops, and above 80k it starts getting really bad (every other prompt!)

I did some research suggesting that hardware faults were unlikely the cause of this, and that it is just the nature of things in LLM’s, especially lower parameter ones (which MoE models are particularly sensitive to since they have smaller active weight sizes)

The recommendation I found was to try adding a repeat penalty to my llama-cpp flags.

Default is 1.0 (in other words, none) but raising that to 1.1 to 1.15 can apparently help reduce those annoying loops. You don’t want to go too high though, as that can hamper the model in other ways.

This is set with:

“–repeat-penalty 1.1”

I set mine recently, and haven’t had any large context prompts yet, so I can’t say if it solved things for me or not yet, but it might be worth trying.

Edit:

Oh, I didn’t realize the pattern repetitions you were seeing were nonsensical characters. That might actually point to hardware problems.

I thought you meant logic reasoning loops.

Either way, doesn’t hurt to try the setting and see if it does anything for you.

── more in #large-language-models 4 stories · sorted by recency
── more on @gemma 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/llama-cpp-qwen-devol…] indexed:0 read:1min 2026-08-27 ·