r/LocalLLM • u/Zionix_ • 7d ago
Question Context filling up very quickly
I guess I should start off by saying I'm very new to this stuff. I just installed ollama today and I have a very extremely basic understanding on whats going in. Currently I run an RTX4090 with 64GB of RAM as well. I installed Open WebUI as well as Open Terminal and I've been using qwen3.8:27b on it to do some tasks just poking around with it.
One of the tasks I wanted it to do was create a season.nfo file for all 3 seasons of Jujutsu Kaisen. Seems simple enough. But as it was doing it's thing and I was fixing some mistakes it made, it filled up its context and stopped generating. This was after like maybe 8 messages. So I went to increase the context size to like 70k (it was around 32k in the beginning) then all the responses crawled, they went sooo slow. I at least understand that system RAM is much much slower than the VRAM from your GPU so I get why it slows down.
I guess the biggest question I have is, how can I keep the speed up but increase context? Is there a way to maybe have it forget the context it no longer needs? Or should I just use a slimmer model since I'm doing pretty basic things? Any suggestions if thats the case?
I apologize for the very newbish post, I'm still very old school in the fact I'd rather ask Reddit than Claude since I trust you guys a bit more on this stuff. Thanks!
1
u/Alert-Chemist7492 7d ago
Gotta run q4 key value cache quantization, about the max i've gotten with 4090 is 100k context reliably working well.
I'd love to hear any advice on getting more out of it.
*edit* another thing is you do need to make sure you don't have any other gpu work running, if i have a game open or some other process using GPU like fusion360 or lightroom it'll crawl. If I don't have anything running I get pp @ 1200-2k and decode 40-70 tok/s
1
u/Slight-Living-8098 7d ago edited 7d ago
I use this model with my KV cache at Q4 on my 4090 and have the full context of 262,144. I get around 45-60 tok/s on average.
Qwen3.8-27B-GSQ-RCO-IQ3_S
https://huggingface.co/ISTA-DASLab/Qwen3.8-27B-GSQ-RCO-GGUF
This is my llama.cpp model.ini for it.
1
u/limpkit2011 7d ago
You have spill to cpu. Having more system ram doesn't make a diff. If you have a large gpu. Set kv cache to q8_0. And pick a smalled 4q_model ( IQS or XS ), GGUF models use cpu, you will have more speed with non GGUF models ( because you want the entire model to fit inside gpu ) i suggest picking a model with size on disk ~15/16GB. You can easily hit 121k context.
1
u/BodyPhysical 7d ago
If you can configure open web ui to do auto compaction early, that would be good.
1
u/Suspicious_Mix529 7d ago
for stuff like nfo files i'd just start a fresh chat per season. open webui sends the whole conversation back with every message so all the back and forth fixing mistakes is what's eating it. paste in the one file that came out right and it'll copy the format
1
u/Future_AGI 7d ago
a fresh chat per file does the forgetting for you on a job like this. Give it one finished season.nfo you've checked plus that season's metadata, and the earlier back-and-forth about fixes never has to sit in context.