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

Lever:智能手机上的推测LLM推理

Lever: Speculative LLM Inference on Smartphones

Tsinghua University(清华大学);Beihang University(北航);University of Pittsburgh(匹兹堡大学)

Tuowei Wang, Fengzu Li, Yanfan Sun, Wei Gao, Ju Ren

AI总结:

本文提出Lever系统,通过联合优化推测解码的三个阶段,在智能手机上实现高效的闪存支持的LLM推理,显著降低了推理延迟。

摘要:

大型语言模型(LLMs)在交互式移动应用中需求日益增加,但高质量模型超出了智能手机上有限的DRAM容量。闪存可以容纳更大的模型,但闪存支持的推理速度慢,因为自回归解码反复调用目标模型并产生昂贵的I/O。我们观察到推测解码非常适合这种环境:一个小型草稿模型可以保留在DRAM中,而一个更大的驻留于闪存的目标模型在每次调用中验证多个候选令牌。然而,现有方法假设服务器级加速器,并未考虑长时间I/O延迟、有限的计算并行性和不规则的推测执行。我们提出了Lever,一个用于智能手机上高效闪存支持LLM推理的端到端系统。Lever在移动约束下联合优化推测解码的三个阶段。在草稿阶段,它使用I/O和计算感知的增益-成本目标构建令牌树。在验证阶段,它通过早期退出预测修剪低价值分支以减少目标模型计算。在执行阶段,它将推测高效地映射到移动CPU-NPU硬件以提高利用率。全面评估显示,Lever将推理延迟降低了2.93倍于基准闪存卸载推理,1.50倍于传统推测解码,缩小了闪存支持与内存驻留LLM推理之间的延迟差距。

英文摘要:

Large language models (LLMs) are increasingly needed for interactive mobile applications, but high-quality models exceed the limited DRAM available on smartphones. Flash storage can hold larger models, yet flash-backed inference is slow because autoregressive decoding repeatedly invokes the target model and incurs costly I/O. We observe that speculative decoding is a natural fit for this setting: a small draft model can remain in DRAM, while a larger flash-resident target model verifies multiple candidate tokens per invocation. However, existing methods assume server-class accelerators and fail to account for prolonged I/O latency, limited computation parallelism, and irregular speculation execution. We present Lever, an end-to-end system for efficient flash-backed LLM inference on smartphones. Lever jointly optimizes the three stages of speculative decoding under mobile constraints. For drafting, it builds token trees using an I/O- and compute-aware gain-cost objective. For verification, it prunes low-value branches through early-exit prediction to reduce target-model computation. For execution, it maps speculation efficiently across mobile CPU-NPU hardware to improve utilization. Comprehensive evaluations show that Lever reduces inference latency by an average of 2.93x over baseline flash-offloaded inference and 1.50x over conventional speculative decoding, narrowing the latency gap between flash-backed and memory-resident LLM inference.

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

↑