A topic page: a summary of what my posts say, with each claim quoted from the post it came from. The posts are the authority. Last checked 2026-11-16.
Summary. I explore the MLX framework as a specialized tool for running and fine-tuning large language models on Apple Silicon. My research demonstrates how MLX leverages unified memory and compiled training steps to provide significant speed and memory advantages over PyTorch.
What the posts say
MLX is a framework designed for Apple silicon.
βMLX is an array framework designed for efficient and flexible machine learning research on Apple silicon.β β MLX 1
The MLX engine provides a significant speed advantage when the training step is compiled.
βWith it, MLX is about a quarter faster than itself, and 16% faster than PyTorch.β β MiniGPT (Part 4)
MLX uses less memory than PyTorch for the exact same machine and task.
βMLX uses less memory either way: 3.7 to 3.9 GB against PyTorch's 4.6 GB, about 15 to 20% less for exactly the same machine.β β MiniGPT (Part 4)
MLX avoids memory copying because Apple chips share a single pool of memory.
βMLX is built around that, so there is nothing to copy and no
.to(device)anywhere: the training batch goes straight into an MLX array, and the GPU reads it where it is.β β MiniGPT (Part 4)
The results from both the PyTorch and MLX versions are nearly identical.
βBut they should end up in the same place, and they do: after 3,000 steps, the MLX machine scores 0.689 bits per byte on the test stories, and the PyTorch machine from Part 3 scores 0.697.β β MiniGPT (Part 4)
The posts behind this page
- MiniGPT (Part 4) β The same machine on a faster engine: rebuilding MiniGPT in Apple's MLX, what one shared pool of memory, lazy calculation, and compiling the training step buy, and a fair race against PyTorch on the same Mac, with a follow-along notebook
- MiniGPT (Part 5) β The block inside today's small models: four changes Meta made for Llama (RMSNorm, rotary positions, SwiGLU, and shared keys and values), each turned back off in turn to find out which one actually matters, with a follow-along notebook
- MiniGPT (Part 6) β Learning from a teacher: training a small MiniGPT to copy a bigger model's whole wheel of chances, why the teacher must share the student's pieces, and a tested finding: the most helpful teacher was not the best storyteller, but the one whose wheels the student could copy, with a follow-along notebook
- MiniGPT (Part 7) β Reading a longer row in the same memory: why attention's cost grows with the square of the row, how a sliding window caps it, why writing the window as a mask saves nothing, and a secret-word test of what a long row is for, and of how far a window really reaches, with a follow-along notebook
- Distillation (Part 2) β Turning a pretrained base model into a chat model with LoRA on a 64GB Mac Studio, then testing whether a second teacher, DeepSeek, produces a better one than GPT-3.5 did
- Distillation (Part 1) β How DeepSeek stands accused of breaking OpenAI's terms of service.
- MLX 1 β Using Apple's MLX framework to run and fine-tune large language models efficiently on Apple Silicon Macs