By the end of this project you'll have a real, capable model running on your machine that you can talk to in the terminal and call from a script — no API keys, no per-token cost. Local models aren't always the right tool, but knowing how to reach for them is part of being fluent.
Tip
Plan for storage. Models are 4–40 GB on disk. Pick one to start.
Step-by-step
The build
1. Install Ollama
brew install ollamaon macOS, or grab the installer for your OS. Runollama servein one terminal — that's the daemon.2. Pull a model
ollama pull llama3.1:8bis a good starter — capable enough for most tasks, fits in 8GB of RAM. Bigger models exist; bigger models are slower.3. Chat with it
ollama run llama3.1:8b. Compare its replies to whichever cloud model you usually use. Notice where it's surprisingly good, and where it falls over. Both matter.4. Call it from a script
Ollama exposes an OpenAI-compatible API at
http://localhost:11434. Point any OpenAI SDK at that URL — your existing code works unchanged.5. Note the trade-offs
Latency: usually faster than cloud. Quality: lower at the same size. Privacy: full. Cost: zero per call, expensive in machine time. Pick local when privacy or offline use matters more than peak quality.
What you learned
- A capable model fits on a laptop. The future where every app can ship with one is closer than it looks.
- The OpenAI API shape has won; everything emulates it. That portability matters.
- Local-vs-cloud is a workload question, not a moral one.