lm-Meter: Unveiling Runtime Inference Latency for On-Device Language Models

Haoxin Wang, Xiaolong Tu, Hongyu Ke, Huirong Chai, Dawei Chen +1 more
10/7/2025
cs.LGcs.PF

Official code: amai-gsu/LM-Meter (3 stars, MIT, last commit 2025-10-12).

Abstract

Large Language Models (LLMs) are increasingly integrated into everyday applications, but their prevalent cloud-based deployment raises growing concerns around data privacy and long-term sustainability. Running LLMs locally on mobile and edge devices (on-device LLMs) offers the promise of enhanced privacy, reliability, and reduced communication costs. However, realizing this vision remains challenging due to substantial memory and compute demands, as well as limited visibility into performance-efficiency trade-offs on resource-constrained hardware. We propose lm-Meter, the first lightweight, online latency profiler tailored for on-device LLM inference. lm-Meter captures fine-grained, real-time latency at both phase (e.g., embedding, prefill, decode, softmax, sampling) and kernel levels without auxiliary devices. We implement lm-Meter on commercial mobile platforms and demonstrate its high profiling accuracy with minimal system overhead, e.g., only 2.58% throughput reduction in prefill and 0.99% in decode under the most constrained Powersave governor. Leveraging lm-Meter, we conduct comprehensive empirical studies revealing phase- and kernel-level bottlenecks in on-device LLM inference, quantifying accuracy-efficiency trade-offs, and identifying systematic optimization opportunities. lm-Meter provides unprecedented visibility into the runtime behavior of LLMs on constrained platforms, laying the foundation for informed optimization and accelerating the democratization of on-device LLM systems. Code and tutorials are available at https://github.com/amai-gsu/LM-Meter.

View on arXivView PDF

Code Implementations(1)

amai-gsu/LM-MeterOfficial100%
MIT

Official code repo of SEC'25 paper: lm-Meter: Unveiling Runtime Inference Latency for On-Device Language Models

31Oct 4, 20251 years agoMIT
kernelslarge-language-modelson-device-llmsprofiling

Similar Papers

Cite this paper

@article{wang2025lmmeter,
  title  = {lm-Meter: Unveiling Runtime Inference Latency for On-Device Language Models},
  author = {Haoxin Wang and Xiaolong Tu and Hongyu Ke and Huirong Chai and Dawei Chen and Kyungtae Han},
  year   = {2025},
  eprint = {2510.06126},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.06126v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.06126.svg)](https://codeofpaper.com/paper/2510.06126)

Discussion