> 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/docs.md).

# Unsloth 文档

Unsloth 是一个用于运行和训练 LLM 的开源框架。

Unsloth 让你通过开源 UI 在自己的本地硬件上运行并训练 AI 模型。

我们的文档将指导你在本地运行和训练自己的 LLM。

<a href="https://unsloth.ai/download" class="button primary" data-icon="down-to-bracket">下载</a><a href="/docs/zh/desktop.md#features" class="button secondary" data-icon="sparkles">功能</a><a href="https://github.com/unslothai/unsloth" class="button secondary" data-icon="github">GitHub</a>

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="image">封面图片</th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>DeepSeek-V4.1-Flash</strong></td><td>运行 10 月 17 日的新模型更新！</td><td><a href="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F4qwswsAZxmUaTEksSNJJ%2Fdeepseekv4.1.png?alt=media&amp;token=203263d6-e100-4c3f-9dd4-898391874d74">deepseekv4.1.png</a></td><td><a href="/docs/zh/mo-xing/deepseek-v4.1-flash.md">DeepSeek-V4.1-Flash</a></td></tr><tr><td><strong>Qwen3.8-27B</strong></td><td>在 Unsloth 中运行并训练 Qwen3.8-27B。</td><td><a href="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FSQJGLfV6lTdcvKUuBsjC%2Fqwen3.8%20logo.png?alt=media&amp;token=7942746b-409d-4064-8e66-221fceb920dd">qwen3.8 logo.png</a></td><td><a href="/docs/zh/mo-xing/qwen3.8.md">Qwen3.8-27B</a></td></tr><tr><td><strong>决策模型</strong></td><td>将任意模型转变为决策模型。</td><td><a href="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FAR7yKT6SAX6lxfycVoHb%2Ftrain%20decision%20model%20thumbnail.png?alt=media&amp;token=0f302911-51dc-4d01-bf77-87433ad3490c">train decision model thumbnail.png</a></td><td><a href="/docs/zh/ji-chu-zhi-shi/shi-yong-unsloth-xun-lian-ni-zi-ji-de-jue-ce-mo-xing.md">Train your own Decision Model</a></td></tr><tr><td><strong>NVIDIA Nemotron 3.5</strong></td><td>全新的 Bolt 和 Super VL 模型来了。</td><td><a href="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F0WXsJqWMrGcNRAP5h4q7%2Fnvidia%20nemotron%203.5%20bolt.png?alt=media&amp;token=15a3c95c-9a2b-4f02-b7ad-ac11070b7a28">nvidia nemotron 3.5 bolt.png</a></td><td><a href="/docs/zh/mo-xing/nemotron-3.5-bolt.md">NVIDIA Nemotron 3.5 Bolt</a></td></tr><tr><td><strong>Meta Muse Spark Open</strong></td><td>在本地运行 Meta 新的 SOTA 开源模型。</td><td><a href="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FQiRK6GPvPwgiesmclxOw%2Fmuse%20spark%20open%20logo.png?alt=media&amp;token=d4c4767d-b37b-4b67-859a-780245bd4f1c">muse spark open logo.png</a></td><td><a href="/docs/zh/mo-xing/muse-spark-open.md">Meta Muse Spark Open</a></td></tr><tr><td><strong>Qwen-Image-2.1</strong></td><td>在本地运行全新的 Turbo 图像模型！</td><td><a href="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FjBLXH1oRP52poQcN1pOn%2Fqwen%20image%202.1%20logo.png?alt=media&amp;token=ab285b72-146a-4409-b9ee-327fb78cb127">qwen image 2.1 logo.png</a></td><td><a href="/docs/zh/mo-xing/qwen-image-2.1.md">Qwen-Image-2.1</a></td></tr></tbody></table>

### ⚡ 快速入门

Unsloth 支持 macOS、Linux、 [Windows](/docs/zh/kuai-su-kai-shi/install/windows-installation.md), [NVIDIA](/docs/zh/kuai-su-kai-shi/install/pip-install.md), [AMD](/docs/zh/kuai-su-kai-shi/install/amd.md)、Intel 和 CPU 配置。请参见： [Unsloth 要求](/docs/zh/kuai-su-kai-shi/fine-tuning-for-beginners/unsloth-requirements.md)。为你的操作系统下载原生桌面应用：

<a href="https://unsloth.ai/download" class="button primary" data-icon="down-to-bracket">下载 Unsloth Desktop</a>

