Core AI
Run AI models in your app on Apple silicon.
Overview
Core AI helps you build, run, and deploy AI models in your app. Designed with Apple silicon in mind, Core AI allows your app to use the latest model architectures and inference techniques across the CPU, GPU, and Neural Engine. The Swift API makes common tasks simple, while giving you more control over model specialization, caching, and inference performance when needed.
[Image]
Alongside the framework, Core AI includes additional tools for model preparation, integration, and debugging. Prepare your models for Apple silicon with Core AI Optimization, then convert them into the .aimodel format with Core AI PyTorch Extensions. To measure a model’s quality, use the Evaluations framework. For language models specifically, you can also run the model through Foundation Models. The Core AI Debugger app supports visualization and numeric debugging, enabling you to inspect model structure and trace tensor values directly back to your Python source code. For a catalog of ready-to-export models and a Swift package with helpers for common inference patterns, see Core AI Models.
Core AI also integrates with Xcode and the developer toolchain. The Core AI debug gauge and Core AI instrument help you monitor and profile inference performance in your app. You can also compile models ahead of time with the coreai-build command-line tool.
If your app uses model types other than neural networks, such as decision trees or tabular feature engineering, see Core ML.
Topics
Essentials
Inference
InferenceFunctionInferenceFunctionDescriptorInferenceValueImageDescriptorComputeStreamBackground Inference
Multidimensional arrays
Configuration
Managing model specialization and cachingCompiling Core AI models ahead of timeAIModelCacheComputeUnitKindSpecializationOptions