using on device ai in my app

Asked on 2025-06-11

1 search

To integrate on-device AI into your app, Apple provides several frameworks and tools that you can leverage. Here are some key points from the WWDC sessions:

  1. Core ML Framework: This is the most commonly used framework for running AI models on iOS, iPadOS, and macOS. You can import and run on-device AI models, such as large language or diffusion models, using Core ML. It optimizes hardware-accelerated execution across the CPU, GPU, and neural engine. You can start with any PyTorch model and convert it into the Core ML format using Core ML tools, which offer optimization techniques like quantization and efficient key-value caching in LLMs. Platforms State of the Union

  2. Foundation Models Framework: This framework allows you to tap into highly optimized on-device foundation models. It provides APIs for natural language processing, sound analysis, speech understanding, and vision intelligence. You can use these models to enhance your app's features with AI capabilities. Discover machine learning & AI frameworks on Apple platforms

  3. Create ML: This tool allows you to bring in additional data for training and extend existing models. For example, if you have a unique dataset of images, you can augment Apple's image models with your data to improve classification and object detection. Platforms State of the Union

  4. Privacy and Offline Capabilities: On-device AI ensures that user data stays private and doesn't need to be sent to a server. The AI features work offline, eliminating the need for account setup or API keys. Code-along: Bring on-device AI to your app using the Foundation Models framework

For more detailed guidance, you might want to explore the session Discover machine learning & AI frameworks on Apple platforms, which provides an overview of the tools and APIs available for integrating AI into your apps.