Running AI Models Locally: Ollama, LM Studio and Open-Weight Models

Local AI: private, offline, and free to run

You don't need the cloud to use AI. Open-weight models — models whose weights are published for anyone to download — can run on a decent laptop. Your data never leaves your machine.

Why Run Locally?

  • Privacy — sensitive documents stay on your device
  • Offline — works on a plane or with bad internet
  • No per-token cost — run as much as you like
  • Learning — understand how models actually behave
  • Customisation — fine-tune or modify models for your needs

Popular Open-Weight Model Families

  • Llama (Meta)
  • Qwen (Alibaba) — strong multilingual and coding versions
  • Gemma (Google) — small, efficient models
  • Mistral — efficient European models
  • DeepSeek — strong reasoning models
  • gpt-oss (OpenAI) — open-weight models from OpenAI
  • Phi (Microsoft) — small models for limited hardware

Check each model's licence before commercial use — "open weights" does not always mean "use for anything".

Hardware Rough Guide

Model size is measured in parameters (e.g. 8B = 8 billion). With common compression (quantisation):

  • 3–4B models — run on most modern laptops with 8 GB RAM
  • 7–14B models — comfortable with 16 GB RAM or a GPU with 8–12 GB VRAM
  • 30B+ models — need 32 GB+ RAM, Apple Silicon with lots of unified memory, or a strong GPU

Apple Silicon Macs are particularly good for local AI because CPU and GPU share memory.

Option 1: Ollama (Command Line)

# Install from ollama.com, then:
ollama run llama3.2
ollama run qwen2.5-coder:7b

Ollama also exposes a local API on http://localhost:11434, so your apps can call it like a cloud API — often with OpenAI-compatible endpoints.

curl http://localhost:11434/api/generate -d '{
  "model": "llama3.2",
  "prompt": "Explain JQL in 3 sentences"
}'

Option 2: LM Studio (Desktop App)

A friendly GUI: browse models, download with one click, chat, and start a local server. Great if you prefer not to use the terminal.

Good Local Use Cases

  • Summarising private documents
  • Offline coding help with small coder models
  • Classification and tagging of internal data
  • Learning prompt engineering and RAG without API costs
  • Prototyping before moving to a cloud model

Honest Limitations

  • Local models are usually less capable than the top cloud models on complex reasoning
  • Large models are slow without a good GPU
  • You manage updates, security, and hardware yourself

Use cloud models for the hardest problems and local models for the private, repetitive, or offline ones. Knowing both is the practical setup.

Arivanandhan Chitheshwaran