Enhancing On-Device LLM Inference with Historical Cloud-Based LLM Interactions

云计算 推论 计算机科学 数据科学 人工智能 操作系统
作者
Yucheng Ding,Chaoyue Niu,Fan Wu,Shaojie Tang,Chengfei Lyu,Guihai Chen
标识
DOI:10.1145/3637528.3671679
摘要

Many billion-scale large language models (LLMs) have been released for resource-constraint mobile devices to provide local LLM inference service when cloud-based powerful LLMs are not available. However, the capabilities of current on-device LLMs still lag behind those of cloud-based LLMs, and how to effectively and efficiently enhance on-device LLM inference becomes a practical requirement. We thus propose to collect the user's historical interactions with the cloud-based LLM and build an external datastore on the mobile device for enhancement using nearest neighbors search. Nevertheless, the full datastore improves the quality of token generation at the unacceptable expense of much slower generation speed. To balance performance and efficiency, we propose to select an optimal subset of the full datastore within the given size limit, the optimization objective of which is proven to be submodular. We further design an offline algorithm, which selects the subset after the construction of the full datastore, as well as an online algorithm, which performs selection over the stream and can be flexibly scheduled. We theoretically analyze the performance guarantee and the time complexity of the offline and the online designs to demonstrate effectiveness and scalability. We finally take three ChatGPT related dialogue datasets and four different on-device LLMs for evaluation. Evaluation results show that the proposed designs significantly enhance LLM performance in terms of perplexity while maintaining fast token generation speed. Practical overhead testing on the smartphone reveal the efficiency of on-device datastore subset selection from memory usage and computation overhead.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
昏睡的蟠桃应助迟暮采纳,获得150
1秒前
CipherSage应助桃野采纳,获得10
1秒前
1秒前
2秒前
2秒前
3秒前
胖胖谈发布了新的文献求助30
4秒前
今后应助柔弱熊猫采纳,获得10
4秒前
phuocnlh发布了新的文献求助10
7秒前
CipherSage应助长歌采纳,获得10
7秒前
1111222333完成签到,获得积分20
8秒前
8秒前
8秒前
huanhuan发布了新的文献求助10
8秒前
9秒前
9秒前
完美世界应助Archer采纳,获得10
10秒前
Lychee完成签到 ,获得积分10
10秒前
11秒前
12秒前
Taylor完成签到,获得积分0
14秒前
14秒前
14秒前
15秒前
15秒前
chen发布了新的文献求助10
15秒前
16秒前
16秒前
zwj003完成签到,获得积分10
17秒前
柔弱熊猫发布了新的文献求助10
18秒前
Qifan发布了新的文献求助30
19秒前
19秒前
hanzhiyuxing完成签到,获得积分20
20秒前
长歌发布了新的文献求助10
21秒前
斯文败类应助陌尘采纳,获得10
22秒前
CipherSage应助鲁丁丁采纳,获得10
23秒前
Orange应助无聊的熠彤采纳,获得10
23秒前
24秒前
25秒前
nicheng完成签到 ,获得积分0
25秒前
高分求助中
Technologies supporting mass customization of apparel: A pilot project 600
Introduction to Strong Mixing Conditions Volumes 1-3 500
Tip60 complex regulates eggshell formation and oviposition in the white-backed planthopper, providing effective targets for pest control 400
A Field Guide to the Amphibians and Reptiles of Madagascar - Frank Glaw and Miguel Vences - 3rd Edition 400
China Gadabouts: New Frontiers of Humanitarian Nursing, 1941–51 400
The Healthy Socialist Life in Maoist China, 1949–1980 400
Walking a Tightrope: Memories of Wu Jieping, Personal Physician to China's Leaders 400
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 物理 生物化学 纳米技术 计算机科学 化学工程 内科学 复合材料 物理化学 电极 遗传学 量子力学 基因 冶金 催化作用
热门帖子
关注 科研通微信公众号,转发送积分 3800289
求助须知:如何正确求助?哪些是违规求助? 3345565
关于积分的说明 10325834
捐赠科研通 3062031
什么是DOI,文献DOI怎么找? 1680717
邀请新用户注册赠送积分活动 807201
科研通“疑难数据库(出版商)”最低求助积分说明 763557