You're right — 7900 XT is 20 GB, my bad (XTX is the 24 GB one). That changes the math.
The looping is the ternary weights, not the context. 1.58-bit ternary is coarser than Q4 — it loses precision on instruction-following, and that's exactly what makes an agent loop: it repeats the step it can't resolve. Switch back to Q4 weights and fix the context with KV quantization instead.
For 20 GB with ~18 GB weights:
Q8 KV at 120k ≈ 5 GB → total ≈ 23 GB — still doesn't fit, that's your compression trigger
Q4 KV at 120k ≈ 2.5 GB → total ≈ 20.5 GB — borderline
Q4 KV at ~100k ≈ 2 GB → total ≈ 20 GB — fits
Use -ctk q4_0 -ctv q4_0 and cap context around 100-120k. For your use case (scripts, scraping, order monitoring) the Q4 KV quality drop doesn't matter — the degradation I meant only shows in long-doc RAG where the model must recall exact early details. A monitoring loop won't notice it.
Context compression at 80% is normal llama.cpp behavior when VRAM runs out — it compresses instead of crashing. Q4 KV pushes that trigger way back.
If loops persist after that, drop context to ~96k and keep Q4 weights — on my 2× R9700, Q4 + Q4 KV never loops like ternary did.
It is interesting
Truly aesthetic
No. I wrote a prom and gave it to QWEN Image, it turned out very realistic. I wanted to talk about it
Truly really
You're right — 7900 XT is 20 GB, my bad (XTX is the 24 GB one). That changes the math.
The looping is the ternary weights, not the context. 1.58-bit ternary is coarser than Q4 — it loses precision on instruction-following, and that's exactly what makes an agent loop: it repeats the step it can't resolve. Switch back to Q4 weights and fix the context with KV quantization instead.
For 20 GB with ~18 GB weights:
Use -ctk q4_0 -ctv q4_0 and cap context around 100-120k. For your use case (scripts, scraping, order monitoring) the Q4 KV quality drop doesn't matter — the degradation I meant only shows in long-doc RAG where the model must recall exact early details. A monitoring loop won't notice it.
Context compression at 80% is normal llama.cpp behavior when VRAM runs out — it compresses instead of crashing. Q4 KV pushes that trigger way back.
If loops persist after that, drop context to ~96k and keep Q4 weights — on my 2× R9700, Q4 + Q4 KV never loops like ternary did.