Most model zoos assume an NVIDIA GPU and carry a CUDA mental model with them. This repository exists for the opposite case: it shows what idiomatic model code looks like when the backend is MLX and the CPU and GPU share a single pool of unified memory. The examples are teaching artifacts, not packaged products — each is a minimal, readable port of a well-known architecture that runs on a MacBook with no driver setup.
What Sets It Apart
- Breadth doubles as a learning map. Text (LLaMA, Mistral, T5, BERT), image (Stable Diffusion, FLUX), audio (Whisper, EnCodec, MusicGen), and multimodal (CLIP, LLaVA, Segment Anything) sit side by side, so you can compare how one framework expresses very different architectures.
- It shows MLX's defining traits in context. Lazy array evaluation and unified memory mean tensors aren't copied between host and device; the code reads like NumPy but executes on the GPU, which is the whole reason to study these instead of CUDA equivalents.
- LoRA fine-tuning marks the practical edge. Beyond inference, the LoRA example fine-tunes an LLM locally, making clear what is actually feasible on consumer Apple hardware versus what still needs a data center.
- It is the canonical reference from the framework's own authors, so the patterns track MLX's API as it evolves rather than drifting like third-party tutorials.
Great Fit / Look Elsewhere
Great fit if you own Apple silicon and learn frameworks best by reading short, complete model implementations, or want a starting point to adapt a known architecture to MLX. Look elsewhere if you need production training pipelines, multi-GPU or cluster distribution, or portability to NVIDIA hardware — these are intentionally minimal single-machine examples, and heavier LLM workflows have largely moved to the separate mlx-lm package.