MLX Swift LM

MLX Swift LM

โ˜… 3.6 ๐Ÿ”– 600 saves ๐Ÿ’ฐ Free GitHub

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.

Overview

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.

Key Features

  • Ready-to-use implementations of popular LLM architectures in Swift
  • Vision-language model (VLM) support for multimodal on-device apps
  • Runs on Apple silicon through MLX, exploiting unified memory for fast local inference
  • Loads Hugging Face-format weights, including quantized models
  • Swift Package Manager integration for straightforward use in Xcode projects
  • Maintained by Apple’s ml-explore team alongside the core MLX framework

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.

๐Ÿ’ณ Pricing

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.

Who Is It For

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.

๐Ÿš€ Visit MLX Swift LM Official Site

๐Ÿšฉ Report an issue