mlx-examples: The Official Model Reference Library for Apple Silicon ML
Examples in the MLX framework
At a glance
- What is it?
- mlx-examples is the companion repository for Apple's MLX framework, containing standalone implementations of text, image, audio, and multimodal models. It is the primary reference for running models from LLaMA and Whisper to FLUX and LoRA fine-tuning directly on Apple Silicon.
- Who is it for?
- mlx-examples is the right starting point for any engineer running ML workloads on Apple Silicon through the MLX framework. It is the wrong place to start if you need multi-GPU training on Linux, Windows support, or CUDA-based inference.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 177 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 1, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What mlx-examples Is and Who Should Use It
mlx-examples is a collection of standalone machine learning model implementations built on Apple's MLX framework. It is maintained by the same team that develops MLX and is the primary reference for what the framework can do in practice. Each subdirectory in the repository is a self-contained example: cloning the repo and entering a subdirectory gives you a working implementation of a specific model.
The intended audience is engineers and researchers who are developing on Apple Silicon hardware (M-series Macs and Apple chips) and want to run ML workloads locally without porting code from CUDA-based frameworks. The examples serve two purposes. First, they demonstrate how to write models in MLX for engineers building their own implementations. Second, they provide usable starting points for inference, fine-tuning, and generation tasks that you can run directly.
The README recommends starting with the MNIST example as an introduction to MLX concepts before moving to larger models. The repository is an accompaniment to mlx-lm, which is described as a more fully featured package for LLMs built on the same framework.
How the Repository Is Organized: One Directory Per Model
The top-level directory contains one folder per model or task type. Each folder is independent: it carries its own scripts, configuration files, and typically its own README describing model-specific requirements and usage. The repository does not have a unified install script that sets up all examples at once.
The directory structure at the top level includes: bert/, cifar/, clip/, cvae/, encodec/, flux/, gcn/, llava/, llms/, lora/, mnist/, musicgen/, normalizing_flow/, segment_anything/, speechcommands/, stable_diffusion/, t5/, transformer_lm/, video/, whisper/, and wwdc25/. The llms/ directory holds subdirectories for individual large language models including llms/llama, llms/mistral, and llms/mixtral.
Model weights are not included in the repository. The README points to the MLX Community organization on HuggingFace (huggingface.co/mlx-community) as the source for converted checkpoints. This is the workflow for running inference: clone the repository, enter the relevant subdirectory, download the appropriate model checkpoint from HuggingFace, and run the example script.
To get the repository:
git clone https://github.com/ml-explore/mlx-examplesAfter cloning, navigate to any example subdirectory and follow its own README for model-specific instructions.
Text, Image, Video, and Audio: What the Repository Covers
The text model section covers a range of tasks and architectures. The lora/ directory provides parameter-efficient fine-tuning through LoRA and QLoRA, making it possible to adapt large models to specific tasks on local hardware. The transformer_lm/ directory has a from-scratch Transformer language model for training. The llms/ directory covers inference for LLaMA, Mistral, and Mixtral (mixture-of-experts), among others. BERT and T5 cover bidirectional language understanding and text-to-text tasks respectively.
For image generation, the flux/ directory implements FLUX and the stable_diffusion/ directory covers both Stable Diffusion and SDXL. The cifar/ and cvae/ directories provide image classification (ResNets on CIFAR-10) and a convolutional variational autoencoder.
The video/ directory contains text-to-video and image-to-video generation with Wan2.1. Audio is covered by whisper/ (speech recognition), encodec/ (audio compression and generation), and musicgen/ (music generation).
Multimodal examples include clip/ for joint text and image embeddings, llava/ for text generation from image and text inputs, and segment_anything/ for image segmentation. The gcn/ directory covers graph convolutional networks for semi-supervised learning on graph data.
This breadth means the repository is useful as a catalog of what MLX can express, not just a single-purpose tool.
Limitations: Apple-Only, No Versioned Releases, Truncated Documentation
The most significant limitation is platform scope. MLX targets Apple Silicon. The examples in this repository will not run on CUDA-based GPUs or on x86 CPUs without the MLX framework itself being available for those platforms. Engineers working on Linux servers, cloud instances, or Windows machines cannot use this repository directly.
The repository has no GitHub releases. Changes are committed directly to the main branch. There is no versioning scheme that maps example implementations to specific MLX framework versions. If a framework API change breaks an example, the only way to detect this is to try running the example and observe the error.
Documentation quality varies across examples. Some subdirectories have detailed READMEs; others assume familiarity with the model architecture. The top-level README does not document model-specific installation steps; you must navigate to the relevant subdirectory to find them.
The last push to the repository was on 2026-04-06, approximately five and a half months before the date of this writing.
mlx-examples vs. Hugging Face Transformers
Hugging Face Transformers is a Python library that provides pre-trained model implementations for a wide range of architectures across PyTorch, TensorFlow, and JAX. It runs on CUDA, CPU, and Apple Silicon (through PyTorch's MPS backend). It has a unified interface for loading models, tokenizers, and pipelines with a single from_pretrained call.
mlx-examples is not a library. It is a collection of standalone scripts. There is no from_pretrained equivalent; each example manages its own weight loading. The trade-off is that each example is a complete, readable implementation of a specific model in MLX's native idiom, which makes it useful for engineers who want to understand or modify the implementation rather than treat the model as a black box.
For Apple Silicon specifically, MLX is designed from the ground up for the unified memory architecture of Apple chips, which gives it an advantage over PyTorch's MPS backend in memory efficiency for certain workloads. The mlx-lm package, referenced in the top-level README, provides a more polished interface for LLM inference, while mlx-examples provides the underlying reference implementations.
Contributing Models and the HuggingFace Community Hub
The README explicitly encourages contributions. The ACKNOWLEDGMENTS.md file lists individual contributors. Engineers who port a new model to MLX and want to share the implementation can submit it to mlx-examples and contribute the converted checkpoint to the MLX Community organization on HuggingFace.
The repository uses a pre-commit configuration (.pre-commit-config.yaml) for code quality checks. The CONTRIBUTING.md file documents the contribution process. The CODE_OF_CONDUCT.md sets behavioral expectations.
The MLX Community on HuggingFace is the distribution point for model weights. The repository itself is MIT-licensed, which places no restrictions on use, modification, or redistribution. Model weights from third parties (LLaMA, Whisper, FLUX) carry their own licenses that are separate from the repository license.
Editorial conclusion
mlx-examples is the right starting point for any engineer running ML workloads on Apple Silicon through the MLX framework. It is the wrong place to start if you need multi-GPU training on Linux, Windows support, or CUDA-based inference. Before committing to an example, check the subdirectory README for its own dependency list, since each example may require additional packages beyond the core MLX framework.
Frequently asked questions
What are MLX models?
MLX models are machine learning model implementations built using Apple's MLX framework, which is designed for efficient computation on Apple Silicon hardware. mlx-examples provides standalone reference implementations of models including LLaMA, Whisper, FLUX, and CLIP.
What is MLX good for?
MLX is a machine learning framework designed for Apple Silicon. It is good for running and fine-tuning large models on M-series Macs using the chip's unified memory architecture. mlx-examples covers inference, LoRA fine-tuning, image generation, speech recognition, and audio generation tasks.
Is MLX easy to learn?
The mlx-examples repository recommends starting with the mnist/ subdirectory as the entry point to the framework. Each example is standalone and self-contained, which limits the cognitive overhead of understanding the full framework at once. The README does not make claims about learning difficulty.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/ml-explore-mlx-examples)