Accelerating Local LLMs on Resource-Constrained Edge Devices via Distributed Prompt Caching
Organizations: Dept. of ICS, Keio University, 3-14-1 Hiyoshi, Kohoku-ku, Yokohama, Japan
Abstract
Since local LLM inference on resource-constrained edge devices imposes a severe performance bottleneck, this paper proposes distributed prompt caching to enhance inference performance by cooperatively sharing intermediate processing states across multiple low-end edge devices. To fully utilize prompt similarity, our distributed caching mechanism also supports partial matching. As this approach introduces communication overhead associated with state sharing over a wireless network, we introduce a Bloom-filter-based data structure, referred to as a catalog, to determine whether a remote server possesses the desired internal states, thereby suppressing unnecessary communication. Experiments using the Gemma-3 270M model and the MMLU dataset on the Raspberry Pi Zero 2W platform demonstrate that the proposed approach reduces TTFT (Time to First Token) and TTLT (Time to Last Token) by 93.12% and 50.07% on average, respectively.
Figures & tables
| Server | Client (high-end) | Client (low-end) | |
| Platform | Raspberry Pi 5 Model B | Zero 2W | |
| CPU | ARM Cortex-A76 2.4GHz | Cortex-A53 1GHz | |
| DRAM | 16GB | 4GB | 512MB |
| OS | Raspberry Pi OS 13 (Trixie), 64-bit | ||
| TTFT | TTLT | |||||
|---|---|---|---|---|---|---|
| Case | 1 | 5 | [%] | 1 | 5 | [%] |
| Low-end | 12.59 | 0.87 | 6.88 | 23.74 | 11.86 | 49.93 |
| High-end | 2.70 | 2.89 | 107.08 | 2.77 | 2.97 | 107.10 |
| Token | Bloom | P-decode | Redis | R-decode | Sample | # tokens | State size [MB] | ||
| Low-end (Case 1) | 3.46 | 0.30 | 12580.85 | 2.42 | 11061.04 | 95.69 | 1 | 65.27 | 2.25 |
| Low-end (Case 5) | 3.46 | 0.19 | 0.00 | 861.92 | 10904.67 | 84.82 | 1 | 65.27 | 2.25 |
| High-end (Case 1) | 1.61 | 0.00 | 2688.17 | 7.84 | 72.59 | 1.45 | 5 | 334.11 | 9.94 |
| High-end (Case 5) | 1.56 | 0.00 | 0.00 | 2887.04 | 78.12 | 1.67 | 5 | 334.11 | 9.94 |
| Induced by rate false positives. | |||||||||
| # matched | % matched | T-decode | |
|---|---|---|---|
| Low-end (Case 1) | 1 | 0.25 | 27203.96 |
| Low-end (Case 2) | 10 | 2.47 | 26288.23 |
| Low-end (Case 3) | 57 | 14.07 | 24590.09 |
| Low-end (Case 4) | 340 | 83.95 | 13344.96 |
| Low-end (Case 5) | 405 | 100.00 | 11220.95 |
| High-end (Case 1) | 1 | 0.25 | 3361.88 |
LLM Inference Acceleration
LLM inference acceleration develops algorithms and systems that reduce language-model latency, memory use, and serving cost while preserving output quality.
See all 1,084 papers