ELMS: Elasticized Large Language Models On Mobile Devices
Yin, Wangsong, Yi, Rongjie, Xu, Daliang, Huang, Gang, Xu, Mengwei, Liu, Xuanzhe
–arXiv.org Artificial Intelligence
On-device Large Language Models (LLMs) are revolutionizing mobile AI, enabling applications such as UI automation while addressing privacy concerns. Currently, the standard approach involves deploying a single, robust LLM as a universal solution for various applications, often referred to as LLM-as-a-Service (LLMaaS). However, this approach faces a significant system challenge: existing LLMs lack the flexibility to accommodate the diverse Service-Level Objectives (SLOs) regarding inference latency across different applications. To address this issue, we introduce ELMS, an on-device LLM service designed to provide elasticity in both the model and prompt dimensions of an LLMaaS. This system includes: A one-time neuron reordering technique, which utilizes the inherent permutation consistency within transformer models to create high-quality, elastic sub-models with minimal runtime switching costs. A dual-head compact language model, which efficiently refines prompts and coordinates the elastic adaptation between the model and the prompt. We have implemented this elastic on-device LLM service on several off-the-shelf (COTS) smartphones and evaluate ELMS using both standalone NLP/mobile-agent datasets and synthesized end-to-end traces. Across a range of SLOs, ELMS surpasses four strong baselines by up to 16.83% and 11.04% in absolute accuracy on average, with less than 1% Time-To-First-Token (TTFT) switching overhead, comparable memory usage, and fewer than 100 offline GPU hours.
arXiv.org Artificial Intelligence
Sep-8-2024
- Country:
- Asia
- Europe
- Germany (0.04)
- Ireland > Leinster
- County Dublin > Dublin (0.04)
- North America > United States
- District of Columbia > Washington (0.15)
- Louisiana > Orleans Parish
- New Orleans (0.04)
- New York > New York County
- New York City (0.04)
- South America > Colombia
- Meta Department > Villavicencio (0.04)
- Genre:
- Research Report (0.84)
- Industry:
- Technology: