Apple Introduces the Core ML Framework
Published:
Apple introduced Core ML at WWDC on June 5, 2017, shipping with iOS 11 (September 19, 2017), macOS High Sierra (September 25, 2017), watchOS 4, and tvOS 11. Core ML provided a unified on-device inference framework: developers converted pre-trained models from common training frameworks (Keras, Caffe 1, scikit-learn, XGBoost, libsvm) into Apple’s .mlmodel format using the coremltools Python package, then added the .mlmodel file to an Xcode project where Xcode automatically generated a Swift/Objective-C class wrapping the model’s inputs and outputs. At runtime, Core ML automatically routed computation to the most appropriate hardware: the CPU (using BNNS — Basic Neural Network Subroutines — a low-level optimized library), GPU (via Metal Performance Shaders, for models with GPU-friendly layer types), or the Neural Engine on devices that had one. The A11 Bionic (iPhone X, September 2017) shipped the first dedicated Neural Engine — a 2-core block running at approximately 600 GOPS, used exclusively for Core ML inference and not exposed to general Metal computation — enabling face recognition for Face ID and Animoji at low power. The A12 Bionic (iPhone XS, September 2018) expanded this to an 8-core Neural Engine capable of 5 TOPS, an 8× improvement, and established the Neural Engine as a permanent dedicated accelerator on all subsequent Apple SoCs.
Core ML 1 launched with support for neural networks (feedforward, convolutional, recurrent), generalized linear models, support vector machines, tree ensembles, and pipelines (chaining preprocessing + model + postprocessing steps). The Vision framework (also iOS 11) provided a higher-level API built on Core ML for image analysis tasks: face detection and tracking (returning bounding boxes for human faces in still images or video frames), barcode/QR code recognition, text recognition (OCR in later versions), horizon detection (finding the tilt angle of a landscape photo), rectangle detection (finding document boundaries), and image classification using Core ML models loaded via the VNCoreMLModel class. Vision handled the image pre-processing (scaling to the model’s expected input size, color channel normalization) that developers would otherwise need to perform manually. The Natural Language framework (iOS 12, September 2018) followed with similar high-level APIs for text — language identification, tokenization (sentence and word boundaries), part-of-speech tagging, named entity recognition, and lemmatization.
Core ML 2 (iOS 12/macOS Mojave, September 2018) added batch prediction (processing multiple inputs in one call for efficiency), custom model support (implementing layers in Metal that Core ML didn’t natively support), quantization via coremltools (reducing model weights from FP32 to FP16 or INT8 to reduce model file sizes from ~50 MB to 12 MB or 6 MB with acceptable accuracy degradation for many classification tasks), and Create ML — a macOS app for training Core ML models from the Mac without writing Python code or using cloud services. Create ML supported drag-and-drop training for image classification (drop a folder of labeled images, train locally on the Mac’s GPU in minutes) and text classification. Core ML 3 (iOS 13/macOS Catalina, September 2019) introduced on-device model personalization: models could update their weights from local user data without sending that data to a server, enabling federated learning-style personalization of recommendation models and activity classifiers while preserving user privacy. This architecture — model distributed at app install time, weights refined locally from on-device experience, improved predictions without cloud telemetry — became central to Apple’s privacy-preserving AI strategy differentiated from cloud-dependent alternatives.
