New Tool Radar

Local AI

How to Install MLX LM with pip on an Apple Silicon Mac

Install mlx-lm with pip on an Apple Silicon Mac, then confirm it with mlx_lm.generate -h before you download any model.

Schematic diagram with three steps: open a terminal on an Apple Silicon Mac, run pip install mlx-lm, and confirm the install with mlx_lm.generate -h.

MLX LM is a Python package for generating text with large language models on Apple silicon, so the first step is getting it installed on a Mac with an M-series chip. The README gives the install as a single pip command, and the same page gives a quick way to confirm the install worked before any model is downloaded.

Install it

Use a Python environment you can throw away and rebuild, then run the README’s command:

pip install mlx-lm

The README also offers a conda route, conda install -c conda-forge mlx-lm, if you already manage environments with conda. Either way, install into a virtual environment rather than the system Python, so a later upgrade cannot break other tools.

Confirm the install

Run the help command the README points to:

mlx_lm.generate -h

A list of options means the package and its entry point installed correctly. The README says commands in mlx-lm typically take options for the model, sampling parameters and more, and that -h shows them. If the command is not found, your shell is not using the environment you installed into — reactivate it and check which python and pip show mlx-lm.

What to expect on first use

Running mlx_lm.generate --prompt "How tall is Mt Everest?" uses the default model, mlx-community/Llama-3.2-3B-Instruct-4bit, downloading it from the Hugging Face Hub on first use. That download needs internet and disk space, so do the first run when you are online. The README notes that large models need macOS 15.0 or higher for the wired-memory optimisation, and that a model much larger than the machine’s RAM will be slow.

Check What you should see If you do not see it
Help lists options mlx_lm.generate -h prints the option list The package is not on this Python’s path — reactivate the environment and reinstall
First generate The default model downloads and an answer prints No internet, or not enough free disk space for the model download
Apple silicon only You are on an M-series Mac MLX LM is a package for Apple silicon — it does not run on other computers

Expected result. We checked the mlx-lm README for the pip install command, the conda alternative, the quick-start generate command, the default model, and the -h check. We did not install or run mlx-lm, so the steps above are UNTESTED on this machine.

Limits

MLX LM runs on Apple silicon only. A first run downloads a model, so it is not an offline step. Do not judge the install by the download speed: a slow first generate is usually the model downloading, not a broken install.

Sources

Sources checked 2026-11-28.

See all