# MLX (Apple)

> Canonical: https://skillalmanac.com/glossary/mlx | Verification status: pending | Index status: not offered to search engines

MLX is an open-source array framework for machine learning on Apple silicon, published by Apple's machine learning research group. It has a NumPy-style Python API, and its MLX LM package runs and fine-tunes language models.

Also called: Apple MLX, MLX framework.

## In plain language

MLX is software from Apple that lets programmers run and train machine-learning models on Macs with Apple's own chips. A companion package, MLX LM, downloads a language model and generates text from it on your own machine, so a prompt need not leave your computer. The limit is hardware and memory: a model has to fit in your Mac's memory, and MLX is a toolkit for developers rather than a finished chat app. Models also need to exist in a format it can load; many have been converted and shared by a community on Hugging Face. Check each model's licence before using it.

## Technical definition

The MLX documentation describes a NumPy-like array framework with composable function transformations for automatic differentiation, automatic vectorisation and computation graph optimisation. Computation is lazy: arrays are materialised only when needed. Arrays live in unified memory, so operations on any supported device need no data copy. The GitHub README adds C++, C and Swift APIs, dynamic graphs, a CUDA backend or CPU-only package on Linux, and an MIT licence (per the repository LICENSE file). The mlx-lm package supports generation, LoRA fine-tuning and conversion with quantisation, per the Hugging Face page.

## How it shows up when you use agents

MLX appears when someone wants a language model to run locally on a Mac. A tool or script calls MLX LM to load a model from the Hugging Face Hub and generate text, and a local coding setup can point to that. Hosted coding agents call a model running elsewhere; see [Self-hosted LLM](/glossary/self-hosted-llm). MLX is a separate route for open-weight models you run yourself.

What breaks when it is misunderstood: people assume any model will load. MLX needs weights in a format it supports, and the model must fit in memory. A converted or quantised copy behaves differently from the original, so test on your own task. See [Quantization](/glossary/quantization) and [Self-hosted LLM](/glossary/self-hosted-llm).

Next action: size the model against your Mac's memory first, then try one short generation before wiring it into a tool.

## Common confusions

- **MLX versus MLX LM.** MLX is the array framework. MLX LM is a package built on it for running and fine-tuning language models.
- **MLX versus Ollama or llama.cpp.** They are separate projects with different formats and interfaces. See [Ollama](/glossary/ollama) and [llama.cpp](/glossary/llama-cpp). This page does not compare them.
- **Apple silicon versus other hardware.** The README describes MLX as an array framework for machine learning on Apple silicon and lists Linux options.
- **Framework versus model.** MLX contains no model of its own. Models come from elsewhere, such as the Hub.
- **Myth.** That running locally removes the need to check outputs. A local model can still make errors.

## Worked examples in this catalogue

### [local-model-sizing](https://skillalmanac.com/skills/skill-almanac/local-model-sizing)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The skill works out whether an open-weight language model will run on a given GPU, Mac or PC, with a script that computes weight, KV-cache and overhead memory per quantisation.

Why it exercises the concept: Before running a model with MLX LM on a Mac, you need to know whether it fits in memory. The skill is general and does not mention MLX itself.

### [Self-Hosting an AI Agent: What You Take On](https://skillalmanac.com/learn/self-hosted-ai-agent-considerations)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A guide on what you own when an AI agent runs on your machine: model memory, network exposure, file access and vetting skills.

Why it exercises the concept: Running a model locally through MLX LM is one way to self-host. The guide covers the wider responsibilities and is not specific to Apple hardware.

### [huggingface-datasets](https://skillalmanac.com/skills/huggingface/huggingface-datasets)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The skill reads Hugging Face datasets through the Dataset Viewer API: metadata, rows, search and filters.

Why it exercises the concept: It is adjacent: MLX LM draws models from the Hugging Face Hub, while this skill reads datasets there. It does not load MLX models.

## Related terms

- [Quantization](https://skillalmanac.com/glossary/quantization.md)
- [LoRA (low-rank adaptation)](https://skillalmanac.com/glossary/lora.md)
- [Hugging Face](https://skillalmanac.com/glossary/hugging-face.md)
- [Self-hosted LLM](https://skillalmanac.com/glossary/self-hosted-llm.md)
- [llama.cpp](https://skillalmanac.com/glossary/llama-cpp.md)
- [Ollama](https://skillalmanac.com/glossary/ollama.md)

## Sources

- [MLX documentation](https://ml-explore.github.io/mlx/build/html/index.html), Apple Machine Learning Research (accessed 2026-11-24)
- [ml-explore/mlx: MLX, an array framework for machine learning](https://github.com/ml-explore/mlx), GitHub (Apple) (accessed 2026-11-24)
- [Using MLX at Hugging Face](https://huggingface.co/docs/hub/en/mlx), Hugging Face (accessed 2026-11-24)
- [MLX LICENSE](https://github.com/ml-explore/mlx/blob/main/LICENSE), GitHub (Apple) (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above. Independent source and example-target verification is pending. [Glossary index](https://skillalmanac.com/glossary.md).
