Efficient On-Device Diffusion LLM Inference with Mobile NPU
作者: Tuowei Wang, Yanfan Sun, Ju Ren
分类: cs.LG
发布日期: 2026-06-11
💡 一句话要点
提出llada.cpp以解决移动设备上dLLM推理效率问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 扩散大语言模型 移动推理 神经处理单元 推理框架 性能优化
📋 核心要点
- 现有的dLLM推理方法在移动设备上面临计算负担重和延迟高的问题,影响用户体验。
- 论文提出的llada.cpp框架通过多块推测解码、双路径渐进修正和交换优化内存运行时等技术,优化了NPU的利用效率。
- 实验结果表明,llada.cpp在LLaDA-8B生成延迟上较CPU基线减少了17倍至42倍,同时保持了生成质量。
📝 摘要(中文)
扩散大语言模型(dLLMs)通过并行去噪多个标记加速生成,适合延迟敏感的移动推理。然而,重复去噪在智能手机上引入了大量计算。移动神经处理单元(NPUs)提供高吞吐量的密集矩阵计算,但有效利用它们仍然具有挑战性。本文提出了llada.cpp,这是第一个针对智能手机加速dLLMs的NPU感知推理框架。llada.cpp通过三种技术对齐了块级dLLM推理与移动NPU的执行特性,显著降低了生成延迟,同时保持了生成质量。
🔬 方法详解
问题定义:本文旨在解决在智能手机上进行扩散大语言模型推理时,因重复去噪导致的计算负担和延迟问题。现有方法在移动设备上难以高效利用NPU,造成性能瓶颈。
核心思路:论文提出的llada.cpp框架通过对NPU执行特性的对齐,采用多块推测解码、双路径渐进修正和交换优化内存运行时等技术,提升了dLLM的推理效率。
技术框架:llada.cpp的整体架构包括三个主要模块:多块推测解码用于填补工作负载,双路径渐进修正用于保持标记的可修正性,交换优化内存运行时用于减少数据重映射和传输开销。
关键创新:最重要的技术创新在于通过多块推测解码和双路径渐进修正,解决了NPU在推理过程中的工作负载缩减和标记修正复杂性问题,与现有方法相比显著提高了推理效率。
关键设计:在设计中,llada.cpp优化了NPU可见地址布局,并重叠数据准备与NPU计算,以减少重映射和传输开销,同时保持生成质量。
🖼️ 关键图片
📊 实验亮点
实验结果显示,llada.cpp在LLaDA-8B模型的生成延迟上,相较于CPU基线减少了17倍至42倍,同时通过前缀KV缓存重用,确保了生成质量的稳定性。
🎯 应用场景
该研究的潜在应用领域包括移动设备上的自然语言处理、智能助手和实时翻译等场景。通过提高dLLM在移动设备上的推理效率,能够为用户提供更流畅的交互体验,推动智能设备的智能化进程。
📄 摘要(原文)
Diffusion large language models (dLLMs) accelerate generation by denoising multiple tokens in parallel, making them attractive for latency-sensitive mobile inference. However, repeated denoising introduces substantial computation on smartphones. Mobile neural processing units (NPUs) offer high-throughput dense matrix computation, but efficiently exploiting them remains challenging: token commitment shrinks per-block effective workloads, token revision complicates KV cache reuse, and limited NPU-visible address space incurs costly remapping and data transfer overheads. In this paper, we propose llada.cpp, the first NPU-aware inference framework for accelerating dLLMs on smartphones. llada.cpp aligns block-wise dLLM inference with the execution characteristics of mobile NPUs through three techniques. (1) Multi-Block Speculative Decoding fills the shrinking workload in late-stage current-block decoding with speculative future-block tokens. (2) Dual-Path Progressive Revision keeps committed tokens revisable until stable and refreshes unstable tokens through a CPU-side path without stalling dense NPU execution. (3) Swap-Optimized Memory Runtime compacts NPU-visible address layouts and overlaps data staging with NPU computation to reduce remapping and transfer overheads. We implement llada.cpp as an end-to-end framework and evaluate it across diverse hardware platforms and dLLM workloads. llada.cpp reduces LLaDA-8B generation latency by 17x-42x over the CPU baseline with prefix KV cache reuse, while preserving generation quality.