ml-explore/mlx
Machine LearningA NumPy-style array framework with lazy execution and unified memory, built for training and running models on Apple silicon.
MLX is worth a look if your model code needs to run on Apple laptops and desktops without a separate accelerator-tuned path. It is an array framework, not a wrapper around another runtime: you write NumPy-like Python (or C++, C, or Swift) and the same arrays execute on CPU or GPU in shared memory.
The problem
A researcher prototyping on a MacBook typically has to choose between CPU-only NumPy, which leaves the GPU unused, or a GPU framework that expects a discrete accelerator and explicit data transfers. The usual workaround is to prototype small on the laptop, then move to a Linux GPU box for anything that needs to train a real model. MLX changes the middle step: the same array code runs on the integrated GPU, and arrays live in shared memory, so moving an operation between CPU and GPU does not require copying data. The result is that training loops, fine-tuning runs and inference on models such as LLaMA or Stable Diffusion can be exercised on the machine in front of you, using the examples repository as a starting point.
What's different
The design borrows familiar surfaces: the Python API tracks NumPy, while mlx.nn and mlx.optimizers track PyTorch conventions, so porting existing code is mostly mechanical. What distinguishes it underneath is the combination of lazy computation and composable function transforms. Arrays are only materialized when needed, graphs are built dynamically, and changing argument shapes does not trigger a slow recompile. Automatic differentiation, vectorization and graph optimization can be composed, which is the style JAX users will recognize. Unified memory is the other notable mechanism: the same array is accessible from both CPU and GPU without an explicit transfer, which removes a whole class of device-placement bugs from everyday code.
The trade-off is that this is a framework, not a drop-in replacement for an existing PyTorch training stack. Ecosystem coverage matters: the supplied examples cover transformer language-model training, LLaMA generation and LoRA fine-tuning, Stable Diffusion and Whisper, but a project depending on less common PyTorch extensions will need porting work. The README is explicit that the framework is designed by researchers for researchers, with conceptual simplicity and extensibility as goals rather than maximal operator coverage or large-scale distributed training.
Who should try it
A good fit is someone doing model research or fine-tuning on an Apple machine who wants GPU execution with NumPy/PyTorch-shaped code and values the ability to poke at a simple framework. It also fits developers who need the Swift or C++ bindings for on-device inference in Apple applications. A poor fit is a team already invested in a PyTorch training pipeline with custom CUDA kernels and distributed multi-node jobs; those dependencies do not map cleanly, and the README does not present MLX as a large-scale training replacement.
Requirements and limitations
The Apple silicon path is the primary target, installed with pip install mlx on macOS. Linux users now have documented alternatives: pip install mlx[cuda] for a CUDA backend, or pip install mlx[cpu] for a CPU-only build. Per a commenter in the CUDA announcement thread, that backend targets Linux with CUDA 12 and SM 7.0 (Volta) and up, pointing to the installation docs. The direction is worth reading carefully: MLX programs can use CUDA hardware, not CUDA programs running on Apple silicon. Building from source is documented for the C++ and Python APIs, and the quick start guide covers the basics.
Ongoing limitations are the flip side of the design. Lazy evaluation means debugging benefits from understanding when arrays materialize, and the framework's priority on simplicity over breadth means operator and library coverage should be checked against your model before committing a project to it. The CUDA path is comparatively new; whether it matches the Apple silicon experience for real workloads is not something the provided material establishes.
HotRepo's take
HotRepo only tracked this project on 2026-10-24 (+18 stars) and 2026-10-25 (+19 stars), two daily-board observations on a repository created in late 2023. That sample is insufficient to judge trending persistence, and the HN thread with 548 points and 203 comments on the CUDA addition measures discussion volume, not adoption. The concrete thing to verify before betting on it is whether the CUDA backend supports the GPUs and Linux setup you actually have.
Hacker News
Written by AI from the project's README, updated October 25, 2026. The project's own docs are the source of truth.