logo elektroda
logo elektroda
X
logo elektroda

ChatGPT locally? AI/LLM assistants to run on your computer - download and installation

p.kaczmarek2 
Screenshot of Open WebUI interface with options for questions.
It would seem that today`s great AI models are inextricably linked to the cloud, and therefore also to the lack of privacy - nothing could be further from the truth! I will show here how you can easily download and run a 100% locally interesting alternative to ChatGPT along with a confusingly similar form of website offering the choice of the LLM model, chat history and even the possibility of e.g. interpreting the provided images and files.
All this is offered by a project called Open-WebUI, link to homepage/repository below:
https://github.com/open-webui/open-webui

Open-WebUI installation
There is a "Quick Start With Docker" section in the Readme, but as usual, the installation is actually more difficult than the project authors declare.
Docker is an environment for running various projects that is characterized by containerization and software isolation, as well as its portability.
Initially I tried to install Docker 4.27.1 on my Windows 10:
Screenshot of Docker Desktop 4.27.1 installation showing file unpacking process.
Unfortunately, it didn`t work - the spoiler explains why:

Spoiler:

It would seem that the installation was successful: Installation screen of Docker Desktop 4.27.1 showing installation success.
We launch...
Modified Windows Start menu with Docker Desktop application.
We configure:
Screen of Docker Desktop 4.27.1 setup completion with the option to use recommended settings selected.
Login is optional:
Docker Desktop welcome screen with sign-up and login options.
And there is a problem, something is wrong with WSL, i.e. the "Linux" overlay on Windows:
Docker Desktop error message with a Quit button.
There are several topics on the docker forum about this:
https://forums.docker.com/t/updating-wsl-upda...-update-n-web-download-not-supported/138452/9
Below are screenshots of my attempts to fix the problem - without positive results, so no comment:
PowerShell window with WSL feature enabled on Windows 10.
Screenshot of a Windows PowerShell window with DISM commands.
Download progress bar for WSL Update file in the browser.
Screenshot of Windows PowerShell console with a command to set the default WSL version to 2.
Screenshot of Windows PowerShell window during installation process.

To sum up, Open-WebUI did not work for me on the latest Docker, so I started checking previous versions of Docker and it turned out that in 4.24.1 the problem does not occur:
Screenshot showing a successful installation message for Docker Desktop version 4.24.1.
Success - we immediately have a docker panel:
Docker Desktop main panel with the containers section visible.
Docker is ready. Now you need to download the repository, you can even do it through a browser, GIT is not necessary. We simply find the zip download:
https://github.com/open-webui/open-webui
Screenshot of a GitHub page with download options for the Open-WebUI repository.
Then we install everything via docker, I chose the version without GPU support (everything will be counted on the CPU, RAM will also be required):
Installation instructions for Open WebUI with Docker Compose.
Finally a flawless installation:
Screenshot of a terminal showing the progress of installing Open-WebUI using Docker.
From this point on they should be open webui in Docker:
Screenshot of Docker Desktop panel with running container open-webui-main.

First run
We run Open WebUI in Docker. Go to create a web service (our local IP + selected port) to see the web interface of the language models:
Open WebUI login page with fields for email and password.
The first login to WebUI will require creating an account, but we create this account on our server, everything is local:
Open WebUI registration screen with fields for name, email, and password.
Then we are greeted by a web panel like the one known from ChatGPT:
Screenshot of the Open WebUI interface asking: How can I help you today?
Nothing can be run at this point - we are missing language models:
Open WebUI user interface with a model selection option.
You have to click on the cog and download a model.
To download a model, search for its name here:
https://ollama.com/library
And then paste it into the download as follows:
Screenshot of the Open-WebUI settings panel with the mistral:7b model being downloaded.
After downloading, the model will appear in the list to select:
Open WebUI interface with a dropdown menu for model selection.
You can ask him questions just like in the case of ChatGPT, the capabilities themselves depend on the model, just as the RAM requirement and the token generation speed also depend on what we have chosen, there are "lighter" and "heavier" models.
Open WebUI user interface with a query about CSS and JavaScript code.

