# MLX Swift Examples

A collection of example iOS and macOS applications and command-line tools built with MLX Swift, showing how to train and run language models, vision-language models and other machine learning workloads on Apple hardware.

This repository holds runnable examples for MLX Swift, Apple's array framework for machine learning. Examples include an MNIST digit trainer, a minimal LLM chat app, an LLM evaluator that downloads a model and tokenizer from Hugging Face and reports run statistics, a chat app supporting both language and vision-language models, and a LoRA fine-tuning example.

Command-line tools generate text from language models, generate images from a Stable Diffusion model, and train a LeNet model on MNIST, all downloaded from Hugging Face. Other examples apply MLX's array operations, compilation, and custom Metal kernels to general numerical problems such as curve fitting, heat diffusion, and Mandelbrot set rendering.

The reusable model libraries used by several of these examples have moved to a separate repository; this one keeps the example applications themselves.

Website: https://github.com/ml-explore/mlx-swift-examples
