Skip to content
BENIBIX Learn

MLX

AI💻 Running LocallyLocal Runtimes

Also known as Apple MLX, MLX LM, mlx-lm

Apple's free tool kit. It runs AI models fast on Macs with Apple chips.

Think of it like

It is like a toolbox made for one brand of bike. Every tool fits just right.

Example

Jack has a Mac with 32 GB of shared memory. He runs a 4-bit model with MLX LM. The model can use most of that pool, not just a small graphics card.

Why it matters

A Mac's shared memory can hold bigger models than many graphics cards. MLX is built to use all of it.

Definition

MLX is a free, open-source tool kit from Apple's machine learning team for running and training models on Macs with Apple chips. These chips share one pool of memory between the main chip and the graphics part. So data does not have to be copied between them. A partner tool, MLX LM, runs and fine-tunes language models with one command. Many open models are shared in MLX form on model hubs. Some local apps can run MLX models as well as GGUF ones.

Example code

bash
pip install mlx-lm
mlx_lm.generate --prompt "How tall is Mt Everest?"
Install MLX LM, then get an answer from its default small model.
MLX sits in the runtime layer, on Macs with Apple chips.

Common mistake

Mixing up the files. An MLX model and a GGUF model are different files, so pick the one your app runs.

Key takeaways

  1. 1
    Made for Apple chips. It uses the shared memory pool.
  2. 2
    MLX LM. Language models in one command.
  3. 3
    Its own files. Not the same as GGUF.