How to run an LLM locally (and whether you need a GPU)
I run Ollama on a 16 GB M2 Pro. Here's the install, my tokens per second with and without the GPU, and which local model I use for which job.
7 min read
Short answer: install Ollama, run ollama run llama3.2:3b, and you have a working local LLM a few minutes later. You don't need a GPU for a small model. On my M2 Pro with 16 GB of memory, Llama 3.2 3B generated 72 tokens per second on the GPU and 39 with the GPU switched off. Half the speed, and still about seven times faster than you can read.
The rest is how to get there, how to measure your own machine, and the mistake I made first: using a model that couldn't do the job. My first local vision attempt renamed a photo im_sorry_but_i_cant_process_images.jpg.
Run your first local model
I use Ollama. It runs models as a background service, gives you a chat prompt in the terminal, and serves a local API your own code can call.
- Install it. On a Mac:
brew install ollama, or download the app from ollama.com. Windows and Linux installers are on the same page. - Pull and run a small model:
ollama run llama3.2:3b
The first run downloads the model (2.0 GB for this one, per the Ollama library page), then drops you into a >>> prompt. Ask it anything. Type /bye to leave.
- See what you have and clean up:
ollama list # models on disk
ollama rm mistral # delete one you don't use
That's a local LLM. The part most guides skip is that Ollama is also a server. Anything on your machine can call it:
curl http://localhost:11434/api/generate -d '{
"model": "llama3.2:3b",
"prompt": "Write a commit message for: fix null check in invoice export",
"stream": false
}'
This is how my own apps use it. No API key, no bill, no network.
Do you need a GPU? My measured numbers
I ran the same model on the same prompt twice on my MacBook Pro: once normally, once with the GPU switched off.
| Llama 3.2 3B on an M2 Pro, 16 GB | Generation speed |
|---|---|
| GPU (default) | 72 tokens/s |
CPU only (num_gpu 0) |
39 tokens/s |
A note on what "no GPU" means on a Mac. Apple Silicon has no separate graphics card. The GPU sits on the same chip and shares the 16 GB with everything else. Forcing Ollama onto the CPU is the closest I can get to a laptop with no usable GPU, which is the machine most people asking this question have.
To judge whether a number is usable, compare it to how fast you read. Adults read non-fiction silently at about 238 words a minute (Brysbaert, 2019), and a token is about three quarters of a word (OpenAI). That works out to roughly 5 tokens per second. Anything above that streams faster than you can read it.
So on my machine the GPU roughly doubles the speed, and CPU only at 39 tokens per second is still well past reading speed for a 3B model. The one cost I noticed: switching to CPU made Ollama reload the model, which took about 5 seconds before the first word.
Memory is the real limit, not the GPU. The whole model has to fit in RAM, next to your browser and editor. The download size on the Ollama library is a fair floor for what a model needs:
llama3.2:1bis 1.3 GB and runs on almost anythingllama3.2:3bis 2.0 GBllava:7bis 4.7 GB, fine on 16 GBllava:13bis 8.0 GBllava:34bis 20 GB, so it won't load on a 16 GB machine at all
No GPU just makes a model slower. Not enough memory means it doesn't run.
Measure your own machine in two minutes
Don't trust my numbers for your hardware. Ollama prints the speed if you ask it to:
ollama run llama3.2:3b --verbose
Ask a question, then read the eval rate line under the answer. That's generation speed in tokens per second. To force CPU only, type this at the >>> prompt and ask again:
/set parameter num_gpu 0
num_gpu is the number of model layers Ollama puts on the GPU. Zero means none.
The model matters more than the tool
When I built my AI image renaming app with Python, tkinter and Ollama, I pointed it at Mistral first. The renamed files came back as:
as_an_ai_language_model_i_cannot.jpg
i_dont_have_vision_capabilities.jpg
im_sorry_but_i_cant_process_images.jpg
Mistral is a text-only model. It can't see images, so it apologized, and my code dutifully turned the apology into a filename. Switching to LLaVA, a vision model, fixed it: IMG_0001.jpg became sunset_beach.jpg.
I left a guard in the app afterwards. If the model's answer contains phrases like "sorry", "cannot" or "as an ai", it stops and tells you to pick a vision model:
REFUSALS = ["sorry", "can't", "cannot", "unable", "don't have",
"no image", "as an ai", "language model"]
if any(p in title.lower() for p in REFUSALS):
raise ValueError("This model doesn't seem to support images. Try llava or llama3.2-vision.")
Detecting the wrong model by reading its apology is crude. It works.
So before "can my laptop run it", ask "can this model do the job":
- Text in, text out:
llama3.2,mistral - Images in:
llava,llama3.2-vision - Search over your own documents: an embedding model, which turns text into numbers you can compare, plus a text model to write the answer
Ollama or LM Studio
I use Ollama, because both of my local AI apps are Python code that calls a model, and Ollama's local API is the shortest path to that.
LM Studio is the better first step if you'd rather click than type. It's a desktop app with a model browser, a chat window and its own local server. Two things changed since I first wrote this post:
- LM Studio dropped its commercial license requirement on 8 July 2025, so it's free to use at work (Simon Willison's note).
- Ollama 0.19, released 1 April 2026, rebuilt its Apple Silicon engine on MLX, Apple's own machine learning framework (launch page). MLX support used to be a reason Mac users picked LM Studio.
You can install both. They keep their own model folders, so a model you pulled in one gets downloaded again in the other.
My rule: if code will call the model, Ollama. If you just want to chat with one privately, LM Studio.
What I use local models for
Two jobs, both where privacy beats raw quality.
Renaming photos by what's in them. LLaVA looks at each image and suggests a short name. Whole folders go through it and none of the photos leave the laptop.
Asking questions about PDFs. My local PDF retrieval setup with Ollama splits documents into chunks, stores them in a FAISS index (a fast similarity search library from Meta), finds the three most relevant chunks for a question and hands them to Mistral to answer. The embeddings come from all-MiniLM-L6-v2, a small model that runs comfortably on a laptop CPU.
If you were prototyping on GitHub Models, a local Ollama install is one of the cheapest places to land now that it's being retired.
What stays in the cloud
Long, hard work. Refactoring across a codebase, reading a 100-page spec, anything that needs a big context window and careful reasoning. A 3B model on a laptop is quick and private. It is not a replacement for a frontier model on a hard problem, and pretending otherwise wastes more time than it saves.
Don't open it to your whole network by accident
Ollama listens on 127.0.0.1:11434 by default, so only your own machine can reach it. Some tutorials tell you to set OLLAMA_HOST=0.0.0.0 so another device can use it. That exposes it to everyone on the network, and Ollama has no login. If you need remote access, put it behind a reverse proxy with auth, and run through my self-hosted security checklist first.
What to do now
Run ollama run llama3.2:3b --verbose, ask it one question, and read the eval rate line. Then run it again with /set parameter num_gpu 0. Two numbers, two minutes, and you'll know exactly what your own machine can do before you download anything bigger.
Last updated 4 Nov 2026