GoogleLu Wang, Terry Heo, Naushir Patuck, José María CasanovaTutorial
Mastering Edge AI on Raspberry Pi with LiteRT and Gemma
Summary
Running edge AI on a Raspberry Pi 5 is presented as a way to build autonomous, low-latency systems that operate offline, with Reachy Mini serving as the demonstration. The setup combines LiteRT, LiteRT-LM, Gemma models, and LiteRT’s WebGPU (Vulkan) backend via ML Drift, splitting workloads between the CPU and VideoCore VII GPU. On CPU, Gemma 4 E2B reportedly reaches 99 tokens/sec prefill, 9 tokens/sec decode, and 1,432 MB peak memory; its tokenizer supports about 27.3 characters/sec in the voice demo. The pipeline runs YOLO object detection on the GPU, Moonshine speech recognition, Gemma reasoning, and text-to-speech on the CPU, while LiteRT CLI covers conversion, quantization, benchmarking, inference, and model execution from the LiteRT Hugging Face Community.
Context
The goal is to enable autonomous robots and local AI agents that perceive and respond in real time on a compact Raspberry Pi, without cloud dependencies. The source emphasizes low latency, data privacy, resource constraints, and the need to distribute workloads efficiently across the Raspberry Pi 5 CPU and GPU.
Approach / What changed
The implementation uses LiteRT and LiteRT-LM to run Gemma models on Raspberry Pi 5, with CPU acceleration through XNNPACK and GPU inference through LiteRT’s WebGPU (Vulkan) backend via ML Drift. The Reachy Mini pipeline assigns YOLO detection to the GPU and speech recognition, Gemma reasoning, and text-to-speech to the CPU. LiteRT CLI provides conversion, quantization, benchmarking, inference, and model execution workflows.
Takeaways
Gemma 4 E2B on Raspberry Pi 5 is reported at 99 tokens/sec for prefill, 9 tokens/sec for decode, and 1,432 MB peak memory.
The Reachy Mini architecture runs Ultralytics YOLO object detection on the VideoCore VII GPU while Moonshine, Gemma reasoning, and text-to-speech run on the CPU.
LiteRT CLI consolidates model conversion, quantization, benchmarking, and inference, and can run compatible models from the LiteRT Hugging Face Community.
Source and freshness
- Source
- developers.googleblog.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.