Using AI well
How to run an LLM locally on your own computer
You can run open-weight AI models like Llama, Mistral, Qwen or Gemma on your own laptop, for free and offline. What hardware you need, which tools to use (Ollama, LM Studio, llama.cpp) and how quantisation makes it fit.
Short answer
To run an locally, install a free app such as Ollama or LM Studio, download an open-weight model such as Llama, Qwen, Mistral or Gemma, and chat with it on your own machine, with no internet or account needed. Small models of about 1 to 8 billion run on most modern laptops with 8 to 16 GB of memory, thanks to quantisation, which shrinks the model to around 4 bits per weight.
Why run AI locally?
- Privacy. Your and documents never leave your computer.
- Free. No subscription or per- fees once you have the hardware.
- Offline. Works on a plane or with no signal.
- Control. Pick the model, change settings like temperature, and build your own tools on top.
- Learning. Seeing a model run on your own machine makes the ideas click.
This is possible because of open-weight models: companies and labs publish the trained weights for anyone to download. The open models lesson covers who releases them and their licences.
What hardware do you need?
The main limit is memory. The model's weights have to fit in your RAM, or your graphics card's VRAM if you have one. A quick estimate:
- 8 GB RAM: small models of about 1 to 4 billion parameters. Fine for simple chat, summaries and rewriting.
- 16 GB RAM: 7 to 8 billion parameter models comfortably. A good everyday sweet spot.
- 32 GB or more, or a GPU with 16 to 24 GB: around 14 to 32 billion parameters, noticeably smarter.
- 64 GB and up: larger models, still slower than the cloud.
Apple Silicon Macs work especially well, because the GPU shares the main memory. On Windows and Linux, an NVIDIA graphics card speeds things up a lot, but CPU-only works for small models.
How quantisation makes models fit
Models are trained with 16-bit numbers for each weight. Quantisation rounds them to fewer bits, typically 4 to 8, cutting size by up to four times with only a small loss in quality. Local model files are usually in the GGUF format, with names like Q4_K_M (about 4-bit) or Q8_0 (8-bit).
Lower bits means smaller and faster but a little less accurate. 4-bit is the usual starting point. More in the efficient fine-tuning lesson and inference and serving.
Step by step: your first local model
Option A: LM Studio (no command line).
- Download LM Studio from lmstudio.ai and install it.
- Search for a small instruct model, such as a recent Llama, Qwen, Gemma or Mistral model of around 4 to 8 billion parameters. It suggests versions that fit your machine.
- Download it, load it and start chatting.
Option B: Ollama (simple command line).
- Install Ollama from ollama.com.
- Open a terminal and run
ollama runfollowed by a model name from its library, for exampleollama run llama3.2. The first run downloads the model. - Type your questions. Ollama also serves a local API on your machine, so other apps can use the model.
Both run on llama.cpp, an open-source engine you can also use directly. For bigger setups, servers like vLLM are built for speed.
What to expect
A good 8-billion-parameter model today is roughly as capable as the best cloud models were a few years ago: great for drafting, summarising, explaining and simple code, weaker at hard reasoning and niche facts. Small models hallucinate more, so check facts.
You can make a local model much more useful by connecting it to your own files with RAG, or by trying a reasoning model that thinks before answering. Many small models are themselves made by knowledge distillation from bigger ones.
Key takeaways
- Local AI is free to use, private and works offline.
- Tools: Ollama (simple, command line), LM Studio (point and click), llama.cpp (the engine many use).
- Rough memory need: billions of parameters × bits per weight ÷ 8, in GB, plus some headroom.
- Local models are smaller than the biggest cloud models, so expect less polish on hard tasks.
Learn it properly, free
- Open-weight models and running AI yourselfIntermediate · 6 min
- How models are served: prefill, decode and the KV cacheAdvanced · 8 min
- Fine-tuning on a budget: LoRA & quantisationAdvanced · 6 min
- Distillation and the rise of small modelsAdvanced · 7 min
Terms in this post
Questions
Can I run an LLM on my laptop?
Yes. With 8 to 16 GB of memory, most modern laptops can run small open-weight models of about 1 to 8 billion parameters using free tools like Ollama or LM Studio.
What is the easiest way to run AI locally?
LM Studio is the easiest if you prefer a regular app; Ollama is the simplest if you're comfortable typing one command in a terminal. Both are free.
How much RAM do I need to run a 7B model?
At 4-bit quantisation, a 7 to 8 billion parameter model needs about 4 to 5 GB for its weights, so 8 GB of RAM works and 16 GB is comfortable.
Is running an LLM locally private?
Yes. The model runs entirely on your computer, so your prompts and files aren't sent to a server, as long as the app itself isn't set to send data online.
Sources and further reading
- Ollama · Ollama · Free, open source
- LM Studio · LM Studio · Free app
- llama.cpp · ggml-org · Open source
- Models on the Hugging Face Hub · Hugging Face