Deploying large language models (LLMs) on mobile devices is an emerging trend to enable data privacy and offline accessibility of LLM applications. Modern mobile neural processing units (NPUs) make such deployment increasingly feasible. However, existing mobile LLM inference frameworks suffer from high start-up latency due to their inevitable cold starts, i.e., launching LLM inferences when the model is not hosted in device memory. In this paper, we identify the key bottleneck of mobile LLM cold starts as the waste of flash bandwidth on unimportant model parameters. We design EdgeFlow, a mobile LLM inference framework that mitigates the cold start issue by adaptively adjusting the precisions of LLM parameters. Specifically, EdgeFlow leverages 1) an NPU-aware adaptive quantization algorithm that assigns different precisions to weights in a finer granularity according to their importance and NPU constraints, 2) an SIMD-friendly packing format that accelerates the transformation of various-precision weights into fixed-sized NPU-native data types, and 3) a synergistic granular pipeline that coordinates CPU and NPU computation in a fine-grained and dynamic manner. Experimental results show that EdgeFlow reduces cold-start latency by up to 4.07x compared with three state-of-the-art mobile LLM inference frameworks, i.e., llama.cpp, MNN, and llm.npu, under comparable model accuracy.


翻译:在移动设备上部署大语言模型(LLMs)是保障LLM应用数据隐私和离线可访问性的新兴趋势。现代移动神经处理单元(NPU)使得此类部署日益可行。然而,现有移动LLM推理框架因不可避免的冷启动(即模型未驻留设备内存时启动LLM推理)而面临高启动延迟问题。本文指出,移动LLM冷启动的关键瓶颈在于闪存带宽浪费在不重要的模型参数上。我们设计了EdgeFlow——一种通过自适应调整LLM参数精度来缓解冷启动问题的移动LLM推理框架。具体而言,EdgeFlow利用了:1)一种NPU感知的自适应量化算法,可根据权重重要性和NPU约束以更细粒度分配不同精度;2)一种SIMD友好的打包格式,可加速将不同精度权重转换为固定大小的NPU原生数据类型;3)一种协同粒度流水线,以细粒度动态方式协调CPU与NPU计算。实验结果表明,在可比模型精度下,相较于llama.cpp、MNN和llm.npu三种最先进的移动LLM推理框架,EdgeFlow将冷启动延迟降低了最高4.07倍。

0
下载
关闭预览

相关内容

冷启动关注的是产品早期获取早期核心用户,以及如何运营的问题。
综述:面向移动端大语言模型的隐私与安全
专知会员服务
19+阅读 · 2025年9月7日
移动边缘智能与大型语言模型综述
专知会员服务
42+阅读 · 2024年7月31日
深度 | 推荐系统如何冷启动?
AI100
17+阅读 · 2019年4月7日
【边缘智能】边缘计算驱动的深度学习加速技术
产业智能官
20+阅读 · 2019年2月8日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
VIP会员
最新内容
网状网络及其在军事领域的运用
专知会员服务
3+阅读 · 今天6:18
无美国参与的欧洲战争方式(万字长文)
专知会员服务
3+阅读 · 今天5:54
《国防领域敏感性分析白皮书》
专知会员服务
3+阅读 · 今天3:42
综述 | 从问答到任务完成:Agent系统与Harness设计
Agentic RL:框架、实践与长程智能体训练
专知会员服务
3+阅读 · 6月24日
重新思考无人机时代的生存能力
专知会员服务
7+阅读 · 6月24日
装甲突击旅:现代战争思考、战斗与组织
专知会员服务
5+阅读 · 6月24日
在人工智能加速决策环境中拓展OODA循环
专知会员服务
7+阅读 · 6月24日
军事欺骗:供作战战术指挥官使用的工具
专知会员服务
6+阅读 · 6月24日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员