Abstract
On-device large language model inference is increasingly used in industrial NLP systems, but deployment decisions remain difficult to make from latency or throughput alone. These metrics show how fast a model runs, yet they hide the physical reason for that performance. Therefore, we present RooflineDiag, a Roofline-based framework that diagnoses on-device LLM inference by relating measured performance to the memory and compute limits of the target hardware. The framework estimates operational intensity for each deployment and uses it to identify whether the model is constrained by bandwidth, compute or poor hardware fit. It also summarizes memory pressure and optimization headroom through model--hardware diagnostic measures. Experiments across representative on-device settings show that workload shape often determines the bottleneck regime. They further explain why quantization is most useful for memory-bound generation, why deeper models can encounter an early memory wall and why KV-efficient attention improves hardware utilization. Our RooflineDiag turns raw deployment measurements into practical guidance for on-device model selection and optimization.