TL;DR
This paper introduces ELIB (Edge LLM Inference Benchmarking), a lightweight framework designed to evaluate Large Language Model (LLM) performance on resource-constrained edge devices. To better capture the unique hardware bottlenecks of edge computing, the authors propose a novel metric called Model Bandwidth Utilization (MBU), revealing critical trade-offs between hardware acceleration, thread configurations, and model accuracy.
What Problem Does This Paper Address? Local LLMs Meet Edge Bottlenecks
Running LLMs on cloud servers raises significant data privacy, security, and latency concerns for applications like mobile assistants or self-driving cars. Shifting inference to edge devices (laptops, smartphones, and IoT boards) solves these issues but introduces a massive engineering challenge: edge hardware is incredibly diverse and strictly limited by power and memory.
Traditional benchmarking metrics like FLOPS or raw throughput are tailored for compute-bound cloud GPUs. However, on the edge, LLM decoding is primarily a memory-bandwidth-bound problem—the system spends more time moving weights from RAM to the processor than it does actually computing. There is currently a lack of standardized, lightweight tools and metrics to evaluate how efficiently edge devices utilize their memory architectures during local LLM inference.
Methods: The ELIB Framework and the MBU Metric
To bridge this gap, the authors developed ELIB, an automated benchmarking runtime framework built on top of the pure C++ library llama.cpp. ELIB simplifies deployment across heterogeneous edge environments using a clean Model-Graph-Kernel architecture:
The core innovation of the paper is the introduction of Model Bandwidth Utilization (MBU). MBU quantifies how close an edge device comes to maximizing its theoretical memory performance during inference:
$$\text{MBU} = \frac{\text{Achieved Memory Bandwidth}}{\text{Peak Memory Bandwidth}}$$
Where the achieved bandwidth is calculated as:
$$\text{Achieved Memory Bandwidth} = \frac{\text{Total Model Parameter Size} + \text{KV Cache Size}}{\text{Time Per Output Token (TPOT)}}$$
An MBU approaching 100% indicates that the inference system is perfectly saturating the available hardware memory bus.
Datasets and Evaluation Setup
The authors evaluated their framework using the LLaMA-7B model across five distinct GGML quantization levels (q4_0, q4_1, q5_0, q5_1, and q8_0).
To evaluate inference accuracy under these configurations, they measured the model's perplexity score on the standard Wikitext-2 dataset. Lower perplexity indicates better text-prediction accuracy.
The framework was benchmarked across three representative edge platforms:
- IoT: NanoPI (RK3588 chip, Mali-G610 GPU, 16GB LPDDR4x)
- Mobile: Xiaomi Redmi Note 12 Turbo (Snapdragon 778, Adreno 725 GPU, 16GB LPDDR4)
- PC: MacBook Air 2022 (Apple M2 chip, 10-core unified GPU, 16GB LPDDR5)
Key Insights and Ideas
The benchmarking process yielded several surprising "aha" moments for edge deployment engineers:
- The Thread Scaling Paradox: Counterintuitively, configuring the edge CPUs to use 4 threads slightly outperformed 8 threads in FLOPS performance across several tests. This happens because doubling the threads increases parallelization overhead and intensifies memory bus contention, worsening the memory bottleneck.
- The OpenCL Accuracy Trap: While offloading computations to the GPU via OpenCL on the Xiaomi phone and NanoPI boosted throughput, it caused a catastrophic drop in accuracy. Perplexity scores spiked by nearly 10x (jumping from ~4–8 on CPU to ~54–68 on GPU). This degradation highlights severe data precision and parallelization bugs within mobile vendor OpenCL implementations.
- Unified Memory Wins: Apple’s unified memory architecture paired with the Metal API achieved both the highest throughput and the highest MBU (up to 87%), proving that tightly integrated memory-compute hardware is highly advantageous for edge LLMs.
Key Results
The quantitative results highlight the stark differences between edge platforms and software backends:
- Throughput vs. Quantization: Lower-bit quantization significantly accelerated token generation. For example, on the NanoPI,
q4_0quantization achieved a token throughput 1.38x higher on CPU and 1.64x higher on GPU compared toq8_0. - Hardware Performance Peaks: The MacBook Air (M2 GPU via Metal) dominated the benchmarks, delivering 19.72 tokens/second with an MBU of 0.82 under
q4_0. In comparison, the Xiaomi phone maxed out at 5.75 tokens/second (MBU 0.58) and the NanoPI reached 3.97 tokens/second (MBU 0.49) using GPU acceleration. - The Latency Cost of Accuracy: Moving from
q4_0toq8_0improved accuracy (keeping perplexity low) but dramatically increased the Time to First Token (TTFT) and Time to Load Model (TTLM) due to the larger file sizes traveling across the limited edge memory pipelines.
Limitations and Future Work
While ELIB provides a solid foundation for edge benchmarking, the current study focuses exclusively on the LLaMA-7B architecture. The authors acknowledge that different model families (e.g., Falcon, Mistral) or alternative quantization techniques (like GPTQ or AWQ) might yield different hardware bottlenecks.
Future iterations of ELIB aim to expand support for a broader variety of open-source LLMs, integrate newer quantization methods, and target a wider array of edge AI accelerators (like NPUs).
Summary updated