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 M4. 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.
1. Introduction: The Challenge of Mobile AI Fragmentation
Mobile AI currently operates within a highly fragmented ecosystem. Every application typically ships with its own Deep Neural Network (DNN), each featuring unique architectures and mathematical operators. This fragmentation leads to three primary issues: hardware inefficiency, system bloat, and an optimization nightmare for OS developers.
A critical finding of this research is that mobile NPUs (Neural Processing Units) struggle to support the vast array of operators used in the wild. As shown in Figure 1, only a small fraction (8%) of popular models can run entirely on modern NPUs, with the majority falling back to slower CPU or GPU execution due to unsupported operators.
2. The M4 Paradigm: Foundation Model as Firmware
To address these challenges, we propose M4 (Mobile Multimodal Model), a novel paradigm that treats a multimodal foundation model as "firmware" integrated into the mobile device's hardware and OS. Instead of fragmented, task-specific models, apps share a single, unified backbone managed by the system.
2.1 Architecture
M4 follows an "N-1-M" architecture, as illustrated in Figure 2:
- N Encoders: Specialized modules for processing diverse inputs including Vision (IMG-Enc), Text (TXT-Enc), Audio (AUD-Enc), and IMU sensing.
- 1 LLM Backbone: A central "narrow waist" (specifically LLaMA-7B) that performs core reasoning and understanding within a unified latent space.
- M Decoders: Task-specific generators for outputs like Text-to-Speech (TTS-Dec), Image Generation (IMG-Dec), or Classification (CLS-Dec).
2.2 Lightweight Adapters and Multi-path Execution
Apps provide small "adapters" (1MB–10MB) using Parameter-Efficient Fine-Tuning (PEFT) like LoRA. To optimize energy, M4 supports multi-path execution, allowing simpler tasks (like image classification) to bypass the heavy LLM backbone when appropriate, while complex tasks (like visual QA) utilize the full stack.
3. Evaluation: eAIBench
We established eAIBench, a comprehensive edge-oriented AI benchmark covering 38 tasks across 50 datasets. This benchmark spans Vision (OCR, object detection), NLP (translation, sentiment), Audio (ASR), Sensing (activity recognition), and Multimodal (Visual QA) domains. M4 was compared against traditional Task-Specific (TS) models such as ResNet-152, RoBERTa, and MobileNet.
4. Key Results and Insights
- Accuracy and Efficiency: M4 achieved accuracy parity or superiority in 85% of the tested datasets. For a device running 50 tasks, M4 reduced peak memory consumption by 5.1x compared to hosting individual models.
- Operator Simplicity: While task-specific models collectively required 156 operators, M4 requires only 39. This simplification allows for leaner, more efficient NPU designs that can be highly optimized for a specific set of operations.
- Quantization Resilience: Large foundation models showed remarkable robustness; moving from 16-bit to 4-bit quantization resulted in less than a 2% accuracy drop, making them viable for mobile memory constraints.
- Performance Potential: While currently limited by CPU/GPU fallback on COTS devices, "what-if" analysis suggests that NPU optimization for M4's 39 operators could reduce latency to approximately 0.48s for complex tasks.
5. Discussion and Future Work
While M4 demonstrates significant potential, a hardware gap remains. Most current mobile NPUs do not yet fully support the specific operators required by LLMs. Future research should focus on developing more compact, "mobile-first" foundation models and ensuring long-term adapter compatibility across OS updates to maintain the "firmware" paradigm.
Summary updated