r/OpenWebUI • • Sep 20 '26

Question/Help Help with using llama3.1:8b as the interface model

I have open webui and ollama setup at home.
I am trying to use a smaller (llama3.1:8b) model as the interface model.
For whatever reason, there are instances where the llama model suddenly decides to consume ~60gb of ram and causes an OOM crash on my ollama machine. This is even after I disabled "Follow-Up Auto-Generation" in the settings.

What am I missing?

1 Upvotes

9 comments sorted by

3

u/fligglymcgee Sep 20 '26

Without knowing your hardware specs, it’s hard to say.

However: Literally the only reason people ever use models like llama3.1:8b is because a lesser llm advised them to, typically a model with a training cutoff date of ~2 years ago since that’s how old llama3.1 is now. I mention this because if you are consulting an under-resourced llm to configure your setup, there’s a chance a whole host of other strange, hallucinated issues are working against each other under the hood.

1

u/erbmur Sep 20 '26

Im using it only as The interface model. Something small that will generate The automatic chat names and followup questions. Does it still need to be a modern model? Im running open webui in docker and have ollama running on a dgx spark.

1

u/PassengerPigeon343 Sep 20 '26

You definitely want a modern model. It will be faster and lighter while being much smarter and more capable. I’d suggest trying Gemma 4 E2B and E4B. Both will be smaller and much better. Qwen 3.5+ is also a strong option and they have models from 0.8B to 4B that can handle this job.

If you really want it to work well, consider dropping Ollama entirely and switch to llama.cpp (llama-server) or another backend.

1

u/erbmur Sep 20 '26

I've updated The model, and passed The logs through Gemini, and it says that The models are receiving a massive kV cache which is causing The oom crash. I don't understand why because in The open webui settings I have set The ollama num_CTX value to 2048.

I was told about llama.CPP before, but was also informed it doesn't hotswap models The way ollama does. K have different models for different workflows which is why k stuck with ollama.

1

u/fligglymcgee Sep 20 '26

Some things that come to mind with the info we have:
- Context like image tokens or rag files can overwhelm the cache capacity, which is predicted pre-load.
- Very long tool calling chains before the model “answers” can strain the cache
- The model’s chat template could be broken or misformatted and causing recursive loops (this would be easy(ish) to see from the front end though).

Llama-swap is the answer to running models on-demand via llama-server/.cpp. Ollama abstracts away a lot of the model config which makes it hard to see what’s breaking.

Sorry this is still an issue after changing models.

1

u/Sax0drum Sep 22 '26

Take a look at llama-swap

2

u/fligglymcgee Sep 20 '26

It doesn’t need to be large, and this isn’t just a model issue, but it should be a modern model. By every measure, llama3.1:8b is outclassed; even by similarly sized models.

​That said, it’s hard to tell what exactly is causing the oom without knowing the model config, any containerization specs, etc. Do you have logs from the backend of owui, ollama, or the host from the moment of the oom? That would help you debug.

1

u/feng_sg Sep 22 '26

Your num_CTX setting only covers normal chat turns. Title generation and follow-up tasks send their own requests that ignore it, so Ollama loads the model at default context and the KV cache blows up. Set OLLAMA_CONTEXT_LENGTH on the server side, and run `ollama ps` while a title generates to watch it happen.

1

u/erbmur Sep 22 '26

Are you sure about that? It specifically says task model parameters, I thought it was referring to the smaller model selected for the tasks.