14.1 · Why run models locally
- Privacy — data never leaves your VPC, your laptop, or your hospital.
- Cost ceiling — pay for hardware once; unlimited inference for batch workloads.
- Latency — sub-100ms first token when your model is local.
- Sovereignty — no vendor can deprecate, rate-limit, or change your model overnight.
- Reproducibility — same weights forever; great for research and audits.
And one big trade-off: frontier capability still lives in cloud APIs. Local 8B–70B models are great; they are not GPT-5 / Claude Opus.
14.2 · Ollama — the simplest path
Ollama turns running an LLM into ollama run llama3. It pulls quantised weights, serves a clean HTTP API, and supports tool calling.
# macOS / Linux / Windows
ollama pull llama3.1
ollama run llama3.1
# OpenAI-compatible endpoint:
POST http://localhost:11434/v1/chat/completions
Strengths: dead simple, OpenAI-compatible API, integrates with every framework. Weakness: not the fastest at scale — better for dev, small teams, and edge.
14.3 · vLLM — server-grade throughput
vLLM is the open-source inference engine of choice for serving many users at once. Its PagedAttention kernel reuses GPU memory aggressively, producing 5–20× more throughput than naive transformers serving.
vllm serve meta-llama/Llama-3.1-70B-Instruct \
--tensor-parallel-size 4 \
--max-model-len 16384
Use it when: you have GPUs, you have concurrent users, and you've outgrown Ollama. Many companies build their entire inference stack on vLLM + a router.
14.4 · llama.cpp — laptop-grade efficiency
Pure-C++, no GPU required. Powers many of the "run on a MacBook" experiences (LM Studio, Jan, Ollama under the hood). Highly quantised (Q4, Q5) models run at chat speed on consumer hardware.
14.5 · Choosing a local model in 2026
| Need | Try first |
|---|---|
| General chat, low VRAM | Llama 3.1 8B Q4, Phi-3-mini |
| Coding | Qwen2.5-Coder, DeepSeek-Coder |
| Multilingual including Urdu/Arabic | Qwen2.5, Gemma 2 |
| Large context (128k+) | Llama 3.1 70B, Qwen2.5 |
| Reasoning at lowest cost | Smaller "thinking" open models (e.g., DeepSeek-R1 distills) |
| Embeddings | BGE-M3, E5-mistral |
14.6 · The no-code agent landscape
For business automation, integration, and prototyping, visual builders win on time-to-value. The trio you'll meet most:
| Tool | Sweet spot |
|---|---|
| n8n | Open-source, self-hostable, developer-leaning workflows. |
| Make.com (Integromat) | Polished UX, broad SaaS coverage, mid-market business teams. |
| Zapier | Largest connector ecosystem, simplest "if X then Y". |
| Flowise / Langflow | Visual LangChain — chains and agents you can drag together. |
| Dify, BuildShip | Hosted agent platforms with built-in RAG. |
14.7 · n8n — building an agent in ~10 nodes
A workhorse flow looks like:
- Trigger — webhook (e.g. new email).
- Extract — parse fields with the JSON / HTML / OCR node.
- RAG fetch — query a vector store (pgvector, Qdrant).
- LLM node — Claude / OpenAI with a structured-output schema.
- Tool branch — based on intent, call Slack, CRM, or DB.
- Persist — write the run to a log table.
- Notify — reply to the user with the answer + citations.
14.8 · Make.com — the polished alternative
Make.com excels at deeply integrated business scenarios. Use it when your stakeholder is a business owner who wants to own the automation themselves after you build it.
14.9 · Flowise / Langflow — visual LangChain
Drag-and-drop the same primitives you'd use in code: loaders, splitters, retrievers, agents. Great for prototyping; export to JSON to version-control your flows.
14.10 · When to pick what
| Situation | Pick |
|---|---|
| Internal tool, business team owns it | n8n or Make.com |
| SaaS product, must scale to 10k users | Code + cloud LLM + serverless |
| Strict data residency / on-prem | Local model (Ollama → vLLM) + n8n self-hosted |
| Prototype to validate an idea fast | Flowise / Langflow / Dify |
| Long-running, complex multi-agent | Code + LangGraph (Ch 10) |