# Install mlx-lm with Homebrew

Run LLMs with MLX. Version 0.31.3 via Homebrew; verified 2026-06-20.

## Install

```sh
sudo av install brew:mlx-lm
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install mlx-lm
```

  Evidence: local Homebrew formula metadata

## Package facts

- **Package key:** brew:mlx-lm
- **Package manager:** Homebrew
- **Version:** 0.31.3
- **Source summary:** Run LLMs with MLX
- **Homepage:** <https://github.com/ml-explore/mlx-lm>
- **Repository:** <https://github.com/ml-explore/mlx-lm>
- **Last updated:** 2026-06-20T05:07:43Z
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- mlx_lm (alias)
- mlx_lm.awq (alias)
- mlx_lm.benchmark (alias)
- mlx_lm.cache_prompt (alias)
- mlx_lm.chat (alias)
- mlx_lm.convert (alias)
- mlx_lm.dwq (alias)
- mlx_lm.dynamic_quant (alias)
- mlx_lm.evaluate (alias)
- mlx_lm.fuse (alias)
- mlx_lm.generate (alias)
- mlx_lm.gptq (alias)
- mlx_lm.lora (alias)
- mlx_lm.manage (alias)
- mlx_lm.perplexity (alias)
- mlx_lm.server (alias)
- mlx_lm.share (alias)
- mlx_lm.upload (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 0.31.3
## Project history and usage

MLX LM is the language-model layer built on top of Apple's MLX array framework. The upstream project describes it as a Python package for generating text and fine-tuning large language models on Apple silicon with MLX. It packages common local-LLM workflows into command-line tools and Python APIs: generation, chat, model conversion, quantization, LoRA and full fine-tuning, benchmarking, prompt caching, upload/share flows, and a local server.

### Project history

Its ecosystem role is to make MLX usable for Hugging Face-style LLM work without each user wiring model loading, tokenization, generation loops, quantization, and fine-tuning scripts by hand. The README highlights Hugging Face Hub integration, quantizing and uploading models, low-rank and full fine-tuning with quantized models, and distributed inference and fine-tuning through MLX distributed support. The MLX examples repository points users from earlier LLM examples to MLX LM as the more fully featured package.

### How it is used

Adoption is tied to the Apple-silicon local-model community. The MLX Community organization on Hugging Face hosts ready-to-use model weights for MLX LM and related MLX projects, and Apple's WWDC material presents MLX LM as the package for running and fine-tuning large language models on Macs. In Homebrew it is a convenience package for users who want the MLX LLM command suite installed as normal CLI tools rather than only through Python packaging.

### Sources

- <https://developer.apple.com/videos/play/wwdc2025/298/>
- <https://formulae.brew.sh/formula/mlx-lm>
- <https://github.com/ml-explore/mlx-examples/blob/main/llms/README.md>
- <https://github.com/ml-explore/mlx-lm>
- <https://huggingface.co/mlx-community>


## Security Notes

broad file, network, media, or database tool signal. formula declares a Homebrew service.

- **Geiger risk:** orange / medium
- broad file, network, media, or database tool signal
- formula declares a Homebrew service


## Combined YAML source

View the package source record on GitHub. [combined/mlx-lm.yml](https://github.com/mxcl/pkgdb/blob/main/combined/mlx-lm.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
