MLX Swift
Apple's Swift API for MLX, the array and machine-learning framework for Apple silicon.
View on GitHub ↗- Stars
- ★ 2,063
- Last commit
- 16 Oct 2026
- Maintenance
- Active
- Licence
- MIT
- Category
- On-device AI SDKs
- GitHub
- ml-explore/mlx-swift
Overview
MLX Swift is the Swift API for MLX, Apple's array framework for machine learning on Apple silicon. It brings MLX to Swift to make research and experiments on Apple silicon easier. Language and vision-language model implementations live in the separate mlx-swift-lm package.
Features
- Array framework for machine learning on Apple silicon
- Builds with Xcode or SwiftPM, plus CMake with a native Linux option
- Examples include MNIST training, a chat app, LLM evaluation and Stable Diffusion
- Version numbers generally match the core MLX releases
Requirements
- Apple silicon
Install
Add the package to Package.swift, or add https://github.com/ml-explore/mlx-swift.git in Xcode
.package(url: "https://github.com/ml-explore/mlx-swift", from: "0.10.0")
Works with
Listed in
Read the code before you install anything. SwiftAgents doesn't review or endorse the tools listed here. Active: a commit in the last 90 days. Slowing: last commit within the past year. Stale: older than a year, or archived.