* <i class="fa-apple">:apple:</i> [下载适用于 macOS 版](https://unsloth.ai/download/mac)
* <i class="fa-windows">:windows:</i> [下载适用于 Windows 版](https://unsloth.ai/download/windows)
* <i class="fa-linux">:linux:</i> [下载适用于 Linux 版](https://unsloth.ai/download/linux)

或者，原生安装 Unsloth Studio，我们基于浏览器的 Web UI：

{% tabs %}
{% tab title="macOS、Linux、WSL" %}
**安装 Unsloth：**

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

使用相同命令进行更新。
{% endtab %}

{% tab title="Windows" %}
**安装 Unsloth：**

```powershell
irm https://unsloth.ai/install.ps1 | iex
```

使用相同命令进行更新。
{% endtab %}

{% tab title="Docker" %}
该 [Unsloth Docker 镜像](https://hub.docker.com/r/unsloth/unsloth) `unsloth/unsloth` 可在 Docker 上获取。 [阅读指南。](https://unsloth.ai/docs/get-started/install/docker)
{% endtab %}

{% tab title="Homebrew" %}
安装 Unsloth 桌面版：

{% code collapsedlinecount="10" %}

```bash
brew install --cask unsloth
```

{% endcode %}

更新 Unsloth 桌面版：

```bash
brew upgrade --cask unsloth
```

{% endtab %}

{% tab title="WinGet" %}
安装 Unsloth 桌面版：

```powershell
winget install --id UnslothAI.Unsloth -e
```

更新 Unsloth 桌面版：

```powershell
winget upgrade --id UnslothAI.Unsloth -e
```

{% endtab %}
{% endtabs %}

{% columns %}
{% column width="50%" %}
{% content-ref url="/pages/8d4117b244a368b8f80b1a9d079fa31360c8e823" %}
[Complete LLM Directory](/docs/zh/mo-xing/tutorials.md)
{% endcontent-ref %}

{% content-ref url="/pages/e722e86e330786e5915445b91f900d9f9e0ba067" %}
[Fine-tuning Guide](/docs/zh/kuai-su-kai-shi/fine-tuning-llms-guide.md)
{% endcontent-ref %}
{% endcolumn %}

{% column width="50%" %}
{% content-ref url="/pages/20805f6881460e7c3a088cff24acf0f1090f1984" %}
[Models](/docs/zh/kuai-su-kai-shi/unsloth-model-catalog.md)
{% endcontent-ref %}

{% content-ref url="/pages/2c2bb53a273009e389791ded9e28dd4769a55051" %}
[Unsloth API](/docs/zh/ji-chu-zhi-shi/api.md)
{% endcontent-ref %}
{% endcolumn %}
{% endcolumns %}

### 👾 Unsloth Start

{% columns %}
{% column width="58.333333333333336%" %}
[Unsloth Start](/docs/zh/ji-cheng/unsloth-start.md) 让你连接 [Claude Code](/docs/zh/ji-chu-zhi-shi/claude-code.md), [Codex](/docs/zh/ji-chu-zhi-shi/codex.md) 以及其他智能体通过 `unsloth start` 命令。

启动 Unsloth，加载一个模型，打开你的项目文件夹，然后运行：

```bash
unsloth start claude
```

替换 `claude` 为下面任意智能体：
{% endcolumn %}

{% column width="41.666666666666664%" %}

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FpXE6kCHjh8qOEaggf94M%2FScreenshot_20260718_122426.png?alt=media&amp;token=a59e4c8c-efdb-451b-b1f8-621955564f6d" alt="" width="563"><figcaption><p>Claude Code 在本地搭配 Qwen3.5 运行。</p></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

| 智能体                                                                | 命令                       |
| ------------------------------------------------------------------ | ------------------------ |
| <i class="fa-claude">:claude:</i> Claude Code                      | `unsloth start claude`   |
| <i class="fa-openai">:openai:</i> OpenAI Codex                     | `unsloth start codex`    |
| <i class="fa-vscode">:vscode:</i> Visual Studio Code               | `unsloth start vscode`   |
| <i class="fa-deepseek">:deepseek:</i> DeepSeek Harness             | `unsloth start dsh`      |
| <i class="fa-rectangle-vertical">:rectangle-vertical:</i> OpenCode | `unsloth start opencode` |
| <i class="fa-caduceus">:caduceus:</i> Hermes 智能体                   | `unsloth start hermes`   |
| <i class="fa-lobster">:lobster:</i> OpenClaw                       | `unsloth start openclaw` |

### 🦥 为什么选择 Unsloth？

* 我们直接与以下背后的团队合作 [gpt-oss](https://docs.unsloth.ai/new/gpt-oss-how-to-run-and-fine-tune#unsloth-fixes-for-gpt-oss), [Qwen3](https://www.reddit.com/r/LocalLLaMA/comments/1kaodxu/qwen3_unsloth_dynamic_ggufs_128k_context_bug_fixes/), [Llama 4](https://github.com/ggml-org/llama.cpp/pull/12889), [Mistral](https://huggingface.co/mistralai/Mistral-Medium-3.5-128B/discussions/18), [Gemma 1-3](https://news.ycombinator.com/item?id=39671146) 以及 [Phi-4](https://unsloth.ai/blog/phi4)，在此我们已经 **修复了关键错误** 这些错误大幅提升了模型准确率。比如 Andrej Karpathy 已经 [称赞了我们的工作](https://x.com/karpathy/status/1765473722985771335).
* Unsloth 简化了本地训练、推理、数据和部署
* Unsloth 支持 500+ 个模型的推理和训练： [视觉](/docs/zh/ji-chu-zhi-shi/vision-fine-tuning.md), [TTS](/docs/zh/ji-chu-zhi-shi/text-to-speech-tts-fine-tuning.md), [嵌入](/docs/zh/ji-chu-zhi-shi/embedding-finetuning.md), [强化学习](/docs/zh/kuai-su-kai-shi/reinforcement-learning-rl-guide.md)

### ⭐ 功能

Unsloth 让你运行并训练用于文本的模型， [音频](https://unsloth.ai/docs/basics/text-to-speech-tts-fine-tuning), [嵌入](https://unsloth.ai/docs/new/embedding-finetuning), [视觉](https://unsloth.ai/docs/basics/vision-fine-tuning) 以及更多内容。Unsloth 为推理和训练提供了许多关键功能：

#### 推理

* 运行并训练 LLM、扩散、嵌入、音频模型： [Qwen3.8](/docs/zh/mo-xing/qwen3.8.md), [Kimi K3](https://unsloth.ai/docs/models/kimi-k3)，MiniMax-H3， [Muse Glimmer](https://unsloth.ai/docs/models/muse-glimmer), [DeepSeek-V4](https://unsloth.ai/docs/models/deepseek-v4), [Gemma 4](https://unsloth.ai/docs/models/gemma-4).
* **智能体与工具：** 使用本地模型配合 [Claude Code](https://unsloth.ai/docs/basics/claude-code), [Codex](https://unsloth.ai/docs/basics/codex)，以及 [MCP](https://unsloth.ai/docs/basics/mcp)，包括工具调用和代码执行。
* **搜索与 RAG：** 使用私有且无限制的网页搜索、深度研究、自动压缩（滚动上下文窗口）和 RAG。
* **图像和视频：** 运行并训练 [图像](https://unsloth.ai/docs/basics/diffusion-image) 和视频扩散模型或多模态模型
* **远程与局域网：** 从任何设备访问你的本地模型，位于 [局域网](https://unsloth.ai/docs/basics/lan) 或者通过安全的 [Cloudflare](https://unsloth.ai/docs/basics/how-to-serve-local-llms-anywhere-secure-remote-access-with-cloudflare-and-unsloth) HTTPS。
* **连接：** 通过一个 [兼容 OpenAI 的 API](https://unsloth.ai/docs/basics/api)。还可连接你的 ChatGPT/Codex 订阅和 [云服务提供商](https://unsloth.ai/docs/integrations/connections)

#### 训练与部署

* **微调：** 使用……让 LLM、扩散、TTS 和嵌入模型训练速度快 2 倍，VRAM 占用减少 70%，并且 [且不损失准确率](https://unsloth.ai/blog#training)
* **全面支持：** 支持 [强化学习](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide)，LoRA、QLoRA、完整微调、预训练、RL、GRPO、DPO 和 FP8。
* **导出与部署：** [导出](https://unsloth.ai/docs/new/studio/export) 或部署模型，包括 [GGUF](https://unsloth.ai/docs/basics/inference-and-deployment/saving-to-gguf)、NVFP4、FP8 以及更多格式。
* **数据集：** 使用……从 PDF、CSV、DOCX 文件等构建数据集 [数据配方](https://unsloth.ai/docs/new/studio/data-recipe).

### **视频演示**

{% embed url="<https://www.youtube.com/watch?v=_1hgTTuber4>" %}

{% columns %}
{% column width="50%" %}
{% content-ref url="/pages/e1e43893beb1c3e2a075324e9a00800315b2e1a3" %}
[Unsloth 更新](/docs/zh/xin/changelog.md)
{% endcontent-ref %}

{% content-ref url="/pages/9a72670992feb75def412a693565c84a88c8a266" %}
[推理与部署](/docs/zh/ji-chu-zhi-shi/inference-and-deployment.md)
{% endcontent-ref %}
{% endcolumn %}

{% column width="50%" %}
{% content-ref url="/pages/4180d003e52f27564574c43829dd41c1236913b6" %}
[Unsloth Start](/docs/zh/ji-cheng/unsloth-start.md)
{% endcontent-ref %}

{% content-ref url="/pages/e658f01212ed739b6cc1648a22333767661730a1" %}
[Dynamic 3.0 GGUFs](/docs/zh/ji-chu-zhi-shi/dynamic-3.0-ggufs.md)
{% endcontent-ref %}
{% endcolumn %}
{% endcolumns %}

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fgit-blob-134302f2507d4313b9575917c9a43b0a0028856c%2Flarge%20sloth%20wave.png?alt=media" alt="" width="188"><figcaption></figcaption></figure>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://unsloth.ai/docs/zh/docs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
