Cloud AI vs local AI
βοΈCloud model
ChatGPT, Claude, Geminiβ¦
Most capable models
Your prompt is sent over the internet
Pay per use or subscription
π»Local model
Runs on your laptop
Private: data stays on your machine
Free per use, works offline
Smaller, less capable models
Why size matters: parameters and memory
A model is mostly a giant list of numbers called parameters (or weights). β8Bβ means 8 billion of them. To run the model, all those numbers must fit in memory (RAM, or the graphics card's VRAM).
memory β parameters Γ bytes per parameter (+ about 20% overhead)
8B model at 16-bit (2 bytes): 8 Γ 2 = 16 GB β too big for most laptops
8B model at 4-bit (0.5 bytes): 8 Γ 0.5 = 4 GB β about 5 GB with overhead β
Quantization: the trick that makes it fit
Quantization stores each number with fewer bits, like saving a photo as a smaller JPEG: you lose a little detail, but it's still clearly the same picture. 4-bit is the usual sweet spot.
| Model size | 4-bit memory (approx.) | Runs well on | Good for |
|---|---|---|---|
| 1β4B | 1β3 GB | Most laptops, some phones | Simple chat, tagging, short summaries |
| 7β9B | 5β6 GB | 16 GB laptops | Everyday writing, coding help, Q&A |
| 12β14B | 8β10 GB | 16β32 GB laptops / good GPUs | Better reasoning and longer answers |
| 30B+ | 20 GB+ | Powerful desktops, big GPUs | Close to older cloud-model quality |
Run your first local model with Ollama
β¬οΈInstall Ollama
From ollama.com (macOS, Windows, Linux)
π¦Pull a model
Downloads the quantized weights once
π¬Chat in the terminal
Or connect an app to its local API
# download a small model (about 2 GB) and start chatting$ollama run llama3.2# see which models you have, and remove one you don't need$ollama list$ollama rm llama3.2
Ollama also runs a local web API on your computer, so your own programs can use the model, just like a cloud API but at localhost:
curl http://localhost:11434/api/generate -d '{
"model": "llama3.2",
"prompt": "Explain RAG in one sentence.",
"stream": false
}'Choosing a model
- Start small (3β4B) to check your machine, then try bigger until it gets slow.
- Pick by task: some models are tuned for chat, others for code.
- Check the licence before using a model in a product.
- Test on your own examples, ideally with a small eval, rather than trusting leaderboards.
π― Spot the pattern: is it a good use of a local model?
In an interview nobody tells you the pattern. Read each problem and decide. Look for the signal words.
1. Summarise confidential company documents
2. Write code on a long flight with no Wi-Fi
3. Solve the hardest competition maths problems
4. Tag 100,000 product reviews as positive or negative
5. You have an old laptop with 4 GB of RAM and want the best answers
π― Interview questions on this topic
Try to answer out loud first, then tap to check.
Q1Why would a company run models locally or on its own servers?Fresher+
Q2What is quantization and what's the trade-off?1β3 yrs+
Q3How do you estimate the memory needed for a model?1β3 yrs+
Q4Local model vs cloud API for a product feature?3+ yrs+
Key takeaways
- βYou can run useful AI models on your own computer.
- βMemory is the limit; quantization makes models fit.
- βOllama gets you from zero to chatting in one command.
- βPick local for privacy and volume, cloud for the hardest tasks.
Frequently asked questions
Can I really run an AI model on my laptop?
Yes. Small and medium open-weight models run on ordinary laptops, especially recent Macs with Apple Silicon or PCs with a graphics card. They are less capable than the biggest cloud models, but good for many everyday tasks.
What is an open-weight model?
A model whose trained weights (its learned numbers) are published so anyone can download and run it, such as the Llama, Gemma, Qwen and Mistral families. Check each model's licence before using it in a product.
How much RAM do I need?
Roughly: a 3β4 billion parameter model needs about 3β4 GB, a 7β8B model about 5β6 GB, and a 14B model about 9β10 GB of free memory when 4-bit quantized. 16 GB of RAM is a comfortable start.
What is quantization?
Storing each of the model's numbers with fewer bits (for example 4 bits instead of 16). The model becomes about 4Γ smaller and faster with only a small drop in quality, which is what makes laptops practical.
Is a local model private?
Your prompts stay on your computer, which is the main reason people run models locally. Download models and tools only from trusted sources.
π§ Quick check: running AI locally
1. Main reasons to run a model locally?
2. Quantization does what?
3. About how much memory does an 8B model need at 4-bit?
4. Which is NOT a good fit for a small local model?
Checking your accessβ¦