Running a model locally with Ollama: fully private AI
Time: 10:50 AM to 11:40 AM
Install Ollama
Install Ollama on your laptop (not the Pi, your laptop has more compute):- Mac / Linux
- Windows
Visit ollama.com and download the installer, or run:
Pull a model
Download a small model that fits in memory:Chat locally
Connect it to the robot
Update the chatbot from Day 3 to point at your local Ollama instance instead of the OpenAI API. This is a two-line code change: swap the API endpoint tolocalhost and update the model name.
When to use local vs cloud
| Use case | Recommendation |
|---|---|
| Personal projects | Local is fine |
| Medical or legal data | Local required |
| Battlefield or air-gapped systems | Local, audited, air-gapped |
| Cutting-edge quality needed | Cloud (newest models) |
| Cost-sensitive high volume | Local (no per-token cost) |
The capability is nearly identical. What you lose with local models is cutting-edge quality. What you gain is privacy, zero cost per token, no rate limits, and no third-party dependency.

