arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2409.09071cs.DCcs.AI
收藏

弹性端侧大语言模型服务

Elastic On-Device LLM Service

Peking University, Beijing, China(北京大学);Beijing University of Posts(北京邮电大学);Beiyou Shenzhen Institute, Shenzhen, China(贝友深圳研究所)

Wangsong Yin, Rongjie Yi, Daliang Xu, Gang Huang, Mengwei Xu, Xuanzhe Liu

AI总结:

针对端侧LLM无法适配多样化延迟SLO的问题,提出含神经元重排序与双头小模型的弹性端侧LLM服务,在手机上实现后准确率优于7个基线,切换开销低。

摘要:

端侧大语言模型(LLM)正在变革移动人工智能领域,推动了无隐私顾虑的UI自动化等应用发展。如今的通用做法是部署单个功能强大的LLM作为通用任务求解器,处理多种请求。我们发现该范式存在一个关键系统挑战:当前的LLM缺乏弹性,无法满足具有多样化推理延迟服务等级目标(SLO)的请求。为解决这一问题,我们提出了\textbf{Elastic On-Device LLM Service},这是一种端侧LLM服务,可对完整LLM的模型维度和提示词维度实现弹性化。该服务包含两项核心技术:(1)一次性神经元重排序方法,利用Transformer模型内在的排列一致性,生成高质量的弹性子模型,且运行时切换开销极低;(2)双头小型语言模型,可高效精准地优化提示词,并协调模型与提示词之间的弹性化过程。我们在多款商用现货(COTS)智能手机上实现了该弹性端侧LLM服务,并在独立的自然语言处理(NLP)/移动智能体数据集以及端到端合成轨迹上对其进行评估。在多样化的SLO场景下,该服务的绝对准确率优于7个强基线模型,最高提升14.83%,平均提升10.45%,同时首令牌生成时间(TTFT)切换开销低于1%,内存消耗与基线相当,离线GPU训练时长不足100小时。

英文摘要:

On-device Large Language Models (LLMs) are transforming mobile AI, catalyzing applications like UI automation without privacy concerns. Nowadays the common practice is to deploy a single yet powerful LLM as a general task solver for multiple requests. We identify a key system challenge in this paradigm: current LLMs lack the elasticity to serve requests that have diversified Service-Level Objectives (SLOs) on inference latency. To tackle this, we present \sys, an on-device LLM service that elasticizes both the model and the prompt dimension of a full LLM. It incorporates (1) a one-shot neuron-reordering method, which leverages the intrinsic permutation consistency in transformer models to generate high-quality elasticized sub-models with minimal runtime switching overhead; (2) a dual-head tiny language model, which efficiently and effectively refines the prompt and orchestrates the elastification between model and prompt. We implement such an elastic on-device LLM service on multiple COTS smartphones, and evaluate \sys on both standalone NLP/mobile-agent datasets and end-to-end synthesized traces. On diverse SLOs, \sys outperforms 7 strong baselines in (absolute) accuracy by up to 14.83\% and 10.45\% on average, with <1\% TTFT switching overhead, on-par memory consumption and <100 offline GPU hours.

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

↑