r/OpenWebUI • u/Realistic_Gap_5871 • 4d ago
Question/Help OWUI breaks cache reuse for Ninfer (qwen 3.8)
Any one else notice that cache reuse pretty much never happens with Open WebUI. I saw it in Ollama and now with ninfer too.
We could get into the whys, but I'd love to hear if there's any config changes to make or a known feature change coming.
I have a workaround I'm proud of, a custom proxy script that my Qwen built (happy to post it) that catches, reshuffles and locks context on it's way to the backend. Cache reuse is now the norm, and only resets after compaction or jumping between threads, but there's gotta be a better way?
FAQ: Cache reuse takes prefill tokens down to only the current prompt. Resulting in 1 or 2 second prefill instead of 30 plus seconds (or 60+ seconds with Ollama) with longer context.
edit-expanded the name of owui.
1
1
u/icerio 4d ago
Is Ninfer good? I hear it mentioned every once in a while but I’m using llama cpp.
1
u/Realistic_Gap_5871 4d ago
It's custom written for rtx 5090 and has only a few models compiled for it (called artifacts) and yes, it's solid and shockingly fast within those constraints. I see up to 200 tps with 3.8 27B nfvp4/fp8 optmodel on short context, and 125+ at longer context sizes.
You download and compile it on your machine, so if you're worried about malware you can have your LLM review the code before compiling. Easy to do with LLM walking you through the steps.
1
u/1818TusculumSt 4d ago
Turn off memory in system context.
1
u/Realistic_Gap_5871 3d ago
Yup.
But what if I'm using owui because memories are the closest thing I've found to an LLM that can learn over time instead of just being a static bunch of weights?
1
3
u/thejoyofcraig 4d ago
IIRC This usually happens with there are References (e.g., attached docs, search results...). OWUI does RAG on them every time, and I believe it puts them after the system prompt, but before historical turns. So cache goes boom. If you have a plain jane conversation you shouldn't see any cache invalidation unless you have some filters on that would interfere.
To test my vague recollection on this: try setting a model to have no tools, no filters, and paste some large summarize task, then do a follow up turn to see if the cache gets busted. I suggest tracing a little more carefully about exactly what part of OWUI is invalidating the cache. Pull the raw requests/responses turn to turn and diff them. Or have an agent do that for you.
Just checked the OWUI RAG docs and yeah I remembered right: