Skip to main content
QUICK REVIEW

[Paper Review] Mobile Foundation Model as Firmware

Jinliang Yuan, Yang Chen|arXiv (Cornell University)|Aug 28, 2023
IoT and Edge/Fog ComputingComputer Science3 citations
TL;DR

This paper proposes Mobile Foundation Model as Firmware (M4), a novel paradigm where a unified, hardware-protected foundation model resides in the NPU and serves as a system-level AI service for diverse mobile tasks. Each app uses a lightweight, offline-fine-tuned adapter, enabling high accuracy (85% parity), reduced memory/storage, and efficient inference on COTS mobile devices with NPUs.

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.

Motivation & Objective

  • To address the severe fragmentation in mobile AI ecosystems caused by diverse model architectures, operators, and implementations.
  • To reduce hardware, system, and software overhead from ad-hoc optimization of task-specific models.
  • To enable system-wide sharing of weights and computations across apps through a unified, OS-managed foundation model.
  • To explore a new co-design paradigm where the OS and hardware jointly manage a persistent, firmware-like foundation model for on-device AI.
  • To demonstrate the feasibility of a single foundation model handling a broad spectrum of mobile AI tasks with minimal runtime cost.

Proposed method

  • The foundation model is implemented as a firmware-like system service in the NPU, unchangeable by apps or OS, ensuring stability and hardware-level integration.
  • Each application contributes a lightweight, parameter-efficient adapter (e.g., LoRA-style) fine-tuned offline for its specific downstream task.
  • The system leverages state-of-the-art pre-trained LLMs and multimodal alignment techniques (e.g., ImageBind, CoDi) to unify diverse inputs (vision, NLP, audio, sensing).
  • A comprehensive benchmark of 38 mobile AI tasks across 50 datasets evaluates M4’s performance, accuracy, memory, and inference speed.
  • The model supports dynamic data flow and runtime scheduling across applications, enabling shared computation and weight reuse.
  • The NPU is designed to natively execute both the foundation model and the lightweight adapters, minimizing CPU/GPU involvement.

Experimental results

Research questions

  • RQ1Can a single, unified foundation model in the NPU serve as a universal on-device AI engine for diverse mobile tasks?
  • RQ2How does a firmware-based foundation model compare to task-specific models in terms of accuracy, memory, and inference speed?
  • RQ3To what extent can system-wide weight and computation sharing be achieved through a co-managed foundation model?
  • RQ4Can parameter-efficient fine-tuning (PEFT) techniques like LoRA be effectively integrated into a mobile NPU-optimized inference pipeline?
  • RQ5What are the key challenges and design requirements for evolving the foundation model and its adapters independently over time?

Key findings

  • M4 achieves accuracy parity with task-specific models in 85% of the 38 benchmarked mobile AI tasks, demonstrating strong generalization.
  • The system shows improved scalability in storage and memory usage due to shared weights and a unified model architecture.
  • Inference speed on COTS mobile devices with NPU support is satisfactory, with significant speedups observed on NPUs compared to CPUs.
  • The NPU achieves up to 22× speedup over multi-core CPUs on the Snapdragon 8+ Gen 1 platform, but only for 8% of models due to operator support limitations in current stacks.
  • The approach enables system-wide computation and weight sharing across apps, which is currently impractical due to model fragmentation in existing ecosystems.
  • The prototype demonstrates the feasibility of a foundation model as firmware, though future work is needed to optimize model size, accuracy, and backward compatibility of adapters.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.