MLX Swift is the official Swift API for MLX, Apple’s open-source machine learning framework for Apple silicon. It lets Swift developers build and run ML models — including large language models — natively in macOS and iOS apps, using the same unified-memory architecture that makes MLX fast on M-series chips. The project has 2,065 stars on GitHub and is maintained by Apple’s MLX team.
MLX was designed by Apple researchers for efficient ML on Apple silicon, with lazy evaluation and a NumPy-like API. MLX Swift brings that power to Apple’s native language, so app developers do not need Python bridges or heavyweight runtimes to ship on-device AI. You get arrays, neural network building blocks and GPU acceleration through Metal, all callable from Swift — the foundation under many of the local-LLM apps now appearing on Mac and iPhone.
The package is the base layer of a small ecosystem: companion example projects show how to build chat apps and other local-AI experiences on top of it, and the API mirrors MLX’s Python design closely enough that knowledge transfers between the two. For Apple-platform developers, it has effectively become the default route to serious on-device model work in Swift.
MLX Swift is completely free and open source under the MIT license. There are no royalties or service fees; you ship it inside your own apps with standard Apple developer tooling.
MLX Swift is for Swift developers who want to add serious on-device machine learning to Mac or iOS apps. If you are building local AI features — chat, transcription, image models — on Apple hardware, this is the native foundation to build on.