{"id":2223,"date":"2026-06-10T14:17:00","date_gmt":"2026-06-10T12:17:00","guid":{"rendered":"https:\/\/teszarypeter.hu\/?post_type=publikacio&#038;p=2223"},"modified":"2026-06-10T15:26:12","modified_gmt":"2026-06-10T13:26:12","slug":"a-lokalis-mi-forradalma-ollama-gemma-es-openwebui-teljes-utmutato-mi-alapjai-6-resz","status":"publish","type":"publikacio","link":"https:\/\/teszarypeter.hu\/en\/publikacio\/a-lokalis-mi-forradalma-ollama-gemma-es-openwebui-teljes-utmutato-mi-alapjai-6-resz\/","title":{"rendered":"Local AI revolution: Ollama, Gemma and OpenWebUI - Full Guide (MI Fund Part 6)"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Local AI revolution: Ollama, Gemma and OpenWebUI - Full Guide (MI Fund Part 6)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Introduction: Why are we moving artificial intelligence home?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A\u00a0<strong>Fundamentals of Artificial Intelligence<\/strong>\u00a0In the previous parts of my series of articles, I explored the theoretical foundations and the mathematical background of machine learning. Today, however, we are on the verge of a paradigm shift: this\u00a0<strong>Local AI<\/strong>\u00a0revolution. While cloud services like ChatGPT Plus are convenient, models running on their own hardware offer privacy, unlimited access, and zero running costs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The essence of local running is to eliminate dependence on external servers. We do not have to worry about loss of service, unexpected price increases or the use of our data for training. In this guide, we look at how to build a professional, open-source ecosystem from an engineering perspective.&nbsp;<strong>Ollama<\/strong>, a&nbsp;<strong>Gemma<\/strong>&nbsp;and that&nbsp;<strong>OpenWebUI<\/strong>&nbsp;With your help, while paying special attention to&nbsp;<strong>data security<\/strong>&nbsp;to your question.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Open Source Ecosystem and Security<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The world of local models is unthinkable without open licenses. In particular, it&nbsp;<strong>Apache 2.0<\/strong>&nbsp;The importance of licensing is paramount: this form of permissive licence not only allows free use and modification, but also allows commercial use, without the obligation to make the source code of our own developments public. This enables companies to develop their own AI based on an internal knowledge base.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That&nbsp;<strong>privacy<\/strong>&nbsp;It's not just a promise, it's a technical guarantee. Since the data does not physically leave the device, we eliminate the greatest risk of cloud models: data leakage and inclusion of confidential information in the training dataset. At the same time, as emphasised in the \u2018Smart Kids\u2019 curriculum, the&nbsp;<strong>responsible development<\/strong>&nbsp;It remains a basic requirement. Local models can also carry&nbsp;<strong>bias (bias)<\/strong>, Thus, a critical view of the results and the observance of ethical limits remain the responsibility of the developer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Technical basis: Why is the local model \u2018smart\u2019?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The functioning of artificial intelligence is fundamentally&nbsp;<strong>pattern recognition<\/strong>&nbsp;and&nbsp;<strong>probability calculation<\/strong>&nbsp;resultant. Let us take the example of \u2018apple\u2019: if the model in the training data is 70%In 2015, he saw the word as \"red\", which he will statistically assume. Technically, this is one&nbsp;<strong>as a stochastic function<\/strong>&nbsp;(<em>P<\/em>(<em>Y<\/em>\u2223<em>x<\/em>)) can be described, where the system searches for the most likely output based on the input variables.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In machine learning, the system uses neural networks, which are essentially complex mathematical models. The learning process is based on the following key concepts:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Supervised learning:<\/strong>&nbsp;An approximate hypothesis from input-output data pairs (<em>h<\/em>) setting up.<\/li>\n\n\n\n<li><strong>Neural networks:<\/strong>&nbsp;Layered structures that can learn any logical function (even complex XOR).<\/li>\n\n\n\n<li><strong>Weighted amounts (<\/strong><em>w<\/em><em>i<\/em>\u200b<strong>):<\/strong>&nbsp;All input attributes (<em>x<\/em><em>i<\/em>\u200b) with one weight (<em>w<\/em><em>i<\/em>\u200b) multiply by:&nbsp;<em>f<\/em>(0)(<em>x<\/em>)=<em>w<\/em>1\u200b<em>x<\/em>1\u200b+<em>w<\/em>2\u200b<em>x<\/em>2\u200b+\u22ef+<em>b<\/em>. The essence of learning on this&nbsp;<strong>weights<\/strong>&nbsp;fine-tuning to keep the error amount to a minimum.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Google&nbsp;<strong>Gemma<\/strong>&nbsp;This model is an excellent example of how this vast knowledge can be compressed into a file of locally manageable size while retaining the power of modern transformer architectures.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. Hardware requirements and optimization: CPU vs. GPU<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Although AI can be run&nbsp;<strong>CPU<\/strong>&nbsp;The speed difference is drastic. The CPU is suitable for sequential work, while the&nbsp;<strong>GPU<\/strong>&nbsp;(video card) performs matrix operations on thousands of cores, which is essential for real-time responses. The most important bottleneck is&nbsp;<strong>VRAM<\/strong>&nbsp;(Video RAM) Size: the weights of the model must fit entirely here for maximum performance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As a senior architect, it is important to know how to manage resources. If you use multiple models, it's critical.&nbsp;<strong>\u2018Unloading models\u2019<\/strong>&nbsp;technique. The Ollama API&nbsp;<code>POST \/api\/models\/unload<\/code>&nbsp;the Call (or OpenWebUI&nbsp;<code>keep_alive=0<\/code>&nbsp;The memory can be immediately released. This forces the system to empty the current model from VRAM, giving space to the next one without having to restart the entire service.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. Ollama: The engine of local AI<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">That&nbsp;<strong>Ollama<\/strong>&nbsp;one&nbsp;<strong>Protocol-Oriented Design<\/strong>&nbsp;A framework based on its principles that standardizes model management through its API running on port 11434. Simplifies model downloading, versioning, and running. The modern&nbsp;<strong>Reasoning \/ Thinking<\/strong>&nbsp;When handling models (e.g. DeepSeek-R1), Ollama is able to isolate the thinking process from the final response.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Thinking Phase (A&nbsp;<code>&lt;think&gt;<\/code>&nbsp;content of members) is not enough to properly display a smooth start; the Server Behavior&nbsp;<code>ollama serve --reasoning-parser<\/code>&nbsp;flag or change the appropriate configuration file.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Download model and run immediately ollama run gemma:7b # Server startup reasoning parser with support ollama serve --reasoning-parser\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">6. OpenWebUI: The professional interface<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">That&nbsp;<strong>OpenWebUI<\/strong>&nbsp;Not just a ChatGPT-like interface, but a full-featured control center. It integrates functions such as&nbsp;<strong>AUTOMATIC1111<\/strong>&nbsp;based&nbsp;<strong>image generation<\/strong>, or a&nbsp;<strong>RAG (Retrieval-Augmented Generation)<\/strong>, which allows you to upload your own documents (PDF, TXT) and the model to respond based on them, avoiding hallucinations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The safety backbone of the system&nbsp;<strong>Role-Based Access Control (RBAC)<\/strong>&nbsp;give it to me. Entitlements&nbsp;<strong>additive<\/strong>&nbsp;of a nature: the user's abilities are expanded by group memberships.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Role<\/th><th>Description and Privileges<\/th><\/tr><tr><td><strong>Admin<\/strong><\/td><td>Full access: model download, system settings, user management.<\/td><\/tr><tr><td><strong>User<\/strong><\/td><td>Standard access to the models and knowledge allowed to it.<\/td><\/tr><tr><td><strong>Pending<\/strong><\/td><td>Security waiting line; new registrants do not have access to data until admin approval.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">7. Advanced integrations and development tools<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The real power of local AI lies in automation. Ollama's API allows you to use tools such as&nbsp;<strong>Claude Code<\/strong>&nbsp;or other CLI-based assistants originally designed for cloud APIs. The most popular way to integrate into a developer environment is to&nbsp;<strong>Continue plugin (VS Code)<\/strong>, which offers local code additions and code explanations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Python ecosystem provides the background for the development of unique solutions. Model outputs and unstructured data can be processed with libraries such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Numpy and Pandas:<\/strong>&nbsp;Data manipulation and statistical analysis.<\/li>\n\n\n\n<li><strong>TensorFlow \/ Keras:<\/strong>&nbsp;Developing your own neural networks and classifiers.<\/li>\n\n\n\n<li><strong>Scikit-learn:<\/strong>&nbsp;Implement classic machine learning algorithms.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">8. Troubleshooting and network settings (Professional deep water)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When building local systems, most errors occur in the network layer. In the Docker environment, the most important rule is&nbsp;<strong>Localhost Confusion<\/strong>&nbsp;avoidance: for the browser&nbsp;<code>localhost<\/code>&nbsp;means our own machine, but within the container of OpenWebUI&nbsp;<code>localhost<\/code>&nbsp;It covers the container itself. In order to reach Ollama, the&nbsp;<code>host.docker.internal<\/code>&nbsp;The title must be used.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following configurations are essential for stable operation:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>CORS Settings:<\/strong>&nbsp;A&nbsp;<code>CORS_ALLOW_ORIGIN<\/code>&nbsp;All URLs used for access (domain, IP, localhost) must be listed in the variable, otherwise the WebSocket connection will be disconnected.<\/li>\n\n\n\n<li><strong>Nginx and Streaming:<\/strong>&nbsp;If a reverse proxy is used, Nginx buffering cuts SSE (Server-Sent Events) packets, resulting in warp markdown codes. The solution is&nbsp;<code>proxy_buffering off;<\/code>&nbsp;Its use, which not only corrects the error, but also drastically increases the speed of the response.<\/li>\n\n\n\n<li><strong>WebSocket Headers:<\/strong>&nbsp;For a stable connection, proxy configuration requires&nbsp;<code>Upgrade<\/code>&nbsp;and a&nbsp;<code>Connection<\/code>&nbsp;handing over headers:<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">9. Summary and Future Perspectives<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A&nbsp;<strong>Local AI<\/strong>&nbsp;More than a hobby: It is a tool of technological self-determination. Ollama and OpenWebUI offer a mature ecosystem that surpasses cloud alternatives in data security and flexibility.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The future belongs to hybrid solutions, where sensitive data is processed locally and raw computation needs are delegated in a targeted manner. I encourage everyone to experiment: technology is ready, licenses are free, and knowledge is already on your desk. AI is no longer the privilege of remote servers, but our own intelligent digital assistant.<\/p>","protected":false},"excerpt":{"rendered":"<p>In the previous parts of our series of articles, we explored the theoretical foundations and the mathematical background of machine learning. Today, however, we are on the verge of a paradigm shift: This is the local AI revolution.<\/p>","protected":false},"author":2,"featured_media":1557,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"slim_seo":{"title":"A lok\u00e1lis MI forradalma: Ollama, Gemma \u00e9s OpenWebUI \u2013 Teljes \u00fatmutat\u00f3 (MI Alapjai 6. r\u00e9sz) - Tesz\u00e1ry P\u00e9ter","description":"A mesters\u00e9ges intelligencia alapjai cikksorozatunk eddigi r\u00e9szeiben az elm\u00e9leti alapokat \u00e9s a g\u00e9pi tanul\u00e1s matematikai h\u00e1tter\u00e9t j\u00e1rtuk k\u00f6rbe. Ma azonban egy par"},"footnotes":""},"categories":[93,13],"tags":[94,96,95,21],"class_list":["post-2223","publikacio","type-publikacio","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-open-source","tag-ai","tag-mesterseges-intelligencia","tag-mi","tag-open-source"],"openstation_lock":null,"openstation_contributors":[],"openstation_attached_media":[1557],"meta_box":[],"_links":{"self":[{"href":"https:\/\/teszarypeter.hu\/en\/wp-json\/wp\/v2\/publikacio\/2223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/teszarypeter.hu\/en\/wp-json\/wp\/v2\/publikacio"}],"about":[{"href":"https:\/\/teszarypeter.hu\/en\/wp-json\/wp\/v2\/types\/publikacio"}],"author":[{"embeddable":true,"href":"https:\/\/teszarypeter.hu\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/teszarypeter.hu\/en\/wp-json\/wp\/v2\/comments?post=2223"}],"version-history":[{"count":2,"href":"https:\/\/teszarypeter.hu\/en\/wp-json\/wp\/v2\/publikacio\/2223\/revisions"}],"predecessor-version":[{"id":2254,"href":"https:\/\/teszarypeter.hu\/en\/wp-json\/wp\/v2\/publikacio\/2223\/revisions\/2254"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/teszarypeter.hu\/en\/wp-json\/wp\/v2\/media\/1557"}],"wp:attachment":[{"href":"https:\/\/teszarypeter.hu\/en\/wp-json\/wp\/v2\/media?parent=2223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/teszarypeter.hu\/en\/wp-json\/wp\/v2\/categories?post=2223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/teszarypeter.hu\/en\/wp-json\/wp\/v2\/tags?post=2223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}