Search "raspberry pi llm gpu" and you'll find guides recommending an RX 6600 XT or an Instinct MI210 for your Pi. None of that hardware is designed to work with a Raspberry Pi, and the benchmark numbers attached to those claims don't come from any public, reproducible source. This guide skips the fantasy hardware and covers what actually accelerates local LLM inference on a Raspberry Pi in 2026: CPU inference through llama.cpp/Ollama, and purpose-built NPU accelerators like the Raspberry Pi AI HAT+.
Why a desktop GPU doesn't belong on a Raspberry Pi
The Raspberry Pi 5 exposes a single-lane PCIe 2.0 connector — the same interface the official M.2 HAT uses for NVMe storage — capped at roughly 500MB/s of bandwidth according to Raspberry Pi's official Pi 5 specifications. A modern discrete GPU expects 16 lanes of PCIe on a desktop board; a single Gen2 lane is a fraction of that. Hobbyists have wired discrete cards to the Pi 5's PCIe FPC connector through risers as a proof of concept, but that's a bandwidth-starved demo, not a usable inference pipeline. On top of the electrical bottleneck, mainline ARM Linux doesn't carry mature vendor compute drivers (ROCm, CUDA) for most desktop GPU silicon, so even a successfully wired card typically falls back to basic display output rather than compute acceleration.
If you want GPU-class throughput for local LLMs, the honest answer is a small x86 box or a workstation GPU, not a Pi with an adapter. Our Raspberry Pi 4 8GB vs Pi 5 vs mini-PC comparison breaks down exactly where that crossover happens.
Path 1: CPU inference with llama.cpp and Ollama
The Pi's quad-core Arm Cortex-A76 CPU (in the Pi 5) is the actual inference engine most local-LLM setups on Pi rely on. llama.cpp runs quantized GGUF models directly on Arm CPUs with no GPU dependency at all, and Ollama wraps that same engine behind a simpler CLI and model-pull workflow with official Linux ARM64 builds. This is the path most Pi-based local-LLM projects actually use — including the setup in our self-hosted AI home lab build on a Raspberry Pi 4 8GB.
Basic install steps
- Flash Raspberry Pi OS (64-bit) and boot headless or with a display.
- Update packages:
sudo apt update && sudo apt full-upgrade -y. - Install Ollama with its official Linux install script, which auto-detects the ARM64 architecture.
- Pull a small quantized model sized for available RAM (see the table below).
- Run inference from the CLI or point a local client at Ollama's REST API on
localhost:11434.
llama.cpp can also be built from source for more control over quantization level and thread count — useful if you're tuning for a specific model size or context length rather than taking Ollama's defaults.
What model size actually fits
| Pi model | RAM | Realistic quantized model range | Notes |
|---|---|---|---|
| Pi 4 | 4GB | ~1B params (4-bit) | Tight headroom; short context only |
| Pi 4 | 8GB | 1B-3B params (4-bit) | Workable for chat-scale prompts |
| Pi 5 | 8GB | 1B-3B params (4-bit), faster per-token | Cortex-A76 gives a meaningful speed edge over Pi 4's A72 cores |
| Compute Module 4 | 4-8GB | Same ceiling as equivalent Pi 4 | Depends on carrier board RAM config |
Exact tokens-per-second varies by quantization level, context length, and what else is running on the board — there's no single authoritative number to quote here, so treat any specific throughput claim you see elsewhere with skepticism unless it links to a reproducible source. For power planning around a Pi 5 doing sustained inference, see our Raspberry Pi 5 power supply guide.
Path 2: Dedicated NPU accelerators
Raspberry Pi's own accelerator hardware is built around Hailo silicon, not a general-purpose GPU. The Raspberry Pi AI HAT+ ships in a Hailo-8 configuration rated at 26 TOPS or a Hailo-8L configuration rated at 13 TOPS, connecting through the same PCIe FPC connector used for NVMe. The older Raspberry Pi AI Kit uses the 13 TOPS Hailo-8L. Separately, Google's Coral USB Accelerator is an Edge TPU rated at 4 TOPS (int8) that plugs in over USB.
| Accelerator | Interface | Rated throughput | Primary use case |
|---|---|---|---|
| Hailo-8 (AI HAT+) | PCIe FPC | 26 TOPS | Vision inference (detection, pose, classification) |
| Hailo-8L (AI HAT+ / AI Kit) | PCIe FPC | 13 TOPS | Lighter vision inference |
| Coral Edge TPU (USB Accelerator) | USB | 4 TOPS (int8) | TensorFlow Lite vision models |
The important caveat: all three of these are marketed and documented for vision workloads, not language models. Hailo's runtime and Coral's Edge TPU toolchain don't have mainstream llama.cpp or Ollama backends, so "accelerating an LLM" with this hardware today means custom model conversion rather than a drop-in install. If your project is vision-plus-language (e.g., a camera that also summarizes what it sees), pairing a Coral or Hailo accelerator for the vision stage with CPU-based llama.cpp for the language stage is the more realistic architecture than expecting either NPU to run the LLM itself.
Power and cooling for a Pi doing sustained inference
Sustained CPU inference keeps all four cores busy, which raises thermals well above idle or light-desktop use. A few practical points:
- Use an active-cooled case or official Raspberry Pi Active Cooler on a Pi 5 running inference for more than a few minutes at a stretch — passive cases will throttle under sustained CPU load.
- Power the board from a supply that meets the Pi 5's official current rating; undersized USB-C supplies cause instability under load spikes, not just failure to boot. Our Pi 5 power supply guide covers what actually meets spec versus what's underrated.
- If you're adding a Hailo or Coral accelerator, check its added draw against your supply's headroom — accelerator boards add continuous load on top of the Pi's own consumption, not just a brief spike.
Common setup issues
Model runs but responses are painfully slow. Drop to a smaller parameter count or a more aggressive quantization (Q4 instead of Q8) before assuming the hardware is broken — this is usually a sizing problem, not a bug.
Ollama or llama.cpp won't detect the accelerator. Neither project ships a Hailo or Coral backend out of the box as of this writing — if a guide claims GPU/NPU passthrough for either tool on Pi, verify against the project's own documentation before trusting it.
System becomes unresponsive during inference. Usually RAM exhaustion causing swap to SD card or NVMe. Check free -h during a run; if swap is active, drop model size rather than let the board thrash.
PCIe accelerator not recognized after boot. Confirm the PCIe interface is enabled in raspi-config (Advanced Options → PCIe Speed) and that the ribbon/FPC cable seating matches the accelerator vendor's install guide exactly — a half-seated connector is the most common cause.
For Pi 5 owners looking at other on-device workloads beyond LLMs — 3D printing control, home automation, media serving — our Raspberry Pi 5 projects roundup, Klipper on Raspberry Pi guide, and Jellyfin transcode limits on a Pi 4 8GB all cover where the board's CPU ceiling shows up in practice. If you're building out a Pi-based project list for a classroom or student lab, see Raspberry Pi projects for students.
Citations and sources
- Raspberry Pi 5 official specifications
- Raspberry Pi AI HAT+ product page
- Raspberry Pi AI Kit product page
- Coral USB Accelerator product page
- llama.cpp project repository
- Ollama Linux download and install
This piece is editorial synthesis based on publicly available information. No independent first-party benchmarking is reported.
