# 使用 Homebrew 安装 mlx-lm

查看 mlx-lm 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

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

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:mlx-lm
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/mlx-lm>
- **版本:** 0.31.3
- **来源摘要:** Run LLMs with MLX
- **主页:** <https://github.com/ml-explore/mlx-lm>
- **仓库:** <https://github.com/ml-explore/mlx-lm>
- **许可证:** MIT
- **源码归档:** <https://files.pythonhosted.org/packages/84/94/9a38d6b0c6fcca995b9136c94eb7da1e9c5165652edf228b96b29960fa7a/mlx_lm-0.31.3.tar.gz>
- **最后更新:** 2026-06-20T05:07:43Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

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

## 依赖

- certifi
- libyaml
- mlx
- numpy
- protobuf
- python@3.14
- sentencepiece

## 构建依赖

- pkgconf
- rust

## 安装行为

- post-install 钩子: 未定义
- 服务: declared
- Bottle: 可用 于 arm64_sequoia, arm64_sonoma, arm64_tahoe

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.31.3
- 管理器更新时间: 2026-06-20
- 本地数据: OK
- 上游仓库: https://github.com/ml-explore/mlx-lm
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

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.

### 项目历史

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.

### 使用方式

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.

### 来源

- <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>


## 安全说明

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

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** mlx-lm
- **Version Scheme:** 0
- **Revision:** 2
- **Head Version:** HEAD
- **Requirements:** macos
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [MCP tool packages](https://pkg.so/zh-hans/mcp-tools/) - Mentions MCP or Model Context Protocol.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [AI and agent packages](https://pkg.so/zh-hans/ai-agent-tools/) - Matched AI model, agent, coding-agent, orchestration, or MCP metadata.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [protobuf](https://pkg.so/zh-hans/brew/protobuf/) - Runtime dependency declared by Homebrew.
- [numpy](https://pkg.so/zh-hans/brew/numpy/) - Runtime dependency declared by Homebrew.
- [mlx](https://pkg.so/zh-hans/brew/mlx/) - Runtime dependency declared by Homebrew.
- [sentencepiece](https://pkg.so/zh-hans/brew/sentencepiece/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [rust](https://pkg.so/zh-hans/brew/rust/) - Build dependency declared by Homebrew.
- [llama.cpp](https://pkg.so/zh-hans/brew/llama-cpp/) - Shares pkgdb curated category or tags: ai, cli, machine-learning, model-tools.
- [llm](https://pkg.so/zh-hans/brew/llm/) - Shares pkgdb curated category or tags: ai, cli, large-language-models, model-tools.
- [ramalama](https://pkg.so/zh-hans/brew/ramalama/) - Shares pkgdb curated category or tags: ai, cli, inference, model-tools.
- [localai](https://pkg.so/zh-hans/brew/localai/) - Shares pkgdb curated category or tags: ai, cli, inference, model-tools.
- [rapid-mlx](https://pkg.so/zh-hans/brew/rapid-mlx/) - Shares pkgdb curated category or tags: ai, cli, mlx, model-tools.
- [djl-serving](https://pkg.so/zh-hans/brew/djl-serving/) - Shares pkgdb curated category or tags: ai, cli, inference, machine-learning, model-serving.
- [ollama](https://pkg.so/zh-hans/brew/ollama/) - Shares pkgdb curated category or tags: ai, cli, model-tools.
- [llmfit](https://pkg.so/zh-hans/brew/llmfit/) - Shares pkgdb curated category or tags: ai, cli, model-tools.
- [oterm](https://pkg.so/zh-hans/brew/oterm/) - Both packages touch the same language runtime or ecosystem. Shared terms: ai, certifi, chat, cli, libyaml.
- [pocket-tts](https://pkg.so/zh-hans/brew/pocket-tts/) - Both packages touch the same language runtime or ecosystem. Shared terms: ai, certifi, cli, learning, libyaml.

## 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)


## 来源

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