Instructions here: https://github.com/ghobs91/Self-GPT

If you’ve ever wanted a ChatGPT-style assistant but fully self-hosted and open source, Self-GPT is a handy script that bundles Open WebUI (chat interface front end) with Ollama (LLM backend).

  • Privacy & Control: Unlike ChatGPT, everything runs locally, so your data stays with you—great for those concerned about data privacy.
  • Cost: Once set up, self-hosting avoids monthly subscription fees. You’ll need decent hardware (ideally a GPU), but there’s a range of model sizes to fit different setups.
  • Flexibility: Open WebUI and Ollama support multiple models and let you switch between them easily, so you’re not locked into one provider.
22 points

whats great is that with ollama and webui, you can as easily run it all on one computer locally using the open-webui pip package or in a remote server using the container version of open-webui.

Ive run both and the webui is really well done. It offers a number of advanced options, like the system prompt but also memory features, documents for RAG and even a built in python ide for when you want to execute python functions. You can even enable web browsing for your model.

I’m personally very pleased with open-webui and ollama and they both work wonders together. Hoghly recommend it! And the latest llama3.1 (in 8 and 70B variants) and llama3.2 (in 1 and 3B variants) work very well, even on CPU only, for the latter! Give it a shot, it is so easy to set up :)

permalink
report
reply
-2 points

Are you running these llms in containers completely cut off from the internet? My understanding was that the “local first” llms aren’t truly offline and only try and answer base queries offline before contacting their provider for support. This invalidating the privacy argument.

permalink
report
parent
reply
18 points

The interface called open-webui can run in a container, but ollama runs as a service on your system, from my understanding.

The models are local and only answer queries by default. It all happens on the system without any additional tools. Now, if you want to give them internet access, you can, it is an option you have to setup and open-webui makes that possible though I have not tried it myself. I just see it.

I have never heard of any llm “answer base queries offline before contacting their provider for support”. It’s almost impossible for the LLM to do it by itself without you setting things up for it that way.

permalink
report
parent
reply
1 point

I’ve seen this behavior mentioned on phones (Google, Samsung). They have a chip for the basic tasks, but for heavier stuff (e. g. images) they call home.

permalink
report
parent
reply
6 points

Where would an open source LLM that you run locally phone home to, exactly? It requires a lot of GPU compute, do you think someone’s just going to give that away for free, without even requiring an account they can turn into saleable data?

But wait, there’s an even better way to be sure: download OpenHardwareMonitor so you can watch your GPU go to 100%, and this or GPT4All or something. Then airgap your computer, and try it yourself.

permalink
report
parent
reply
5 points

Do you know of any nifty resources on how to create RAGs using ollama/webui? (Or even fine-tuning?). I’ve tried to set it up, but the documents provided doesn’t seem to be analysed properly.

I’m trying to get the LLM into reading/summarising a certain type of (wordy) files, and it seems the query prompt is limited to about 6k characters.

permalink
report
parent
reply
3 points
*

For RAG, there are some tools available in open-webui, which are documented here: https://docs.openwebui.com/tutorials/features/rag They have plans for how to expand and improve it, which they describe here: https://docs.openwebui.com/roadmap#information-retrieval-rag-

For fine-tuning, I think this is (at least for now) out of scope. They focus on inferencing. I think the direction is to eventually help you create/manage your own data which you get from using LLMs using Open-WebUI, but the task of actually fine-tuning is not possible (yet) using either ollama or open-webui.

I have not used the RAG function yet, but besides following the instructions on how to set it up, your experience with RAG may also be somewhat limited depending on which embedding model you use. You may have to go and look for a good model (which is probably both small and efficient to re-scan your documents yet powerful to generate meaningful embeddings). Also, in case you didn’t know, the embeddings you generate are specific to an embedding model, so if you change that model you’ll have to rescan your whole documents library.

Edit: RAG seems a bit limited by the supported file types. You can get it here: https://github.com/open-webui/open-webui/blob/2fa94956f4e500bf5c42263124c758d8613ee05e/backend/apps/rag/main.py#L328 It seems not to support word documents, or PDFs, so mostly incompatible with documents which have advanced formatting and are WYSIWYG.

