Apple Intelligence Foundation Language Models

Tom Gunter, Zirui Wang, Chong Wang, Ruoming Pang, Andy Narayanan, Aonan Zhang, Bowen Zhang, Chen Chen 0005, Chung-Cheng Chiu, David Qiu, Deepak Gopinath, Dian Ang Yap, Dong Yin, Feng Nan, Floris Weers, Guoli Yin, Haoshuo Huang, Jianyu Wang, Jiarui Lu, John Peebles, Ke Ye, Mark Lee, Nan Du, Qibin Chen, Quentin Keunebroek, Sam Wiseman, Syd Evans, Tao Lei, Vivek Rathod, Xiang Kong, Xianzhi Du, Yanghao Li, Yongqiang Wang, Yuan Gao, Zaid Ahmed, Zhaoyang Xu, Zhiyun Lu, Al Rashid, Albin Madappally Jose, Alec Doane, Alfredo Bencomo, Allison Vanderby, Andrew Hansen, Ankur Jain, Anupama Mann Anupama, Areeba Kamal, Bugu Wu, Carolina Brum, Charlie Maalouf, Chinguun Erdenebileg, Chris Dulhanty, Dominik Moritz, Doug Kang, Eduardo Jimenez, Evan Ladd, Fangping Shi, Felix Bai, Frank Chu, Fred Hohman, Hadas Kotek, Hannah Gillis Coleman, Jane Li, Jeffrey P. Bigham, Jeffery Cao, Jeff Lai, Jessica Cheung, Jiulong Shan, Joe Zhou, John Li, Jun Qin, Karanjeet Singh, Karla Vega, Kelvin Zou, Laura Heckman, Lauren Gardiner, Margit Bowler, Maria Cordell, Meng Cao, Nicole Hay, Nilesh Shahdadpuri, Otto Godwin, Pranay Dighe, Pushyami Rachapudi, Ramsey Tantawi, Roman Frigg, Sam Davarnia, Sanskruti Shah, Saptarshi Guha, Sasha Sirovica, Shen Ma, Shuang Ma, Simon Wang, Sulgi Kim, Suma Jayaram, Vaishaal Shankar, Varsha Paidi, Vivek Kumar, Xin Wang, Xin Zheng, Walker Cheng · DOI

Introduction

Apple recently introduced the foundation models powering "Apple Intelligence," a suite of generative features integrated across its ecosystem. This technical report details the Apple Foundation Models (AFM), specifically a ~3-billion parameter on-device model (AFM-on-device) and a larger server-based model (AFM-server). Apple’s strategy prioritizes extreme efficiency, specialized task adaptation, and a rigorous "Responsible AI" framework over the industry trend of ever-increasing parameter counts.

Methods and Architecture

Apple’s development process follows a comprehensive pipeline designed for high-performance deployment on consumer hardware. This pipeline integrates data curation, pre-training, and post-training with a focus on optimization and safety.

The Apple Foundation Model training and optimization pipeline, highlighting the role of adapters and Responsible AI principles.

Model Initialization: Pruning and Distillation

To achieve high intelligence in a small footprint, Apple initialized the 3B on-device model by structurally pruning a larger 6.4B model and employing knowledge distillation. This allowed the smaller model to inherit the capabilities of its "teacher," resulting in performance that matches models trained with significantly more compute.

Architectural Specifications

The AFM-on-device model is optimized for the constraints of mobile hardware. The specific architectural parameters, including model dimensions and layer counts, are detailed below:

Architectural parameters for the AFM-on-device model, showing a total of approximately 2.73B parameters.

Dynamic Adaptation via LoRA

A cornerstone of the AFM architecture is the use of Low-Rank Adaptation (LoRA). Instead of maintaining multiple large models for different features, Apple uses a single base model and swaps tiny, task-specific "adapters" at runtime. These modules enable specialization in tasks like email summarization or code generation with minimal memory overhead. To mitigate quality loss from 4-bit quantization, Apple also developed "accuracy-recovery adapters."

Post-Training Innovations

