Edge Devices Unleashed: LLMs on Pis and Laptops
Memory optimizations have significantly lowered hardware barriers, enabling Llama 7B to run on a 4GB RAM Raspberry Pi (at 0.1 tokens/s) and achieve ~16 tokens/s on an M2 MacBook Pro, effectively democratizing advanced AI for a wide array of consumer and low-resource devices.
The top 3
- Top LLM Speeds on Raspberry Pi 5: Quantized 2B models like Gemma 2B can achieve 7-12 tokens/sec on a Raspberry Pi 5, while 7B models such as Mistral and Llama (quantized) typically run between 5-10 tokens/sec, enabling usable local inference.
- Lowest Power Footprint for Edge LLMs: For energy-efficient local LLM inference, the Raspberry Pi 5 typically draws 5-8 watts, with GGUF (llama.cpp's format) showing the highest efficiency at 0.42 Joules/token. Dedicated NPUs or FPGAs can achieve ultra-low power consumption, under 1 watt for sub-1B models.
- Quantization's Edge Device Performance Boost: Quantization drastically reduces LLM memory footprint and speeds up inference on edge devices: a 7B parameter model can shrink from 28GB (FP32) to 3.5GB (INT4), an 87.5% memory reduction, while boosting performance and energy efficiency by up to 79%.
Sources
Open the full topic