MLX (Apple) iconMLX (Apple)

Apple's open-source NumPy-like array framework for machine learning on Apple silicon, with unified memory, lazy compute and mlx-lm for LLMs

29.1k+ GitHub Stars
v0.32.4 Latest Release (Oct 2026)
Up to 4x Faster First Token, M5 vs M4

Overview

MLX is "a NumPy-like array framework designed for efficient and flexible machine learning on Apple silicon," built by Apple machine learning research and released as open source (MIT) in December 2023. Arrays live in unified memory, so CPU and GPU work on the same data without copies, and computation is lazy until a result is needed. It has a Python API that tracks NumPy and a C++ API, with Swift and C APIs referenced by Apple. The companion mlx-lm package runs and fine-tunes LLMs on a Mac. On M5 chips MLX uses the GPU Neural Accelerators through Metal 4: Apple measured 3.33x to 4.06x faster time to first token than M4 and 1.19x to 1.27x faster token generation (macOS 26.2 or later). Recent releases add CUDA kernels too, a sign of a Linux CUDA backend in development, though Apple has not published a stable support statement for it. Latest release: v0.32.4 (October 2026), adding Python 3.15 support and 1-bit affine quantization on Metal.

The Verdict

Who Should Use MLX?

Best For

  • Developers running or fine-tuning LLMs locally on Apple silicon Macs
  • Researchers who like NumPy-style code with composable transforms
  • Swift and macOS app teams adding on-device ML

Not Ideal For

  • Training on NVIDIA clusters or TPUs (use PyTorch or JAX)
  • Teams that need a stable 1.0 API (MLX is still 0.x)
  • Developers without Apple silicon hardware

What's Great

  • Unified memory: no copies between CPU and GPU
  • Uses M5 Neural Accelerators for large speedups on prompt processing
  • mlx-lm makes local LLM inference and fine-tuning simple
  • Supported in the wider ecosystem: Transformers docs list mlx, Keras names MLX as a backend

Watch Out For

  • Built for Apple silicon first; CUDA support is still in development
  • Pre-1.0 versioning, so APIs can change between releases
  • Token generation speed is bound by memory bandwidth, so gains there are smaller

Pricing

View all features & details

Key Features

  • Unified memory model across CPU and GPU
  • Lazy computation
  • Python API close to NumPy, plus C++ (Swift and C referenced by Apple)
  • v0.32.4: VJP for scaled dot product attention, Metal 1-bit affine quantization, Neural Accelerator path for gather_qmm

Related Projects

  • mlx-lm: run and fine-tune LLMs with MLX (MIT)
  • M5 benchmarks: FLUX-dev 4-bit 1024px images over 3.8x faster than M4

Real-World Usage

Apple's Own Benchmarks

  • MacBook Pro M5 vs M4 (24GB): 3.33x to 4.06x faster time to first token
  • Token generation 1.19x to 1.27x faster (memory bandwidth 120 to 153 GB/s)

Ecosystem

  • Hugging Face Transformers docs list mlx among adjacent libraries
  • keras.io names MLX among Keras backends

How It Compares

Feature MLX PyTorch JAX Transformers
Focus ML on Apple silicon General deep learning Accelerator array compute Pretrained model definitions
Mac GPU Yes, unified memory MPS backend No (CPU only on macOS) Through PyTorch MPS
Versioning 0.x 2.x 0.x 5.x
License MIT BSD-style Apache-2.0 Apache-2.0

Sources: GitHub · PyTorch 2.15 · JAX install docs

Is this your tool? Add a badge