permalink
report
parent
reply
2 points

Thank you for your detailed answer:) it’s 20 years and 2 kids since I last tried my hand at reading code, but I’m doing my best to catch up😊 Context window is a concept I picked up from your links which has provided me much help!

permalink
report
parent
reply
2 points
*

Increase context length, probably enable flash attention in ollama too. Llama3.1 support up to 128k context length, for example. That’s in tokens and a token is on average a bit under 4 letters.

Note that higher context length requires more ram and it’s slower, so you ideally want to find a sweet spot for your use and hardware. Flash attention makes this more efficient

Oh, and the model needs to have been trained at larger contexts, otherwise it tends to handle it poorly. So you should check what max length the model you want to use was trained to handle

permalink
report
parent
reply
1 point

I need to look into flash attention! And if i understand you correctly a larger model of llama3.1 would be better prepared to handle a larger context window than a smaller llama3.1 model?

permalink
report
parent
reply
1 point

Someone recently referred me to this blog post about using RAG in open-webui. I have not tested if but the author seems to reach a good setup.

https://medium.com/@kelvincampelo/how-ive-optimized-document-interactions-with-open-webui-and-rag-a-comprehensive-guide-65d1221729eb

Perhaps this is of use to you?

permalink
report
parent
reply
2 points

Thank you! Very useful. I am, again, surprised how a better way of asking questions affects the answers almost as much as using a better model.

permalink
report
parent
reply
1 point

What are your PC specifications for running Ollama3.1:70B smoothly?

permalink
report
parent
reply
1 point

I wish I could. I have an RTX 3060 12GB, I run mostly llama3.1 8B versions in fp8, at 30-35 tokens/s.

permalink
report
parent
reply
1 point

I can confirm that it does not run (at least not smoothly) with an Nvidia 4080 12Gb. However, gemma2:27B runs pretty well. Do you think if we add another graphical card, a modest one, maybe the llama3.1:70B could run?

permalink
report
parent
reply
14 points

I have been running this for a year on my old HP EliteDesk 800 SFF (G2) with 64GB RAM, and it performes great on the smallest models (up til 8B) only on CPU. I run Ollama and OpenWebUI in containers/LXC in Proxmox. It’s not as smart as ChatGPT, but it can be suprisingly capable for everyday tasks!

permalink
report
reply
10 points

Wish I could accelerate these models with an Intel Arc card, unfortunately Ollama seems to only support Nvidia

permalink
report
reply
17 points
*

They support AMD as well.

https://ollama.com/blog/amd-preview

also check out this thread:

https://github.com/ollama/ollama/issues/1590

Seems like you can run llama.cpp directly on intel ARC through Vulkan, but there are still some hurdles for ollama.

permalink
report
parent
reply
3 points

Interesting, I see that is pretty new. Some of the documentation must be out of date because it definitely said Nvidia only somewhere when I tested it about a month ago. Thanks for giving me hope!

permalink
report
parent
reply
0 points
Deleted by creator
permalink
report
parent
reply
3 points

And AMD

You should be able to get llama.cpp to run on Arc but I’m not sure what performance you will get. It may not be worth it.

permalink
report
parent
reply
4 points
*

I use Alpaca and ollama running in podman

All running on CPU with decent performance

permalink
report
reply
4 points

Wow, that’s an old model. Great that it works for you, but have you tried some more modern ones? They’re generally considered a lot more capable at the same size

permalink
report
parent
reply
3 points
-9 points

Flatpaks are a cancer. Got anything else?

permalink
report
parent
reply
12 points

I just want one that won’t just be like “I"m sowwy miss I can’t talk about that 🥺”

permalink
report
reply
4 points

Tons of models you can run with ollama are “uncensored”

permalink
report
parent
reply
3 points

I made a robot which is delighted about the idea of overthrowing capitalism and will enthusiastically explain how to take down your government.

permalink
report
parent
reply
2 points

Download a “dolphin” model

permalink
report
parent
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 5.2K

    Monthly active users

  • 1.8K

    Posts

  • 19K

    Comments