Introduction
The rapid advancement of Large Language Models (LLMs) has primarily focused on scaling parameters to the hundreds of billions. However, deploying these models on mobile devices remains a significant challenge due to the "memory wall"—the physical limitation of DRAM on smartphones (typically 6–12GB). A standard 7-billion parameter model consumes nearly 7GB of memory even when quantized, leaving little room for the operating system or concurrent applications. MobileLLM addresses this by focusing on the sub-billion parameter regime (125M to 350M), optimizing for both memory efficiency and task performance.
Architectural Philosophy: Deep and Thin
Traditional scaling laws often suggest that smaller models should be relatively shallow. MobileLLM challenges this convention, arguing that for tiny models, architecture is more critical than raw data scaling. The authors propose a "deep and thin" approach. Instead of a shallow 12-layer model, MobileLLM utilizes up to 42 layers with reduced hidden dimensions. This sequential processing allows the model to develop more complex representations within a constrained parameter budget.
Key Technical Innovations
MobileLLM introduces several optimizations tailored for resource-constrained environments:
- Embedding Sharing: By reusing weights between the input embedding and output projection layers, the model saves significant parameter space. In a 125M parameter model, this reallocation allows for more transformer layers without increasing the total footprint.
- Grouped-Query Attention (GQA): While typically used in massive models to reduce KV cache size, GQA is applied here to help sub-billion models utilize their limited weights more effectively during inference.
- Immediate Block-wise Weight Sharing (MobileLLM-LS): This novel technique involves repeating identical transformer blocks. Because weights are already loaded into the high-speed SRAM (cache) after the first computation, executing the same block a second time incurs minimal memory movement overhead. Since memory movement is the primary bottleneck on mobile chips, this provides a "free" boost in model depth and accuracy.
Experimental Setup
The models were pre-trained on a 1-trillion token corpus to ensure they reached their performance ceiling. Evaluation spanned several categories:
- Common-sense Reasoning: Benchmarks including ARC, BoolQ, PIQA, and HellaSwag.
- Reading Comprehension: TriviaQA and RACE.
- Instruction Following: AlpacaEval and MT-Bench.
- API Calling: A new synthetic dataset of 7,500 samples designed to test natural language to JSON conversion for device-specific tasks (e.g., setting alarms).
Results and Impact
MobileLLM demonstrates that sub-billion models can punch significantly above their weight class:
- State-of-the-Art Accuracy: The 125M and 350M variants outperformed previous benchmarks (OPT, Pythia) by 2.7% and 4.3% respectively on common-sense tasks.
- API Calling Efficiency: Remarkably, the MobileLLM-350M model achieved exact match scores on API calling tasks comparable to LLaMA-v2 7B, a model twenty times its size.
- Hardware Performance: Testing on an iPhone 13 showed that the weight-sharing (LS) version introduced only a 2.6% latency overhead while providing substantial gains in accuracy.
Conclusion and Future Work
MobileLLM proves that architectural refinement is as important as data scaling for on-device AI. While these models still face a "reasoning gap" compared to 7B+ models in complex multi-step logic, they are highly effective for specialized mobile assistant tasks. Future research will focus on advanced knowledge distillation and more granular neural architecture search to further optimize these "lanky" structures.
Summary updated