What problem does it solve?
Provide reliable patterns and best practices to load, configure, run, and manage Core ML models in iOS apps so developers can deliver fast, memory-efficient on-device inference without blocking the UI or misusing device accelerators.
Core Features & Use Cases
- Async model loading and caching for runtime-downloaded models and persisted compiled artifacts to avoid repeated expensive compilation.
- Compute unit configuration and profiling guidance to choose between CPU, GPU, and Neural Engine and inspect MLComputePlan for per-operation dispatch.
- Prediction patterns including auto-generated model classes, MLFeatureProvider, batch inference, and stateful predictions for sequence models.
- Data interoperability with MLTensor and MLMultiArray for advanced pre/post-processing and efficient zero-copy transfers.
- Vision and pipeline integration for image models, multi-model pipelines, and recommendations for deployment strategies (bundle, ODR, background assets).
- Memory and lifecycle management including unloading on background, actor-based model managers, and testing and instrumentation best practices.
Quick Start
Load the compiled model from the app bundle or application support, create an MLFeatureProvider with the image pixel buffer, and run an async prediction to return the top label and confidence.