arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.12844cs.LG
收藏

MELTing point:语言Transformer的移动端评估

MELTing point: Mobile Evaluation of Language Transformers

Brave Software(Brave软件公司);Imperial College London(伦敦帝国学院)

Stefanos Laskaridis, Kleomenis Katevas, Lorenzo Minto, Hamed Haddadi

AI总结:

研究创建了MELT基础设施,系统评估LLM在移动设备上的执行性能,揭示内存瓶颈、量化权衡及连续执行的挑战,展望NPU加速与框架-硬件协同设计的前景。

摘要:

Transformer彻底改变了机器学习领域,逐渐融入日常任务,为计算机赋予了“智能火花”。然而,其运行时需求阻碍了它们在移动设备上的广泛部署。随着个人设备日益强大,以及提示隐私成为日益紧迫的问题,我们探索了大型语言模型(LLM)在移动端执行的现状。为此,我们创建了自动化基础设施MELT,支持在设备上无头执行和基准测试LLM,支持不同模型、设备和框架,包括Android、iOS和Nvidia Jetson设备。我们评估了流行的指令微调LLM,并利用不同框架测量其端到端和细粒度性能,同时追踪内存和能耗需求。我们的分析是首个关于设备端LLM执行的系统研究,量化了各种最先进模型的性能、能效和准确性,展示了超大规模模型时代的设备端智能现状。结果显示,不同目标间的性能存在异质性,并证实LLM推理主要受内存限制。量化大幅降低内存需求并使执行可行,但带来不可忽视的精度损失。从能耗和热行为来看,LLM的连续执行仍难以实现,因两者均负面影响用户体验。最后,我们的经验表明,该生态系统仍处初期,算法和硬件突破可显著改变执行成本。我们预期NPU加速及框架-硬件协同设计将是高效独立执行的最大赌注,而针对边缘部署的卸载方案则为替代选择。

英文摘要:

Transformers have revolutionized the machine learning landscape, gradually making their way into everyday tasks and equipping our computers with "sparks of intelligence". However, their runtime requirements have prevented them from being broadly deployed on mobile. As personal devices become increasingly powerful and prompt privacy becomes an ever more pressing issue, we explore the current state of mobile execution of Large Language Models (LLMs). To achieve this, we have created our own automation infrastructure, MELT, which supports the headless execution and benchmarking of LLMs on device, supporting different models, devices and frameworks, including Android, iOS and Nvidia Jetson devices. We evaluate popular instruction fine-tuned LLMs and leverage different frameworks to measure their end-to-end and granular performance, tracing their memory and energy requirements along the way. Our analysis is the first systematic study of on-device LLM execution, quantifying performance, energy efficiency and accuracy across various state-of-the-art models and showcases the state of on-device intelligence in the era of hyperscale models. Results highlight the performance heterogeneity across targets and corroborates that LLM inference is largely memory-bound. Quantization drastically reduces memory requirements and renders execution viable, but at a non-negligible accuracy cost. Drawing from its energy footprint and thermal behavior, the continuous execution of LLMs remains elusive, as both factors negatively affect user experience. Last, our experience shows that the ecosystem is still in its infancy, and algorithmic as well as hardware breakthroughs can significantly shift the execution cost. We expect NPU acceleration, and framework-hardware co-design to be the biggest bet towards efficient standalone execution, with the alternative of offloading tailored towards edge deployments.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