TECHNOLOGY

lm-Meter: mobile latency traces, profiling overhead and release boundaries

In this article
THE QUICK TAKE

Low overhead is a result under specific mobile conditions; released backend support and energy measurement require separate evidence.

What the profiler measures

lm-Meter is a research profiler implemented around MLC and TVM for on-device language models. It adds native-runtime timing around embedding, prefill, decode, softmax, probability transfer and sampling. Kernel-level records use OpenCL event timestamps to distinguish queuing, submission, actual execution start and completion.

This separation helps explain a slow request more precisely than a single application timer. Time waiting for a device command to start is not the same as time executing the kernel. Equally, a native phase trace does not automatically include model download, application initialization, tokenization or text display. The benchmark-method guide explains why those timing boundaries should remain explicit.

Accuracy is tested against a defined reference

The paper evaluates Google Pixel 8 Pro, Pixel 7 and Pixel 6 configurations, selecting different combinations for individual experiments. Phase timing is compared with Android GPU Inspector traces using added Perfetto annotations. For kernel timing, the authors estimate a reference by duplicating a target kernel and measuring the extra phase duration.

They use 50 duplicates for kernels expected to exceed 1 ms and 1000 for shorter kernels. Frequencies are fixed and nonessential applications terminated for that validation. This is a controlled reference procedure, rather than a direct independent timer embedded inside every proprietary GPU kernel.

The distinction matters for short operations. An excellent end-to-end agreement can coexist with a larger relative timing error in a tiny sampling phase. The paper’s timing-accuracy percentage is based on relative error against its reference; it is not answer accuracy or the fraction of kernels guaranteed correct on every supported phone.

The overhead headline has a workload boundary

The official repository publishes a throughput comparison against a no-profiling baseline under Performance, Conservative and Powersave CPU governors. In Powersave, prefill drops from 0.658 to 0.641 tokens per second, reported as 2.58%; decode drops from 2.703 to 2.676, reported as 0.99%.

These are measured throughput reductions for the evaluated configuration, not an overhead ceiling covering every model, context, driver or future backend. The study fixes prompts, controls sampling and generally averages repeated runs. Its kernel example uses Gemma-2-2B-it with group-wise 4-bit weights and 16-bit activations. That evidence should not be silently extended to unrelated quantization formats or a desktop GPU.

The software-stack guide explains why the profiler, compiled model, driver and runtime revision all belong in a reproducible record. Instrumentation changes can alter the behavior being investigated, so baseline and profiled runs need matching settings.

Proposed extensions are not released measurements

The repository’s support matrix marks MLC LLM on Android OpenCL as released. It marks iOS, Jetson and llama.cpp combinations as coming soon in the inspected revision. Portable timing ideas therefore do not establish a working implementation for every platform named in the design discussion.

The paper explicitly presents energy integration and adaptive runtime control as future extensions. Existing latency traces can help align an external meter, but do not themselves provide joules per request or an implemented policy that saves battery energy. The energy-window guide describes the additional alignment evidence that such a claim needs.

For a concrete mobile investigation, the supported use is to locate measured phase and kernel bottlenecks under the released stack, then test a proposed optimization separately. The paper does not establish a universal mobile bottleneck or a completed automatic optimizer.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles