# How to run an LLM locally on your own computer · AI in Bed

https://www.aiinbed.com/blog/how-to-run-an-llm-locally · Published 2026-11-25

**Short answer:** To run an LLM 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 parameters 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 prompts and documents never leave your computer.
- **Free.** No subscription or per-token fees once you have the hardware.
- **Offline.** Works on a plane or with no signal.
- **Control.** Pick the model, change settings like [temperature](https://www.aiinbed.com/glossary/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](https://www.aiinbed.com/glossary/open-weight-model): companies and labs publish the trained weights for anyone to download. The [open models lesson](https://www.aiinbed.com/learn/intermediate/open-models) 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:

> Memory in GB ≈ parameters in billions × bits per weight ÷ 8, plus about 20% for the conversation. So an 8-billion-parameter model at 4 bits needs about 8 × 4 ÷ 8 = 4 GB, roughly 5 GB with headroom.

- **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](https://www.aiinbed.com/glossary/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](https://www.aiinbed.com/learn/advanced/efficient-finetuning) and [inference and serving](https://www.aiinbed.com/learn/advanced/inference-and-serving).

### Step by step: your first local model

**Option A: LM Studio (no command line).**

1. Download LM Studio from lmstudio.ai and install it.
2. 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.
3. Download it, load it and start chatting.

**Option B: Ollama (simple command line).**

1. Install Ollama from ollama.com.
2. Open a terminal and run `ollama run` followed by a model name from its library, for example `ollama run llama3.2`. The first run downloads the model.
3. 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](https://www.aiinbed.com/glossary/hallucination) more, so check facts.

You can make a local model much more useful by connecting it to your own files with [RAG](https://www.aiinbed.com/blog/what-is-rag), or by trying a [reasoning model](https://www.aiinbed.com/learn/advanced/reasoning-models) that thinks before answering. Many small models are themselves made by [knowledge distillation](https://www.aiinbed.com/glossary/knowledge-distillation) from bigger ones.

> Check each model's licence before using it in a product. "Open weights" doesn't always mean you can use it for anything.

### 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.

### 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

- [Ollama](https://ollama.com/) by Ollama
- [LM Studio](https://lmstudio.ai/) by LM Studio
- [llama.cpp](https://github.com/ggml-org/llama.cpp) by ggml-org
- [Models on the Hugging Face Hub](https://huggingface.co/models) by Hugging Face