Apple introduced two novel reinforcement learning techniques to refine model behavior:

  • iTeC (Iterative Teaching Committee): A framework that uses a committee of high-performing models to iteratively refresh and improve training data alignment.
  • MDLOO (Mirror Descent with Leave-One-Out): A reinforcement learning algorithm designed to stabilize training and enhance the model's instruction-following capabilities.

Datasets and Training

The models were trained on a diverse mixture of 6.3 trillion tokens.

  • Pre-training: Data includes web content crawled by Applebot (respecting robots.txt), high-quality licensed datasets, GitHub code, and a specialized 17B-token math mixture.
  • Post-training: A hybrid approach using human-annotated demonstrations and synthetic data generated via "evolution" strategies and execution-based rejection sampling.

Key Results

Apple’s evaluation focuses on human preference and real-world utility:

  • Efficiency: The AFM-on-device model achieved higher human preference win rates than larger competitors like Llama-3-8B and Mistral-7B.
  • Task Performance: In specific features like notification summarization, the adapter-enhanced AFM-on-device significantly outperformed Phi-3-mini.
  • Safety: Apple’s models demonstrated superior safety profiles. In adversarial red-teaming, the on-device model showed a violation rate of only 7.5%, compared to 21.8% for Llama-3-8B and 51.3% for Mistral-7B.

Conclusion

The Apple Foundation Models demonstrate that high-quality generative AI can be delivered efficiently on-device. By combining structural pruning, runtime-swappable adapters, and a focus on data quality, Apple has built a model family that balances capability with the strict privacy and performance requirements of a global consumer device ecosystem.

Summary updated

BibTeX
@misc{gunter2024apple,
  author = {Tom Gunter and Zirui Wang and Chong Wang and Ruoming Pang and Andy Narayanan and Aonan Zhang and Bowen Zhang and Chen Chen and Chung-Cheng Chiu and David Qiu and Deepak Gopinath and Dian Ang Yap and Dong Yin and Feng Nan and Floris Weers and Guoli Yin and Haoshuo Huang and Jianyu Wang and Jiarui Lu and John Peebles and Ke Ye and Mark Lee and Nan Du and Qibin Chen and Quentin Keunebroek and Sam Wiseman and Syd Evans and Tao Lei and Vivek Rathod and Xiang Kong and Xianzhi Du and Yanghao Li and Yongqiang Wang and Yuan Gao and Zaid Ahmed and Zhaoyang Xu and Zhiyun Lu and Al Rashid and Albin Madappally Jose and Alec Doane and Alfredo Bencomo and Allison Vanderby and Andrew Hansen and Ankur Jain and Anupama Mann Anupama and Areeba Kamal and Bugu Wu and Carolina Brum and Charlie Maalouf and Chinguun Erdenebileg and Chris Dulhanty and Dominik Moritz and Doug Kang and Eduardo Jimenez and Evan Ladd and Fangping Shi and Felix Bai and Frank Chu and Fred Hohman and Hadas Kotek and Hannah Gillis Coleman and Jane Li and Jeffrey P. Bigham and Jeffery Cao and Jeff Lai and Jessica Cheung and Jiulong Shan and Joe Zhou and John Li and Jun Qin and Karanjeet Singh and Karla Vega and Kelvin Zou and Laura Heckman and Lauren Gardiner and Margit Bowler and Maria Cordell and Meng Cao and Nicole Hay and Nilesh Shahdadpuri and Otto Godwin and Pranay Dighe and Pushyami Rachapudi and Ramsey Tantawi and Roman Frigg and Sam Davarnia and Sanskruti Shah and Saptarshi Guha and Sasha Sirovica and Shen Ma and Shuang Ma and Simon Wang and Sulgi Kim and Suma Jayaram and Vaishaal Shankar and Varsha Paidi and Vivek Kumar and Xin Wang and Xin Zheng and Walker Cheng},
  title = {{Apple Intelligence Foundation Language Models}},
  year = {2024},
  eprint = {2407.21075},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.21075},
}
Figure