Text and code
Locally running models are able to generate code and complete text similarly to ChatGPT, although the final results depend on the model chosen. Here are some examples:
Screenshot showing sample Arduino code for reading ADC value and blinking an LED.
C++ code for controlling an LED using ADC readings.
The above example with mapping the value read from the ADC to the LED blinking frequency is very similar to ChatGPT.
Similarly with other codes:
Browser window with Open-WebUI interface showing a step-by-step guide for creating a WWW page for ESP8266.
Code sets up the ESP8266 as a simple web server returning HTML content on request.
He`s done some thinking here - e.g. this link does not lead to an existing page and the code itself is at least incomplete.
Of course, models are also susceptible to hallucinations - here, for example, a code is created for a non-existent system MCP237017 which was created as a result of a typo I made:
Window showing Arduino code for non-existent MCP237017 chip in Open WebUI.

Image analysis
Some models can also describe images. An example is llava, which can, for example, describe an apple:
Red apple with a green leaf covered in water droplets on a white background.
She is not afraid of more difficult tasks - here she describes the LED "bulb":
Image of an LED light bulb lying on a wooden surface.
Unfortunately, when it comes to slightly less popular issues, the model gets lost and creates hallucinations:
The image shows a tool with a metallic head and handle, lying on a wooden workbench.
If you want me to add an image to this model, please post the image in the topic, if I have a moment I will check the results.

Advanced settings
The Open WebUI offers much more than the OpenAI website - here we can change advanced language model settings, such as: Temperature, Mirostat, Top K, Stop Sequence, Max Tokens, Context Length and much more - for explanations, please refer to materials from the Internet.
Screenshot showing advanced settings of Open WebUI


Hardware requirements?
It all depends on whether we use the GPU or CPU version and what model we want to run, but in general it is not very fast, it also takes up a lot of RAM, here`s a screenshot from me after an hour of play:
Screenshot of Windows Task Manager with 96% memory usage.
As for the reaction time... we will measure it, for example on Mistral:7b:
Screenshot of Open WebUI interface showing a conversation about the Roman Empire
The above response took 45 seconds to generate:
Screenshot from HWiNFO64 showing details of the Intel Core i7-6700HQ processor.

Summary
These free, local equivalents will not beat commercial language models, but they actually provide more than a substitute for the popular ChatGPT locally. Additionally, there are plenty of these models and they offer a lot of parameterization and tuning options, which allows us to adapt them to our needs. In the future, I intend to try to compare them better and explore their possibilities, but I don`t know how to go about it yet and the huge selection of LLMs to download doesn`t make it easier.
Installing the whole thing is quite simple as long as we don`t fall into the "trap" of the new Docker, but I wrote about it at the beginning, following my instructions we will install the whole thing without any problems.
However, I don`t know what it`s like to run it on weaker hardware - if anyone wants to have fun, I invite you to test it and share your results!
Have you tried running LLM language models locally, and if so, what were the results? I invite you to discuss.

About Author
p.kaczmarek2
p.kaczmarek2 wrote 12174 posts with rating 10128 , helped 580 times. Been with us since 2014 year.

Comments

dktr 04 Apr 2024 08:50

I ran Easy Diffusion locally on the GPU - RTX4070 and Core i9 10th. I`m surprised how well it already works and what quality graphics can be generated. A 720x720 image takes approximately 15 seconds to... [Read more]

Mateusz_konstruktor 07 Apr 2024 15:25

Something more difficult. https://obrazki.elektroda.pl/1588440900_1712230645_bigthumb.jpg Something easier. https://obrazki.elektroda.pl/8155751100_1712230145_thumb.jpg [Read more]

p.kaczmarek2 07 Apr 2024 18:29

Before checking, I will write down my prediction: it will cope with the toaster, not so much with the chip, in the case of the chip it will read the marking incorrectly and write something about the IC. ... [Read more]

Mateusz_konstruktor 07 Apr 2024 19:33

Especially for my friend, at the same time deliberately not very sophisticated except for the last one. https://obrazki.elektroda.pl/1665604000_1712511155_thumb.jpg https://obrazki.elektroda.pl/9843898100_1712511165_thumb.jpg... [Read more]

p.kaczmarek2 07 Apr 2024 21:02

Battery, a bit weak, read "Panasonic" but made heresy powerbank: https://obrazki.elektroda.pl/3713127800_1712514154_bigthumb.jpg Here again sense and nonsense are mixed (he read 1539 as 1569 but... [Read more]

Mateusz_konstruktor 08 Apr 2024 00:18

Do we have these connectors added at this point? How is this "training" and adding further data performed? [Read more]

p.kaczmarek2 08 Apr 2024 01:31

I see that a topic about the basics of LLM in general will be useful... A typical user is not able to train LLM, it requires enormous computing power and a huge number of teaching examples. You can read... [Read more]

Mateusz_konstruktor 08 Apr 2024 13:59

AND. Isn`t it the case that properly selected training examples require a small amount of computing power that is within the capabilities of even a relatively weak home computer? I am thinking of cases... [Read more]

p.kaczmarek2 08 Apr 2024 14:28

It doesn`t work like that at all, the process you are asking about is called fine-tuning and it involves providing additional teaching examples in the format of a photo and text description. https://obrazki.elektroda.pl/4834119000_1712579141_bigthumb.jpg... [Read more]

Mateusz_konstruktor 08 Apr 2024 19:46

However, I expected some solution analogous to sending information about incorrect operation through the web browser. This would be an invaluable source of data, instead of some tedious training on machines... [Read more]

%}