Skip to main content
QUICK REVIEW

[论文解读] Mobile Foundation Model as Firmware

Jinliang Yuan, Yang Chen|arXiv (Cornell University)|Aug 28, 2023
IoT and Edge/Fog ComputingComputer Science被引用 3
一句话总结

本文提出移动基础模型作为固件(M4),一种新型范式,即一个统一的、硬件保护的基础模型驻留在NPU中,作为多样移动任务的系统级AI服务。每个应用使用轻量级、离线微调的适配器,实现高精度(85%的性能对齐)、减少内存/存储占用,并在具备NPU的商用移动设备上实现高效推理。

ABSTRACT

In today's landscape, smartphones have evolved into hubs for hosting a multitude of deep learning models aimed at local execution. A key realization driving this work is the notable fragmentation among these models, characterized by varied architectures, operators, and implementations. This fragmentation imposes a significant burden on the comprehensive optimization of hardware, system settings, and algorithms. Buoyed by the recent strides in large foundation models, this work introduces a pioneering paradigm for mobile AI: a collaborative management approach between the mobile OS and hardware, overseeing a foundational model capable of serving a broad spectrum of mobile AI tasks, if not all. This foundational model resides within the NPU and remains impervious to app or OS revisions, akin to firmware. Concurrently, each app contributes a concise, offline fine-tuned "adapter" tailored to distinct downstream tasks. From this concept emerges a concrete instantiation known as \sys. It amalgamates a curated selection of publicly available Large Language Models (LLMs) and facilitates dynamic data flow. This concept's viability is substantiated through the creation of an exhaustive benchmark encompassing 38 mobile AI tasks spanning 50 datasets, including domains such as Computer Vision (CV), Natural Language Processing (NLP), audio, sensing, and multimodal inputs. Spanning this benchmark, \sys unveils its impressive performance. It attains accuracy parity in 85\% of tasks, demonstrates improved scalability in terms of storage and memory, and offers satisfactory inference speed on Commercial Off-The-Shelf (COTS) mobile devices fortified with NPU support. This stands in stark contrast to task-specific models tailored for individual applications.

研究动机与目标

  • 解决由多样化的模型架构、操作符和实现方式导致的移动AI生态系统严重碎片化问题。
  • 减少针对特定任务模型的临时优化所带来的硬件、系统和软件开销。
  • 通过一个统一的、由操作系统管理的基础模型,实现在应用间共享权重和计算。
  • 探索一种新的软硬件协同设计范式,即操作系统与硬件共同管理一个持久的、类似固件的基础模型,用于设备端AI。
  • 证明单一基础模型能够以极低的运行时开销处理广泛范围的移动AI任务。

提出的方法

  • 基础模型以类似固件的系统服务形式实现在NPU中,不可被应用或操作系统修改,确保稳定性和硬件级集成。
  • 每个应用程序贡献一个轻量级、参数高效的适配器(例如LoRA风格),在离线状态下针对其特定下游任务进行微调。
  • 系统利用最先进的预训练大语言模型和多模态对齐技术(例如ImageBind、CoDi),统一处理各类输入(视觉、自然语言处理、音频、传感)。
  • 基于50个数据集对38项移动AI任务进行全面基准测试,评估M4在性能、精度、内存和推理速度方面的表现。
  • 模型支持跨应用的动态数据流和运行时调度,实现计算和权重的共享 reuse。
  • NPU被设计为原生执行基础模型和轻量级适配器,最大限度减少CPU/GPU的参与。

实验结果

研究问题

  • RQ1能否在NPU中部署单一、统一的基础模型,作为多样移动任务的通用设备端AI引擎?
  • RQ2与特定任务模型相比,基于固件的基础模型在精度、内存和推理速度方面表现如何?
  • RQ3通过协同管理的基础模型,能在多大程度上实现系统范围内的权重和计算共享?
  • RQ4参数高效的微调(PEFT)技术(如LoRA)能否有效集成到面向移动NPU优化的推理流水线中?
  • RQ5在长期演进过程中,独立地更新基础模型及其适配器的关键挑战和设计需求是什么?

主要发现

  • M4在38项基准测试的85%移动AI任务中实现了与特定任务模型相当的精度,证明了其强大的泛化能力。
  • 由于共享权重和统一的模型架构,系统在存储和内存使用方面表现出更好的可扩展性。
  • 在支持NPU的商用移动设备上,推理速度令人满意,且在NPU上相比CPU观察到显著加速。
  • 在高通骁龙8+ Gen 1平台上,NPU相比多核CPU最高可实现22倍的加速,但仅适用于8%的模型,原因在于当前软件栈中操作符支持的限制。
  • 该方法实现了应用间系统范围的计算和权重共享,这在现有生态系统中因模型碎片化而目前难以实现。
  • 原型证明了将基础模型作为固件的可行性,但未来工作仍需优化模型大小、精度以及适配器的向后兼容性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。