When you type a question into ChatGPT, Claude or Gemini, your question travels over the internet to a data centre. A huge model reads it there, writes an answer, and sends it back. The model never touches your computer.
But a language model is, in the end, just a file of numbers and a program that reads it. Smaller open models are now good enough, and laptops are now strong enough, that you can run a real LLM on your own computer. No account, no internet once it’s downloaded, and no bill per question.
This guide explains what “running an LLM locally” actually means, why you might want to, what hardware you need, and the four ways you can talk to a local model. It is the first part of a series, but you can read it on its own.
What does “running an LLM locally” mean?
A large language model (LLM) is a program that has learned, from huge amounts of text, to predict what comes next. Everything it learned is stored in billions of numbers called weights. When training finishes, those weights are saved into a file. (New to this? Our guide to what a large language model is explains it from scratch.)
Running an LLM locally means that file sits on your disk, gets loaded into your computer’s memory, and your processor or graphics card does the predicting. Your question and the answer never leave your machine.
Here is a real example. The model we use throughout this series is Qwen 3.5, 4B: about 4 billion weights, in a file of about 3.4 GB. That is smaller than many video games.
A model file on its own does nothing
Here is the surprising part. If you download that file and double-click it, nothing happens. It is not an app. It is just a very long list of numbers.
To actually chat with it, something has to do three jobs:
- Download it. Find the model in a library and fetch it, once.
- Keep it organised. You will soon have several models with different names and sizes. Something has to track them, update them and delete the ones you don’t need.
- Run it. Load those billions of numbers into memory and predict the answer one token at a time, exactly the loop described in how an LLM works.
Ollama is a free app that does all three. It runs on Windows, macOS and Linux. There are other tools that do similar jobs, but Ollama is simple, popular, and has a clean API, which is why this series uses it. The next part, What is Ollama?, explains how it works inside.
Why run an LLM locally?
There are three big reasons, and they all come from the same fact: the model runs on your machine.
| Cloud AI (ChatGPT, Claude, Gemini) | Local AI (Ollama) | |
|---|---|---|
| Privacy | Your question is sent to a company’s server | Never leaves your computer |
| Internet | Needed for every question | Only for the first download |
| Cost | Subscription or a bill per token | No bill per question |
| Model quality | The biggest, strongest models | Smaller open models |
| Speed | Fast, on powerful servers | Depends on your hardware |
- Private. Your questions, your documents and your code stay on your computer. That matters for company code, personal notes, medical or legal text, or anything you would not paste into a website.
- Offline. Turn off the Wi-Fi and it still answers. You only need the internet once, to download the model.
- No bill. Ask one question or a thousand: there is no cost per question. You pay with your own computer’s memory and electricity instead.
And for developers there is a fourth reason: it is the perfect place to learn. You can call the model from code, see the raw JSON going in and out, and experiment as much as you like without watching a bill.
What hardware do you need?
Models come in sizes, and the size decides how much memory you need. The model name tells you the size: in qwen3.5:4b, the 4b means about 4 billion weights.
A simple rule of thumb: you need a bit more free memory than the download size. The model has to fit into RAM (or into your graphics card’s memory, called VRAM) with some room to spare for the conversation.
| Your computer | A sensible starting size |
|---|---|
| 8 GB RAM, no graphics card | 0.8b to 4b |
| 16 GB RAM, or a GPU with 8 GB | 4b to 9b |
| 32 GB RAM or more, or a big GPU | 9b to 27b and up |
These are starting points, not hard limits. A graphics card makes answers much faster, but it is not required: Ollama also runs on a normal processor (CPU), just slower. On Apple silicon Macs, the CPU and GPU share the same memory, which works well for local models.
We use qwen3.5:4b in this series because, at 3.4 GB, it fits on most laptops and is still genuinely useful.
Your first local LLM in three steps
Here is the whole journey from nothing to a working local model.
Step 1: install Ollama. Download it from ollama.com/download and install it like any other app. Then open a terminal (Command Prompt or PowerShell on Windows, Terminal on macOS) and check it worked:
ollama --version
Step 2: run a model. The first time, this downloads about 3.4 GB, then opens a chat right in your terminal:
ollama run qwen3.5:4b
Step 3: ask it something. Type a question at the >>> prompt:
>>> Write a short article on RAG
Watch it write the answer word by word, on your own machine. When you are done, type /bye to leave.
That is it. You are running a language model locally. The Ollama CLI commands guide explains every command you will need after this.
Four ways to talk to a local model
Once Ollama is installed, it runs quietly in the background as a small server on your computer, at the address localhost:11434. Everything you use talks to that one address.
- The command line (CLI). Type
ollama runand chat. Also how you download, list and delete models. Best for quick tests. Read the CLI guide. - The desktop app. A normal chat window with a model picker. No commands needed. It can also launch coding tools like Claude Code and GitHub Copilot CLI on your local models. Read the desktop app guide.
- The REST API. Send JSON to
localhost:11434with curl or Postman and see exactly what goes in and what comes out. Read the REST API guide. - Code. Your own program sends that same JSON. This is how real AI apps are built. We show it in Python and in Java.
Different doors, one server. Learn the JSON once, and you can use it from anywhere.
A word about “cloud” models in Ollama
When you browse models in Ollama, some names end in :cloud, for example glm-5.3-flash:cloud. These are much bigger models that run on Ollama’s servers, not on your computer. They are convenient, but they are not private and not offline in the way a local model is. If privacy is your reason for going local, stick to models without :cloud in the name.
Key takeaways
- An LLM is a file of learned numbers. On its own, it does nothing.
- Ollama downloads models, keeps them organised, and runs them on your own computer.
- Local means private, offline and no bill per question, with smaller models than the cloud.
- Pick a model size that fits your memory.
qwen3.5:4b(3.4 GB) is a good start. - Everything talks to Ollama at localhost:11434: the CLI, the desktop app, the REST API and your code.
The full series: Run LLMs locally with Ollama
Each part stands on its own, so jump to whichever you need:
- How to run an LLM on your own computer (you are here)
- What is Ollama? The video player for AI models, and localhost:11434 explained
- Ollama CLI commands: the complete cheat sheet
- The Ollama desktop app: chat, pick models, and launch Claude Code or Copilot
- System, user and assistant roles explained
- Ollama REST API: /api/generate vs /api/chat
- Call a local LLM from Python: a stateless request, then a chatbot with memory
- Call a local LLM from Java: HttpClient, a stateless request, then a chatbot with memory
See it in action
Prefer watching? This video walks through the same ideas with live, hands-on demos.
Watch on YouTube ↗
Comments