> For the complete documentation index, see [llms.txt](https://unsloth.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unsloth.ai/docs/zh/kai-shi-shi-yong/install/mac.md).

# 在 MacOS 上安装 Unsloth

要安装 **Unsloth Desktop** 到你的 Mac 上，请按照以下步骤操作。

{% stepper %}
{% step %}

### 下载

### <a href="https://unsloth.ai/download/mac" class="button primary" data-icon="apple">下载适用于 Mac 的 Unsloth</a>

{% endstep %}

{% step %}

### 安装

1. 打开 Unsloth 安装程序（`.dmg` 文件）
2. 将 Unsloth 拖到 **应用程序**
3. 启动应用并等待安装完成
   {% endstep %}

{% step %}

### 选择一个模型

打开顶部的“选择模型”下拉菜单或“模型库”标签，选择一个适合你设备的模型和量化方案，然后下载。下载完成后即可开始聊天——无需任何设置。

<figure><img src="/files/ee716919ab359455030e8acd4d55b5ec13ca328d" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Unsloth 现在已准备就绪

要开始聊天，只需输入一条消息并按 Enter。

* **连接工具：** [Claude Code](/docs/zh/ji-chu-zhi-shi/claude-code.md), [Codex](/docs/zh/ji-chu-zhi-shi/codex.md)、网页搜索、 [MCP](/docs/zh/ji-chu-zhi-shi/mcp.md) 等更多工具
* **训练模型：** 微调文本、扩散、嵌入等更多模型
* **生成媒体：** 在本地创建并训练图像、视频、TTS

<figure><img src="/files/b0dfb852351654c29812a5aa23885913432eaa10" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### 手动安装 Unsloth Studio

下面的命令将安装 **Unsloth Studio**，即基于浏览器的 Web UI。它不会安装 Unsloth Desktop 或基于代码的 Unsloth Core 软件包。

#### 安装 Unsloth Studio

```bash
curl -fsSL https://unsloth.ai/install.sh | sh
```

使用相同的命令来 **更新**.

### 启动

每次你想再次启动 Unsloth 时：

```bash
unsloth studio -H 0.0.0.0 -p 8888
```

如需查看详细的 Unsloth Studio 安装说明和要求， [请查看我们的指南](/docs/zh/xin/studio/install.md).

## 卸载

### 桌面版卸载

1. 如果 Unsloth 正在运行，请先关闭它
2. 打开 **Finder**
3. 前往 **应用程序**
4. 找到 Unsloth
5. 右键点击 → **移到废纸篓**

#### Unsloth Studio 手动卸载

完全移除 Unsloth Studio 的推荐方式是使用你操作系统的卸载脚本。它会停止任何正在运行的服务器，移除应用、CLI 命令、启动器数据、快捷方式，以及平台特定条目（macOS `.app` 捆绑包 + Launch Services；Windows 开始菜单 + 注册表 + PATH）：

```shellscript
curl -fsSL https://raw.githubusercontent.com/unslothai/unsloth/main/scripts/uninstall.sh | sh
```

如果你只想移除某些特定部分：

**1. 仅移除应用** （保留历史记录、聊天、检查点和导出内容不变）：

* `rm -rf ~/.unsloth/studio/unsloth_studio`

**2. 完全移除 Unsloth** （保留其他 Unsloth 工具不变）：

* &#x20;`rm -rf ~/.unsloth/studio`

**3. 移除所有与 Unsloth 相关的内容：**

* `rm -rf ~/.unsloth`

{% hint style="warning" %}
注意：第 3 步会删除历史记录、聊天、模型检查点和导出内容中的所有内容。此操作无法撤销。
{% endhint %}

**4. 移除快捷方式和符号链接：**

```shellscript
rm -rf ~/Applications/Unsloth\ Studio.app ~/Desktop/Unsloth\ Studio
```

**5. 移除 CLI 命令：**

* `rm -f ~/.local/bin/unsloth`

{% hint style="info" %}
注意：第 1-5 步不会影响你下载的 HF 模型文件。如果你想释放那部分空间，请查看下方删除缓存的 HF 模型文件。
{% endhint %}

### **删除模型文件**

你可以通过模型搜索中的垃圾桶图标删除旧模型文件，或者从 Hugging Face 缓存目录中移除相应的缓存模型文件夹。

默认缓存位置是：

```bash
~/.cache/huggingface/hub/
```

如果 `HF_HUB_CACHE` 或 `HF_HOME` 已设置，请改用该位置。你可以通过以下命令检查：

```bash
echo ${HF_HUB_CACHE:-${HF_HOME:-${XDG_CACHE_HOME:-$HOME/.cache}/huggingface}/hub}
```

要删除特定模型，请移除其文件夹（例如 `models--unsloth--Llama-3.1-8B-bnb-4bit`）从缓存目录中删除。要清除所有缓存模型：

```bash
rm -rf ~/.cache/huggingface/hub/
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://unsloth.ai/docs/zh/kai-shi-shi-yong/install/mac.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
