Notes

Core ML

Think of Core ML as Apple’s built-in pathway for putting a trained machine-learning model to work directly inside an iPhone, iPad, Mac, Apple Watch, or Apple Vision Pro. Instead of sending every photo, sound clip, or sensor reading to a server, an app can make a prediction where the data is created.

How it runs models
Core ML is Apple’s on-device machine-learning framework and model format. Developers package a model as a .mlmodel file, then Xcode compiles it into an optimized form used by the app. At runtime, Core ML selects suitable hardware—such as the CPU, GPU, or Apple Neural Engine—based on the model, device, and current system conditions. This hardware selection lets an app use specialized accelerators without manually writing separate code for each chip.

From trained model to app feature
Many models begin life in PyTorch, TensorFlow, or scikit-learn rather than in Core ML itself. Apple’s coremltools converter transforms supported models into Core ML format. Core ML also connects closely with Apple frameworks such as Vision for image analysis and Speech for audio features. Typical uses include:

  • Detecting people or objects in a smart-camera feed without an internet connection.
  • Classifying a wake word or sound event while keeping microphone data on the device.
  • Suggesting text, recognizing handwriting, or ranking photos in a private local library.

Why it matters on devices
Edge devices have fixed battery, memory, and thermal limits. Core ML’s compilation and hardware-aware execution help reduce latency and energy use compared with running a model through a general-purpose implementation. Keeping inference local also avoids network delay and can protect sensitive data. But deployment still requires care: unsupported operations, excessive memory use, or a model targeting a newer Apple OS can block conversion or prevent it from running on older devices. A model must therefore be designed and converted with its intended Apple hardware and OS deployment target in mind.

Core ML is Apple’s on-device machine-learning framework for deploying and running trained models on iPhone, iPad, Mac, Apple Watch, and Apple TV. It packages models in the .mlmodel format and uses available CPU, GPU, and Neural Engine hardware for inference. Core ML enables low-latency, private, energy-efficient Edge AI without sending input data to cloud services.

Think of Core ML as Apple’s built-in AI delivery service. It helps an app bring a trained AI model onto an iPhone, iPad, Mac, Apple Watch, or Apple TV and use it directly there.

That means a photo app can recognize objects, a keyboard can improve suggestions, or a health app can spot useful patterns without constantly sending personal information to a distant server. Because the AI work happens on the device, it can often respond quickly and still work with a weak or missing internet connection.

Core ML is designed for Apple devices, helping apps use their hardware efficiently while keeping many AI tasks private and local.