← All courses ← Course home

Lesson 02 of 05

When to use Core ML

Core ML is Apple's older tool for putting a trained model in an app. It still works. It is the right pick for classic ML and for apps that must run below iOS 27 or macOS 27.

Agent brief (llms.md)

Core ML takes a trained model and runs it in an iOS or macOS app. Apple still lists it for traditional machine learning. That includes tree models, regression, and other classic jobs. Apple has not announced a deprecation.

TrainA finished model
ConvertCore ML Tools

You convert the model with Core ML Tools, often called coremltools. The usual file is a .mlmodel. You add that file to Xcode. The app loads it through the Core ML framework.

TrainA finished model
Convertcoremltools
File.mlmodel
import coremltools as ct

model = ct.convert(trained_model)
model.save("classifier.mlmodel")

That snippet is the public convert-and-save path. Check the Core ML Tools docs for the model type you have. Do not copy an argument you have not checked.

What the OS does

After the file is in the app, the system picks much of the run path. Core ML can use the CPU, the GPU, or the Neural Engine. You do not write a full custom runtime. That is useful when you want a stable shipping path and you do not need a new generative stack.

File.mlmodel
AppCore ML framework
DeviceOS picks the hardware

When Core ML is the right pick

Apple's machine learning page still points classic ML at Core ML. For large language models and other generative models, that same page points you to Core AI. Keep Core ML when it matches the app. Apple still supports Core ML.

Model architectures in plain English shows the classifier shape. PyTorch to Core AI in Xcode is the Core AI course for a custom network on 27 or later. Core AI models, typed lists ready-made Core AI presets, not Core ML files.

Limit. Core ML is not the current Apple path for bringing your own generative or transformer model to a 27 or later app.

Next, look at Core AI, the current path for a custom neural model on 27 or later.

Key concepts

  • Core ML is Apple's older tool for running a trained model in an iOS or macOS app.
  • Convert with coremltools. The usual file is .mlmodel. The app loads it through the Core ML framework.
  • After the file is in the app, the OS picks much of the run path.
  • Good fit: OS older than 27, classic ML jobs, or an existing Core ML file that already works.
  • Apple has not announced that Core ML is deprecated.

Takeaways

  • You can describe trained model to coremltools to .mlmodel to the Core ML framework.
  • You can say when Core ML is the right pick.
  • You can say when to leave Core ML for Core AI on OS 27 or later.