Raspberry Pi AI
AI on Raspberry Pi (4, 5, 500). CPU-only inference + small models, often with Coral or Hailo accelerators.
Setup walkthrough
- Buy a Raspberry Pi 5 (8 GB, $80) + 32 GB microSD ($10) + power supply (~$15).
- Flash Raspberry Pi OS (64-bit, Bookworm) via Raspberry Pi Imager.
- Install Ollama for ARM64:
curl -fsSL https://ollama.com/install.sh | sh. ollama pull llama3.2:1b(700 MB — runs at 5-10 tok/s on Pi 5 CPU) orollama pull tinyllama(600 MB, 8-15 tok/s).ollama run llama3.2:1b "Explain how a transistor works in simple terms."— first response in 10-30 seconds.- For vision:
pip install ultralytics→ YOLO11n runs at 3-5 fps on Pi 5 CPU (no GPU). With a Hailo-8L accelerator (~$70, PCIe HAT), YOLO runs at 30+ fps. - For audio: Silero VAD + Whisper tiny on Pi 5 CPU — VAD in real-time, Whisper transcodes at ~0.5× real-time.
- Use cases: home automation AI, offline voice assistant, DIY security camera, edge data logger with anomaly detection.
The cheap setup
Raspberry Pi 5 8 GB (~$80) is the AI entry point for makers. Runs Llama 3.2 1B at 5-10 tok/s, YOLO11n at 3-5 fps, Whisper tiny at 0.5× real-time — all on CPU at 15W. For a home AI project (voice-controlled automation, person-detecting doorbell, plant health monitor): total hardware $100-150 (Pi + camera + sensors). The Pi 5's BCM2712 CPU has ARMv8.2 vector extensions that accelerate quantized inference ~2-3× vs. Pi 4. For $150, you get a fully functional AI device that runs 24/7 on $5/year of electricity. Pi AI is for learning, prototyping, and single-purpose always-on devices.
The serious setup
Raspberry Pi 5 8 GB ($80) + Hailo-8L AI accelerator HAT ($70) = $150 for real-time AI. The Hailo-8L delivers 13 TOPS at 5W — YOLO11n at 30+ fps, ResNet-50 at 100+ fps, SSD at 30+ fps. For a production edge device (retail footfall counter, factory defect detector, agricultural crop monitor): Pi 5 + Hailo-8L + industrial camera = ~$250 per node. For LLM-capable edge: Pi 5 runs 1B-3B models on CPU acceptably for non-real-time use. For real-time LLM inference at the edge, upgrade to Jetson Orin Nano ($500, see /hardware/jetson-ai). Pi AI is for when $/Watt matters more than raw performance. A fleet of 100 Pi+Hailo nodes ($25K) does 100 concurrent real-time vision streams at 1,500W total — equivalent to ~2 RTX 4090s in terms of concurrent stream count (but not per-stream quality).
Common beginner mistake
The mistake: Buying a Raspberry Pi 5 4 GB model (instead of 8 GB), installing Ollama, pulling a 7B model, and wondering why the Pi crashes or runs at 0.1 tok/s. Why it fails: The Pi 5 shares RAM between CPU and GPU. A 7B Q4 model needs ~4.5 GB for weights alone. On a 4 GB Pi, with 1 GB for the OS, there's 3 GB available — the model doesn't fit. The Pi starts swapping to the SD card (100× slower than RAM), dropping inference to effectively zero. The fix: Buy the 8 GB Pi 5 for AI. Run models sized for the available RAM: 1B-3B models on 8 GB Pi (3B Q4 = ~2 GB weights + 2 GB OS/overhead = 4 GB, fits). For 7B models, you need a device with 12+ GB RAM (Jetson Orin, x86 mini PC). Match model size to available RAM. On a Pi with 8 GB, usable model max is ~3B parameters at Q4 quant. The Pi is not a desktop GPU — it's a low-power edge device. Size models accordingly.
Recommended setup for raspberry pi ai
Browse all tools for runtimes that fit this workload.
Reality check
Local AI workloads have real hardware constraints that vary by task type. VRAM ceiling decides what model fits; bandwidth decides decode speed; compute decides prefill speed. Pick the GPU tier that fits your actual workload, not the spec sheet.
Common mistakes
- Buying for spec-sheet VRAM without modeling KV cache + activation overhead
- Underestimating quantization quality loss below Q4
- Skipping flash-attention support (real perf gap on long context)
- Ignoring sustained-load thermals (laptops thermal-throttle within 30 min)
What breaks first
The errors most operators hit when running raspberry pi ai locally. Each links to a diagnose+fix walkthrough.
Before you buy
Verify your specific hardware can handle raspberry pi ai before committing money.
Edge and embedded AI lives outside the desktop GPU world, but the iGPU and eGPU buyer questions still apply for the next tier up.