# MLX

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

**Field:** Artificial Intelligence  
**Category:** Running Locally  
**Also known as:** Apple MLX, MLX LM, mlx-lm

## Think of it like

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

## 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

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.

## 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.

## Why it matters

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

## Common mistake

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

## Three principles

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

## Related terms

- [Inference Engine](https://learn.benibix.com/term/ai/inference-engine)
- [LM Studio](https://learn.benibix.com/term/ai/lm-studio)
- [GGUF](https://learn.benibix.com/term/ai/gguf)
- [Local AI Model](https://learn.benibix.com/term/ai/local-ai-model)
- [Fine-Tuning](https://learn.benibix.com/term/ai/fine-tuning)
- [Random Access Memory (RAM)](https://learn.benibix.com/term/infrastructure/random-access-memory)

![Four layers of a local AI setup, top to bottom. A chat screen, such as Open WebUI or Jan. An OpenAI-compatible API on the same machine, at an address like localhost:11434/v1. A runtime that runs the model, such as Ollama, llama.cpp, LM Studio, Jan or MLX. And the weights file it loads, as GGUF or safetensors. Under it all sits your own hardware.](https://learn.benibix.com/diagrams/ai4-local-stack.svg)

---

Source: https://learn.benibix.com/term/ai/mlx
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
