Glossary / How it hears you

MLX

Also: Apple MLX, MLX framework

Published

Definition

MLX is an open-source array framework for machine learning on Apple silicon, made by Apple’s machine learning research team. It is what many language models and speech models use to run on a Mac’s own chip.

If you have downloaded a model for a Mac and its name ends in MLX, or it came from a collection of MLX models, this is what that means: the weights have been converted to the format this framework reads.

MLX is a tool for developers and researchers, not something you install to use an app. An app that uses it carries it inside. It is released under the MIT license, and the first public version appeared at the end of 2023.

Why it suits a Mac

Apple’s description names one difference from other frameworks: the unified memory model. On Apple silicon the processor and the graphics chip share one pool of memory. MLX arrays live in that shared memory, so work can move between the two without copying data back and forth.

On most other computers a graphics card has its own, separate memory, and a model has to fit in it. On a Mac a model can use the memory the whole machine has, which is why a laptop can run models that would otherwise need a dedicated card.

What it runs on

Apple’s documentation says operations can run on the CPU and the GPU. It does not list the Neural Engine. To install it on a Mac you need Apple silicon and macOS 14 or later.

The same documentation now also describes builds for Linux, including one for Nvidia graphics cards, so MLX is no longer for Apple hardware only. Apple silicon remains what it was designed around.

The MLX family

MLX itself only handles arrays and the arithmetic on them. The packages built on top are what most people meet.

  • MLX LM, from the same team at Apple, for generating text with large language models and fine-tuning them.
  • MLX Whisper, from Apple’s examples, for speech recognition with Whisper.
  • MLX Swift, which lets a Mac or iPhone app written in Swift use MLX directly.
  • Community libraries for audio and speech, which are built on MLX but are not Apple’s.

MLX models and quantization

Model names in MLX collections often end in 4bit or 8bit. That is quantization: the weights are stored with fewer bits each, which makes the download smaller and the model lighter on memory, at some cost in accuracy. The MLX tools can produce these builds when a model is converted.

MLX and Core ML

Apple has two frameworks that run models on its devices, and they are for different jobs. Apple describes MLX as an open-source array framework for experimenting with, training and fine-tuning generative models on Apple silicon. It describes Core ML as the way to integrate machine learning models into an app.

In practice many apps use both: Core ML for a model that suits the Neural Engine, and MLX for a large language or speech model that runs on the graphics chip.

Questions people ask.

What does MLX stand for?

Apple does not give an expansion. It describes MLX as an array framework for machine learning on Apple silicon.

Does MLX work on Intel Macs?

No. On a Mac, Apple’s documentation requires Apple silicon and macOS 14 or later.

Does MLX use the Neural Engine?

Apple’s documentation says MLX operations run on the CPU and the GPU. It does not list the Neural Engine.

Is MLX free?

Yes. It is open source under the MIT license.

Do I need to install MLX to use an app built with it?

No. An app that uses MLX includes it. Installing MLX yourself is for writing code or running models from the command line.

What is an MLX model?

A model whose weights have been converted to the format MLX reads, often quantized to 4 or 8 bits so that it fits comfortably in a Mac’s memory.

Related terms

Your voice was always faster.

7 days free, then $19 USD once. No account, no subscription, nothing uploaded.

macOS 14 or later · Apple silicon