MLX

MLX

MLX is a software library developed by Apple that allows programmers to run AI models directly on Macs, iPhones, and iPads. It is specifically tailored to Apple's own chips and takes advantage of their distinctive feature that the processor and graphics unit share the same memory.

MLX is a toolkit for programmers, released by Apple in December 2023. It allows programs to be written that learn from examples and then solve tasks – such as writing texts or generating images. Such toolkits are called frameworks: they provide ready-made building blocks so that nobody has to program every computation themselves. What makes MLX special is that it was built for Apple’s own chips, meaning the processors in Macs, iPhones, and iPads. The software is freely available, anyone may use it for free and inspect the program code.

Why it matters

For years, AI development ran almost exclusively on graphics cards made by Nvidia. The frameworks typically used for this required that hardware. Anyone working on a Mac was at a disadvantage. MLX changes this for a specific area: you can run finished models on your own computer instead of using them over the internet on someone else’s servers.

This has two practical consequences. First, your own data stays on your own device. Anyone asking an AI about confidential matters doesn’t send it to a data center. Second, using it costs nothing extra, because no server time needs to be paid for. For Apple itself, MLX is also strategic: it makes Apple’s own chips more attractive to AI developers.

How it works

The central trick lies in Apple’s chip design. In a normal PC, the graphics card has its own memory, separate from the main memory. Data must constantly be copied back and forth between the two. This costs time and limits how large a model is allowed to be.

Apple’s chips instead use shared memory for all computing units. You can imagine this like a desk where several people sit and use the same documents. Nobody has to make copies and pass them along. MLX is designed exactly for this and avoids this copying entirely.

Added to this is a second principle: MLX doesn’t compute tasks immediately, but first collects them and then plans the execution. This allows several steps to be combined, which saves computing time. MLX is operated through the programming language Python, which is also common in the rest of the AI world. The structure is deliberately similar to well-known frameworks, so that people switching over quickly find their way around.

Where you encounter the term

In everyday life, you mostly encounter MLX in apps that run AI models locally on the Mac. Programs like LM Studio allow you to download a language model and chat with it offline – in the background, MLX is often at work. On the platform Hugging Face, a kind of library for freely available AI models, there are thousands of versions specially prepared for MLX.

In the news, MLX usually appears in reports about Apple’s role in the AI competition. The company is considered a latecomer compared to Google, Microsoft, and OpenAI. MLX is one building block of the counter-strategy: AI is not meant to happen in the cloud, but on the device in the user’s hand. For investors and observers, the framework therefore serves as an indication of which path Apple is taking. Anyone learning to program themselves and owning a Mac can, by the way, install MLX with a single command and start their first experiments.

Subscribe free. Unsubscribe the second it sucks.

High-signal news across AI, business, UX, and tech. Every morning.