{"id":2752,"date":"2025-09-07T19:41:23","date_gmt":"2025-09-07T23:41:23","guid":{"rendered":"https:\/\/shirishranjit.com\/blog1\/?page_id=2752"},"modified":"2025-09-07T19:41:25","modified_gmt":"2025-09-07T23:41:25","slug":"running-a-large-language-model-llm-locally-on-your-ubuntu-laptop-with-ollama-gpt-oss","status":"publish","type":"page","link":"https:\/\/shirishranjit.com\/blog1\/","title":{"rendered":"Running a Large Language Model (LLM) Locally on Your Ubuntu Laptop with Ollama + GPT-OSS"},"content":{"rendered":"\n<p>Over the past year, open-weight language models have become accessible enough to run directly on consumer hardware. With the release of <strong>OpenAI\u2019s GPT-OSS models<\/strong>, you no longer need cloud APIs to experiment with cutting-edge AI \u2014 you can run them locally on your own laptop.<\/p>\n\n\n\n<p>In this post, I\u2019ll walk you through the <strong>exact steps<\/strong> I used to set up and run GPT-OSS on my laptop using <strong>Ollama<\/strong> and <strong>Open WebUI<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Why Run an LLM Locally?<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Privacy<\/strong>: your prompts and data stay on your laptop.<\/li>\n\n\n\n<li><strong>Offline use<\/strong>: no internet required.<\/li>\n\n\n\n<li><strong>Customization<\/strong>: fine-tune or extend the model for your needs.<\/li>\n\n\n\n<li><strong>Cost-control<\/strong>: no API calls or usage fees.<\/li>\n<\/ul>\n\n\n\n<p>Above all, the way to play with LLM if you would like to dabble into learning how LLM are deployed and used.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step by Step on deploying and running LLM in your laptop<\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">? Step 1: Install Ollama<\/h2>\n\n\n\n<p>Ollama is a lightweight runtime for managing and running LLMs locally. It supports models like LLaMA, Mistral, Phi, Gemma \u2014 and now GPT-OSS.<\/p>\n\n\n\n<p>On Linux or macOS:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">curl -fsSL https:\/\/ollama.com\/install.sh | sh<br \/><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">? Step 2: Pull and Run GPT-OSS<\/h2>\n\n\n\n<p>With Ollama running, you can pull a model. For GPT-OSS, either:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the <strong>official Ollama library<\/strong> when the model is listed, or<\/li>\n\n\n\n<li>Import the <strong>GGUF file<\/strong> from Hugging Face and create a Modelfile.<\/li>\n<\/ul>\n\n\n\n<p>First you need to pull the model into your laptop. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ollama pull gpt-oss:latest<br \/><\/pre>\n\n\n\n<p>Now, check if the model is pulled.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ollama list<\/pre>\n\n\n\n<p>It will show all the model that is available to run in your local machine under ollama<\/p>\n\n\n\n<p>Now run your model and then start asking questions.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ollama run gpt-oss<\/pre>\n\n\n\n<p>You should now see a REPL-like prompt where you can type questions and get answers \u2014 entirely offline. ?<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>You can also use browser to interact with the model but you need additional package. The best package is Open WebUI. It is only available in the Python.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">? Step 3: Install Open WebUI<\/h2>\n\n\n\n<p>A terminal is fine for testing, but for a <strong>ChatGPT-like interface<\/strong>, we\u2019ll use Open WebUI.<\/p>\n\n\n\n<p>You will need to create python environment to setup the open-webui<\/p>\n\n\n\n<p>Install with pip:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pip install open-webui<\/pre>\n\n\n\n<p>Then launch:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">open-webui serve<\/pre>\n\n\n\n<p>By default, it runs at:<\/p>\n\n\n\n<p>? <a href=\"http:\/\/localhost:8080\">http:\/\/localhost:8080<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">? Step 4: Connect Open WebUI to Ollama<\/h2>\n\n\n\n<p>Open WebUI auto-detects your Ollama server (default at <code>http:\/\/localhost:11434<\/code>).<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to <strong>Settings ? Models<\/strong> in WebUI.<\/li>\n\n\n\n<li>Select your GPT-OSS model (e.g., <code>gpt-oss-20b<\/code>).<\/li>\n\n\n\n<li>Start chatting!<\/li>\n<\/ul>\n\n\n\n<p>You now have a <strong>browser-based interface<\/strong> to your local GPT-OSS model.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">? Step 5 (Optional): Enable Web Browsing<\/h2>\n\n\n\n<p>Want your local model to also search the web?<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In Open WebUI, go to <strong>Settings ? Extensions ? Web Search<\/strong>.<\/li>\n\n\n\n<li>Enable a search provider (DuckDuckGo, Brave, etc.).<\/li>\n\n\n\n<li>Now GPT-OSS can browse live web pages and summarize them.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Running a model like <strong>GPT-OSS<\/strong> locally on a laptop would have seemed impossible just a few years ago. Today, with tools like <strong>Ollama<\/strong> and <strong>Open WebUI<\/strong>, it\u2019s just a few commands away.<\/p>\n\n\n\n<p>This setup is perfect for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Personal productivity<\/li>\n\n\n\n<li>Offline knowledge exploration<\/li>\n\n\n\n<li>Experimenting with fine-tuning<\/li>\n\n\n\n<li>Learning how modern LLMs work under the hood<\/li>\n<\/ul>\n\n\n\n<p>And best of all \u2014 your data never leaves your machine.<\/p>\n<div class=\"twttr_buttons\"><div class=\"twttr_twitter\">\n\t\t\t\t\t<a href=\"http:\/\/twitter.com\/share?text=Running+a+Large+Language+Model+%28LLM%29+Locally+on+Your+Ubuntu+Laptop+with+Ollama+%2B+GPT-OSS\" class=\"twitter-share-button\" data-via=\"\" data-hashtags=\"\"  data-size=\"default\" data-url=\"https:\/\/shirishranjit.com\/blog1\/\"  data-related=\"\" target=\"_blank\">Tweet<\/a>\n\t\t\t\t<\/div><div class=\"twttr_followme\">\n\t\t\t\t\t\t<a href=\"https:\/\/twitter.com\/shiranjit\" class=\"twitter-follow-button\" data-size=\"default\"  data-show-screen-name=\"false\"  target=\"_blank\">Follow me<\/a>\n\t\t\t\t\t<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Over the past year, open-weight language models have become accessible enough to run directly on consumer hardware. With the release of OpenAI\u2019s GPT-OSS models, you no longer need cloud APIs to experiment with cutting-edge AI \u2014 you can run them &hellip; <a href=\"https:\/\/shirishranjit.com\/blog1\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"parent":372,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2752","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/2752"}],"collection":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/comments?post=2752"}],"version-history":[{"count":1,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/2752\/revisions"}],"predecessor-version":[{"id":2753,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/2752\/revisions\/2753"}],"up":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/372"}],"wp:attachment":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/media?parent=2752"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}