# how to run a local AI on a Raspberry Pi — a pocket-sized offline chatbot for $80

Yes, you can run a real language model on a Raspberry Pi 5. It won't be fast, but for a tiny, private, always-on AI it's genuinely fun and useful. Here's how, and what to expect.

Updated Nov 18, 2026 · By Ari Vale

## Can you run AI on a Raspberry Pi?

Yes — a **Raspberry Pi 5 (8GB) runs real language models**, and it's a genuinely fun, useful project: a tiny, private, always-on AI that costs about $80 and sips power. Through [Ollama](https://aliteq.com/ollama-vs-lm-studio-which-should-you-use), a Pi 5 comfortably handles **1-3B parameter models**. **Gemma 3 1B** is the speed pick at **~18-22 tokens per second**; **Phi-3 Mini (3.8B)** is smarter but drops to ~4-7 tok/s. It won't rival a [GPU rig](https://aliteq.com/best-gpu-for-local-ai) — but for an offline assistant, a home-automation brain, or just tinkering, it's brilliant. Here's how, and the honest limits.

## The short version

- **Pi 5 (8GB) runs 1-3B models** via Ollama — usable for a small, offline, always-on AI.
- **Fastest: Gemma 3 1B** at ~18-22 tok/s. **Smartest: Phi-3 Mini (3.8B)** at ~4-7 tok/s.
- **Add an active cooler + a USB SSD** — the Pi throttles when hot, and an SSD helps with swap.
- **7B models technically load** at aggressive quantization but run <1 tok/s — not practical.
- **The Hailo AI HAT+ doesn't help LLMs** — it accelerates vision models, not language models.
- **Great for:** offline assistant, edge AI, home automation, learning — not for heavy work.

## The setup and what to run

Getting started is easy: install Raspberry Pi OS (64-bit) on a **Pi 5 with 8GB of RAM**, add an **active cooler** (the Pi throttles when it gets hot, which kills performance), ideally boot from a **USB SSD** (faster and helps with swap), then install [Ollama](https://ollama.com/) with its one-line installer and pull a small model. The **sweet spot is Gemma 3 1B for speed or Phi-3 Mini for quality** — Gemma 3 1B flies at ~18-22 tok/s (faster than you read), while Phi-3 Mini 3.8B is noticeably smarter but slower at ~4-7 tok/s. The 8GB Pi fits **3B models at Q4_K_M** with reasonable headroom; 7B models technically load at aggressive Q2 [quantization](https://aliteq.com/what-is-quantization-llm-explained) but generate below 1 token/second, which isn't practical for interactive use. One tip for power users: running **[llama.cpp](https://aliteq.com/n-cpu-moe-llama-cpp-what-it-actually-does) directly** is ~10-20% faster than Ollama on the Pi, mostly for prompt processing — worth it if you're optimizing. If you later move up to a graphics card, [Gemma 3's bigger sizes need from 8GB to 24GB of VRAM](https://aliteq.com/gemma-3-hardware-requirements).

```bash
# on a Raspberry Pi 5 (8GB) with active cooling + USB SSD:
curl -fsSL https://ollama.com/install.sh | sh   # install Ollama
ollama run gemma3:1b       # ~18-22 tok/s — the speed pick
# or: ollama run phi3        # smarter (3.8B), ~4-7 tok/s

# that's it — a private, offline AI on an $80 computer.
```

![A Raspberry Pi board and components](https://media.aliteq.com/media/2026/07/b23-pi-body.jpg)
A Pi 5 runs 1-3B models via Ollama — a tiny, private, always-on AI for about $80, if you add cooling. · Unsplash

## The honest limits (and the Hailo myth)

Let me set expectations honestly. A Pi 5 is **not** a replacement for a [real local-AI machine](https://aliteq.com/best-gpu-for-local-ai) — the models it can run (1-3B) are far less capable than the 8-32B models a [GPU](https://aliteq.com/best-gpu-for-local-ai) or [Mac](https://aliteq.com/best-mac-for-local-ai) runs, and even those small models generate slowly compared to a graphics card. So don't expect GPT-4-level answers or fast coding help; expect a capable-but-limited little assistant. One common misconception worth clearing up: the **Hailo AI HAT+** accelerator, often bundled with Pi AI kits, **runs compiled [vision models](https://aliteq.com/how-to-run-a-local-vision-model), not LLMs** — you can't load Llama onto it, and Ollama runs on the Pi's CPU without benefiting from it. So the Hailo is great for camera/vision projects but does nothing for chatbots. Where the Pi genuinely shines is as an **offline, always-on, low-power AI node**: a private assistant, a [local agent](https://aliteq.com/run-openclaw-hermes-local-model-ollama) for home automation, an edge device, or simply a fantastic way to learn how local AI works hands-on. For $80 and a few watts, that's a lot of fun.

This guide is part of our [how to run a local AI model on your own PC in 2026 — a genuinely simple beginner's guide](https://aliteq.com/how-to-run-a-local-llm-on-your-pc-beginners-guide) guide. Related guides: [how to turn your local AI into an API — a private](https://aliteq.com/how-to-run-local-ai-as-an-api-server), [how to run local AI in Docker — a clean, portable, reproducible setup in minutes](https://aliteq.com/how-to-run-local-ai-in-docker), [can you run your own AI without buying a graphics card? (yes — here's how)](https://aliteq.com/can-you-run-ai-without-a-gpu).

## Quick answers

**Q: Can a Raspberry Pi run a language model?**

A: Yes — a Raspberry Pi 5 with 8GB of RAM runs 1-3B parameter models through Ollama at usable speeds for a small, offline AI. Gemma 3 1B runs at roughly 18-22 tokens per second (faster than you read), and Phi-3 Mini (3.8B) is smarter but slower at ~4-7 tok/s. You'll want an active cooler (the Pi throttles when hot) and ideally a USB SSD. 7B models technically load with aggressive quantization but run below 1 token/second, which isn't practical. It's great for a tiny private assistant, not heavy work.

**Q: What is the best AI model to run on a Raspberry Pi?**

A: Gemma 3 1B is the best for speed on a Raspberry Pi 5, running at ~18-22 tokens per second — fast and responsive for a tiny model. Phi-3 Mini (3.8B) is the best for quality, noticeably smarter but slower at ~4-7 tok/s, and it fits the 8GB Pi at Q4_K_M quantization. Both run through Ollama. Choose Gemma 3 1B if you want snappy responses and Phi-3 Mini if you want better answers and can accept slower generation. Stick to 1-3B models; larger ones are too slow to be practical on a Pi.

**Q: Does the Hailo AI HAT help run LLMs on a Raspberry Pi?**

A: No. The Hailo AI HAT+ accelerator runs compiled vision models (like object detection), not large language models — you can't load Llama or other LLMs onto it. When you run a local chatbot on a Pi, Ollama uses the Pi's CPU and gets no benefit from the Hailo accelerator. The Hailo is excellent for camera and computer-vision projects, but for running LLMs, it does nothing. So don't buy a Hailo HAT expecting it to speed up your Raspberry Pi chatbot; the LLM runs on the CPU regardless.

A Raspberry Pi 5 makes a fun, tiny, private AI — 1-3B models via Ollama, great for edge and learning, not heavy work. For real capability you want a [GPU](https://aliteq.com/best-gpu-for-local-ai) or [Mac](https://aliteq.com/best-mac-for-local-ai); to understand the small-model tradeoffs, see [how much VRAM you need](https://aliteq.com/how-much-vram-do-you-need-to-run-ai-models). Source: [TinyWeights](https://tinyweights.dev/posts/run-llms-raspberry-pi-5/).

## Sources

- [TinyWeights — LLMs on Raspberry Pi 5](https://tinyweights.dev/posts/run-llms-raspberry-pi-5/)
- [Raspberry Pi](https://www.raspberrypi.com/)

---

Canonical: https://aliteq.com/how-to-run-ai-on-a-raspberry-pi
