Core ML vs MLX vs Foundation Models: Choosing Apple's On-Device AI Stack
Apple now ships four distinct ways to run a model on your users’ hardware, and picking the wrong one costs a rewrite. On the M2 Max I am writing this on, MLX sustains 11.2 TFLOPS of fp16 matrix math and moves data at 351 GB/s of measured unified-memory bandwidth 1. For most apps that power is the wrong choice, because the built-in Foundation Models framework does the job in six lines of Swift with zero megabytes added to the download. The four frameworks are not competitors. They are four different answers to one question: whose model is it, and who maintains the execution?
TL;DR
Foundation Models is the default. If Apple’s on-device ~3B-parameter LLM can do the task (summarize, extract, classify, generate structured output, call your tools), you ship zero model weights, pay zero inference cost, and inherit every OS-level model upgrade for free. 2
Core ML is for shipping your trained model inside an app. It is the only path with first-class Neural Engine dispatch, App Store-friendly packaging, and a compile-ahead contract that trades flexibility for battery life and predictability. 3
MLX is for when the model is the product: research, fine-tuning, running open-weights LLMs, or any workload where you need eager control over tensors. It is a developer-machine and Mac-app tool, not an iOS shipping vehicle. 4
Core AI (iOS 27) is the new floor under all of it: a low-level model-execution framework with NDArray tensors and explicit compute-unit targeting, for teams that today abuse Core ML as a tensor runtime.
The decision usually takes one question: built-in model → Foundation Models; your model on iOS → Core ML; your model on your Mac → MLX; tensor-level control on iOS → Core AI. The rest of this post is the 20% of cases where that heuristic breaks.
The Question Behind the Question
Every “which framework” debate I have watched collapses into two axes. (I have written a deep dive on each of these: Foundation Models, Core ML, MLX, Core AI.)
Axis one: whose weigh…