MLX Swift LM is an open-source package from Apple’s MLX team (ml-explore) that provides large language model and vision-language model implementations for Swift, letting developers run modern LLMs locally on Apple silicon.
MLX is Apple’s array framework for machine learning on Apple silicon, and MLX Swift LM is its Swift-language home for language models: it packages up reference implementations of popular LLM and VLM architectures together with the loading, tokenization and generation utilities needed to use them inside macOS and iOS apps. Models in Hugging Face format can be pulled down and run entirely on-device, taking advantage of the unified memory architecture of M-series chips, and quantized variants keep memory footprints small enough for consumer hardware. The repository has about 840 stars on GitHub and is actively maintained by the MLX team, with its latest push in October 2026. It sits alongside the Python mlx-lm package in the same ecosystem, giving Swift developers a first-party path rather than a community port.
The package exposes dedicated Swift libraries for LLMs and for VLMs, together with shared model-loading, configuration and text-generation code, and it underpins the example chat applications in the MLX Swift ecosystem – so an experiment prototyped in Python MLX can be carried into a native Swift app with the same weights.
MLX Swift LM is free and open source under the MIT license. Individual models you run with it carry their own licenses, but the package itself costs nothing to use.
MLX Swift LM is for Apple-platform developers who want to embed local LLM or VLM features in Swift apps – private, offline, on-device intelligence on Mac, iPhone and iPad without any server round-trip.