优化手机端大模型推理能耗与速度,统一调控三大硬件频率
Dissecting the Impact of Mobile DVFS Governors on LLM Inference Performance and Energy Efficiency
- 设计统一能源感知调度器,协调CPU/GPU/内存频率
- 相比原生调度,减少7%-17%首令牌延迟,25%-37%每词延迟
- 适合移动大模型部署、能效优化研究者参考
大型语言模型(LLMs)正被广泛部署于数十亿台移动设备上。然而,资源受限的移动端运行大模型面临计算、内存与能耗的高需求挑战。当前移动端大模型框架依赖三个耗能组件——CPU、GPU和内存,尽管主要使用GPU模型,但现代设备中针对这三者的动态电压频率调节(DVFS)策略独立运行且互不协同。本文首先测量了主流大模型框架在手机上的能效表现,发现三类独立调频策略导致预填充与解码延迟比最优频率组合高出最多40.4%,而能耗相同。其次,深入分析三类调度器间的相互作用缺失如何引发性能瓶颈。基于此,提出FUSE:一种统一的能源感知调度器,用于优化移动端大模型推理能效。在ShareGPT数据集上的评估显示,FUSE在保持每令牌能耗不变的前提下,平均将首令牌延迟降低7.0%-16.9%,每输出令牌延迟降低25.4%-36.8%。
原文摘要 · Abstract (English)
Large Language Models (LLMs) are increasingly being integrated into various applications and services running on billions of mobile devices. However, deploying LLMs on resource-limited mobile devices faces a significant challenge due to their high demand for computation, memory, and ultimately energy. While current LLM frameworks for mobile use three power-hungry components-CPU, GPU, and Memory-even when running primarily-GPU LLM models, optimized DVFS governors for CPU, GPU, and memory featured in modern mobile devices operate independently and are oblivious of each other. Motivated by the above observation, in this work, we first measure the energy-efficiency of a SOTA LLM framework consisting of various LLM models on mobile phones which showed the triplet mobile governors result in up to 40.4% longer prefilling and decoding latency compared to optimal combinations of CPU, GPU, and memory frequencies with the same energy consumption for sampled prefill and decode lengths. Second, we conduct an in-depth measurement study to uncover how the intricate interplay (or lack of) among the mobile governors cause the above inefficiency in LLM inference. Finally, based on these insights, we design FUSE - a unified energy-aware governor for optimizing the energy efficiency of LLM inference on mobile devices. Our evaluation using a ShareGPT dataset shows FUSE reduces the time-to-first-token and time-per-output-token latencies by 7.0%-16.9% and 25.4%-36.8% on average with the same energy-per-token for various mobile LLM models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。