> 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/mo-xing/glm-5.3-flash.md).

# GLM-5.3-Flash：如何在本地运行

运行 Z.ai 的新 GLM-5.3-Flash（又名 ox-alpha）模型。

GLM-5.3-Flash，也称为 **`ox-alpha`**，是 Z.ai 全新的 320B 参数（18B 激活）多模态开源模型， **优于** [GLM-5.2](/docs/zh/mo-xing/glm-5.2.md)。GLM-5.3-Flash 是 [GLM-5.3](/docs/zh/mo-xing/glm-5.3.md) 并可与 **Claude Opus 4.8** 在编码和 agentic 基准测试中表现更强。你现在可以通过 llama.cpp 或 Unsloth 在本地于 102GB RAM/VRAM 上运行 1-bit 模型，或在 128GB 配置上运行 3-bit 模型，或 [Unsloth](https://github.com/unslothai/unsloth)。感谢 Z.ai 提供首日访问权限。

Unsloth 动态 **1-bit** （93GB）GGUF 保留 **71% 的 top-1 准确率** 同时 **体积小 85%** 相比 BF16（642GB）。动态 3-bit 体积小 76%，并保留 87% 的准确率。

​​<a href="/pages/3a5c1c6250cf1929017fb9f1311b3c838f9ef057#run-glm-5.3-flash-ox-alpha-locally" class="button primary">运行 GLM-5.3-Flash 指南</a><a href="https://unsloth.ai/download" class="button secondary">下载 Unsloth</a>

{% hint style="success" %}
**9月4日：** GLM-5.3-Flash 现在可在以下条件下运行： [**推理速度快 3.3 倍**](#faster-inference-and-mtp-support)**!**
{% endhint %}

{% columns %}
{% column width="50%" %}
GLM-5.3-Flash 使用 30T tokens 训练，并构建在一个新训练的基础模型之上。其混合稀疏与线性注意力架构在不牺牲准确率的情况下降低了长上下文服务成本。

你现在可以直接在以下环境中运行该模型： [Unsloth Desktop](#run-glm-5.3-flash-in-unsloth).
{% endcolumn %}

{% column width="50%" %}

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FqPVJA6BHcCJIkQQrDvpD%2FScreenshot%202026-08-27%20at%207.38.11%E2%80%AFAM.png?alt=media&amp;token=576a6810-3f32-4e4c-a0d8-8a84cb733a52" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### :gear: 使用指南

#### GLM-5.3-Flash 要求：

最小的 1-bit 量化可在 100GB RAM 上运行，而 3-bit 可在 128GB 设备上运行，例如 Mac 或 NVIDIA DGX Spark。\
**表：硬件要求** （单位 = 总内存：RAM + VRAM，或统一内存）

| 1-bit  | 2-bit  | 3-bit      | 4-bit      | 8-bit  | BF16   |
| ------ | ------ | ---------- | ---------- | ------ | ------ |
| 100 GB | 115 GB | 128-150 GB | 162-210 GB | 350 GB | 650 GB |

### 推荐设置

GLM-5.3-Flash 拥有 **3 种思考模式**：Low、High 和 Max。对于复杂任务请使用 Max Thinking。在 [Unsloth](#run-glm-5.2-in-unsloth-studio)中，你可以通过聊天区域的切换按钮轻松选择 Low、High 或 Max Thinking。

大多数使用场景请使用以下设置：

| 默认设置（大多数任务）         | DeepSWE              |
| ------------------- | -------------------- |
| `temperature` = 1.0 | `temperature` = 0.95 |
| `top_p` = 0.95      | `top_p` = 1.0        |

* **最大上下文窗口：** `1,048,576`.

#### 更改推理力度

GLM-5.3-Flash 默认使用 Max 推理。它也支持推理力度，其中 `reasoning_effort` 可以是 "low"、"high" 或 "max"。

### 更快的推理与 MTP 支持

截至 9月4日，我们已为我们的首日 [llama.cpp PR](https://github.com/ggml-org/llama.cpp/pull/27754)。我们实现了更快的解码路径，并额外加入 MTP 支持，使其最高可实现 **推理速度快 3.3×** 在长上下文长度下！

在以下环境中一切开箱即用： [Unsloth Desktop](#run-glm-5.3-flash-in-unsloth)，如有需要只需更新到最新版本即可。无需额外模块或 MTP 文件。或者，你也可以参考我们的 [llama.cpp](#run-glm-5.3-flash-in-llama.cpp) 指南。

<div><figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FRKSzhmcluWnoNwUxFS40%2Fimage.png?alt=media&amp;token=872cd9b0-e968-4a0d-977c-5315d0ca3e49" alt=""><figcaption></figcaption></figure> <figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F2tUYioUQhnyCv1pJTfld%2Fimage.png?alt=media&amp;token=b8bfd0de-22c8-4f30-8bfd-36656ae3c16e" alt=""><figcaption></figcaption></figure></div>

先在 1xB200 上使用 GLM-5.3-Flash UD-IQ1\_S，并先忽略 MTP，我们得到：

| 测试           | 基线 tok/s | 优化后 tok/s |
| ------------ | -------: | --------: |
| pp512        |  1121.80 |    1122.0 |
| tg32         |    62.79 |     63.10 |
| tg32 @ 4096  |    53.52 |     59.50 |
| tg32 @ 16384 |    41.02 |     57.99 |
| tg32 @ 65536 |    20.66 |     48.99 |

然后一旦加入 MTP，我们看到更大的收益，尤其是在更长的上下文中。不过我们应当在大约 n=2 处停止，因为更多的草稿 token 会使推理变慢。

| 提示词  | 关闭 MTP |  n=2 |  n=3 |  n=5 |
| ---- | -----: | ---: | ---: | ---: |
| 4096 |   58.6 | 86.5 | 80.2 | 63.7 |
| 16K  |   55.0 |      | 77.2 |      |

对于较短的上下文长度，我们仍然能看到加速，尽管最高只有快 1.6 倍。

<div><figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FmX36IJYj83OgfeQbCjh5%2Fimage.png?alt=media&amp;token=56e0ea43-df0b-47c4-8551-849921ef3913" alt=""><figcaption></figcaption></figure> <figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FCebn6JiIDQpQMSOz8nIX%2Fimage.png?alt=media&amp;token=1f76ea17-4970-45ae-b92e-3abce29628d7" alt=""><figcaption></figcaption></figure></div>

### 📈 量化分析

我们将 GLM-5.3-Flash 量化到 UD-IQ1\_S 1bit（93.09GB），在体积比 BF16（641.64GB）小 85% 的同时，仍保留 71% 的 top-1 准确率

Dynamic 2-bit UD-Q2\_K\_XL 为 109GB，体积小 83%，并保留 78% 的准确率。\
Dynamic 3-bit UD-IQ3\_XXS 为 120GB，体积小 81%，并保留 82% 的准确率。\
Dynamic 4-bit UD-Q4\_K\_XL 为 200GB，体积小 69%，并保留 93% 的准确率。

<div><figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FHB3bFxI8Cm3IOw3CRzvR%2Fglm53_flash_dynamic_ggufs_top1_accuracy_new_data.png?alt=media&amp;token=49882cca-1643-4e81-ad64-9d53c75ab93a" alt=""><figcaption></figcaption></figure> <figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FthGU2pMvyHLSsnOal90W%2Fglm53_flash_dynamic_ggufs_kld_benchmarks_new_data.png?alt=media&amp;token=204f70ee-cae2-4a63-b958-d4ec515f4ce3" alt=""><figcaption></figcaption></figure></div>

| 量化           | 大小     | top-1 准确率 | 平均 KLD   | KLD 99.9% |
| ------------ | ------ | --------- | -------- | --------- |
| UD-IQ1\_S    | 93.09  | 70.89%    | 0.669714 | 9.1658    |
| UD-IQ1\_M    | 97.58  | 73.06%    | 0.572413 | 8.5069    |
| UD-IQ2\_XXS  | 101.84 | 76.30%    | 0.450148 | 7.5764    |
| UD-Q2\_K\_XL | 108.72 | 78.34%    | 0.380134 | 6.8412    |
| UD-IQ3\_XXS  | 120.37 | 81.63%    | 0.283772 | 5.9611    |
| UD-Q3\_K\_XL | 147.54 | 86.25%    | 0.159697 | 4.0281    |
| UD-IQ4\_XS   | 156.82 | 88.18%    | 0.116652 | 3.1014    |
| UD-Q4\_K\_XL | 199.71 | 92.22%    | 0.049294 | 1.4894    |
| UD-Q5\_K\_XL | 240.31 | 94.35%    | 0.027052 | 0.8696    |
| UD-Q6\_K\_XL | 291.83 | 95.23%    | 0.019007 | 0.6267    |

## 在本地运行 GLM-5.3-Flash（Ox-Alpha）

你现在可以通过我们的，在 Unsloth Desktop 和 llama.cpp 中运行 GLM-5.3-Flash（Ox-Alpha）， [特定 PR](https://github.com/ggml-org/llama.cpp/pull/27754)。我们使用的是 3-bit `UD-IQ3_XXS` 在我们的演示中，因为它可适配 128GB 设备。你可以随意更改量化类型。

* Hugging Face： [GLM-5.3-Flash-GGUF](https://huggingface.co/unsloth/GLM-5.3-Flash-GGUF)

<a href="/pages/3a5c1c6250cf1929017fb9f1311b3c838f9ef057#run-glm-5.3-flash-in-unsloth" class="button primary">在 Unsloth Desktop 中运行</a><a href="/pages/3a5c1c6250cf1929017fb9f1311b3c838f9ef057#run-glm-5.3-flash-in-llama.cpp" class="button secondary">在 llama.cpp 中运行</a>

### 🦥 在 Unsloth 中运行 GLM-5.3-Flash

GLM-5.3-Flash 现在可以运行在 [Unsloth Desktop](#run-qwen3.8-in-unsloth-desktop)，一个用于本地 AI 的开源 UI 应用。 **Unsloth 会自动卸载到 RAM 并检测多 GPU 配置**。借助 Unsloth Desktop，你可以在本地运行模型，支持 **MacOS、Windows**、Linux 以及：

{% columns %}
{% column %}

* 搜索、下载、 [运行 GGUF](/docs/zh/xin/studio.md#run-models-locally)、MLX 和 safetensor 模型
* [**自我修复** 工具调用](/docs/zh/xin/studio/chat.md#auto-healing-tool-calling) + **网页搜索**
* [**代码执行**](/docs/zh/desktop.md#code-execution) (Python、Bash)
* [自动推理](https://unsloth.ai/docs/desktop#feature-deep-dive) 参数调优（temp、top-p 等）
* 通过 MLX 和 llama.cpp 实现快速 CPU + GPU 推理
* [训练 LLM](/docs/zh/xin/studio.md#no-code-training) 速度快 2 倍，VRAM 占用减少 70%
  {% endcolumn %}

{% column %}

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F6IXaXdTVyvbrnjehlxys%2Fkimik3.gif?alt=media&amp;token=31e1213b-d7da-46e9-bc7f-3a8c402513fc" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% stepper %}
{% step %}

#### 安装 Unsloth

最简单的上手方式是下载 [Unsloth Desktop 应用](/docs/zh/desktop.md)。支持 [macOS](/docs/zh/kai-shi-shi-yong/install/mac.md), [Windows](/docs/zh/kai-shi-shi-yong/install/windows-installation.md)，以及 [Linux](/docs/zh/kai-shi-shi-yong/install/linux.md).

<a href="https://unsloth.ai/download" class="button primary" data-icon="down-to-bracket">下载 Unsloth</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)

或者，如果你更喜欢手动安装：

MacOS、Linux、WSL：

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

Windows PowerShell：

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

{% endstep %}

{% step %}

#### 搜索并下载 GLM-5.3-Flash

前往 [Unsloth Chat](/docs/zh/xin/studio/chat.md) 或前往 Model Hub，在搜索栏中搜索 GLM-5.3-Flash，并下载你想要的模型和量化版本。

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FvOQkVli16S26FygKi2gw%2FScreenshot%202026-08-27%20at%204.18.11%E2%80%AFAM.png?alt=media&amp;token=df7914de-597e-43b9-8147-d568ccca0a51" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### 运行 GLM-5.3-Flash

使用 Unsloth 时，推理参数应会自动设置，但你仍然可以手动更改。你也可以编辑上下文长度、聊天模板和其他设置。

更多信息请查看我们的 [Unsloth 推理指南](/docs/zh/xin/studio/chat.md)。以下为 1-bit 运行示例：

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FwmOvZRaD61XCmMDBlHOD%2FScreenshot%202026-08-27%20at%207.08.52%E2%80%AFAM.png?alt=media&amp;token=4980f172-4323-43a0-9338-fe0e2ca749b6" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### 使用 Unsloth API 提供 GLM-5.3-Flash 服务

你可以使用 `unsloth run` 命令，并通过 API 使用 `llama-server` 运行时标志，包括上下文大小、GPU 层数、线程、采样、网络和工具配置。更多信息请参见我们的 [API 文档](/docs/zh/ji-chu/api.md) 或 [unsloth start](/docs/zh/ji-cheng/unsloth-start.md).

{% code overflow="wrap" %}

```bash
unsloth run --model unsloth/GLM-5.3-Flash-GGUF:UD-IQ3_XXS
```

{% endcode %}
{% endstep %}

{% step %}

#### Unsloth 已准备就绪

你还可以通过 Unsloth Desktop 使用 GLM-5.3-Flash 做许多其他事情，例如：

* **连接工具：** [Claude Code](/docs/zh/ji-chu/claude-code.md), [Codex](/docs/zh/ji-chu/codex.md), [网页搜索](/docs/zh/xin/studio/chat.md#advanced-web-search), [MCP](/docs/zh/ji-chu/mcp.md) 等等
* **训练模型：** 微调文本、扩散、 [嵌入](/docs/zh/ji-chu/embedding-finetuning.md)等更多内容
* **生成媒体：** 创建并训练 [图像](/docs/zh/ji-chu/diffusion-image.md)、视频、 [TTS](/docs/zh/ji-chu/text-to-speech-tts-fine-tuning.md) 在本地

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FNYiWxq5OX7NdPoqxp2Hu%2FScreenshot%202026-08-27%20at%2011.59.01%E2%80%AFPM.png?alt=media&amp;token=d9311caa-6935-47b3-a767-5c48e92b7c25" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### :llama: 在 llama.cpp 中运行 GLM-5.3-Flash

{% stepper %}
{% step %}
我们需要使用我们特定的 llama.cpp PR [这里](https://github.com/unslothai/llama.cpp/pull/61)。你也可以按照下面的构建说明进行操作。将 `-DGGML_CUDA=ON` 改为 `-DGGML_CUDA=OFF` 如果你没有 GPU，或者只想进行 CPU 推理。 **对于 Apple Mac / Metal 设备**，设置 `-DGGML_CUDA=OFF` 然后照常继续——Metal 支持默认开启。

```bash
apt-get update
apt-get install pciutils build-essential cmake curl libcurl4-openssl-dev -y
git clone --branch glm5next/upstream https://github.com/unslothai/llama.cpp
cmake llama.cpp -B llama.cpp/build \
    -DBUILD_SHARED_LIBS=OFF -DGGML_CUDA=ON
cmake --build llama.cpp/build --config Release -j --clean-first --target llama-cli llama-mtmd-cli llama-server llama-gguf-split
cp llama.cpp/build/bin/llama-* llama.cpp
```

{% endstep %}

{% step %}
要运行该模型，你可以执行：

{% code overflow="wrap" %}

```bash
pip install -U "huggingface_hub[cli]"
hf download unsloth/GLM-5.3-Flash-GGUF \
    --local-dir unsloth/GLM-5.3-Flash-GGUF \
    --include "*UD-IQ3_XXS*" # 2-bit 请使用 "*IQ2_XXS*"
```

{% endcode %}
{% endstep %}

{% step %}
然后运行它：

{% code overflow="wrap" %}

```bash
./llama.cpp/llama-cli \
    --model unsloth/GLM-5.3-Flash-GGUF/UD-IQ3_XXS/GLM-5.3-Flash-UD-IQ3_XXS-00001-of-00004.gguf \
    --temp 1.0 \
    --top-p 0.95 \
    --chat-template-kwargs '{"reasoning_effort":"max"}'
```

{% endcode %}

将 `UD-IQ3_XXS` 替换为你偏好的量化版本，例如 `IQ2_XXS` 在上传后用于 2-bit。
{% endstep %}
{% endstepper %}

## 📊 基准测试

<div><figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FfxF1H1wdQe3vKBepuhdA%2Fimage.png?alt=media&amp;token=b6e590cc-fafb-43b3-8e8b-0b318200cbcb" alt=""><figcaption></figcaption></figure> <figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FUy73TYPneV9NarmiUgJZ%2Fimage.png?alt=media&amp;token=8b344785-cb9b-4c61-bf55-4fdc77be1d0a" alt=""><figcaption></figcaption></figure></div>

| 基准                                  | GLM-5.3-Flash | GLM-5.2 | DeepSeek-V4-Vision-Exp | Opus 4.8 | GPT-5.6 Terra | Gemini 3.7 Flash |
| ----------------------------------- | ------------- | ------- | ---------------------- | -------- | ------------- | ---------------- |
| 编码                                  |               |         |                        |          |               |                  |
| Terminal Bench 2.1                  | 84.3          | 81.0    | 83.9                   | 85.0     | 87.4          | 85.8             |
| <p>DeepSWE</p><p>v1.1</p>           | 63.4          | 46.2    | 59.3                   | 58.0     | 69.6          | 65.3             |
| NL2Repo                             | 56.3          | 48.9    | 57.7                   | 69.7     | -             | -                |
| 智能体                                 |               |         |                        |          |               |                  |
| Toolathlon 已验证                      | 78.4          | 59.9    | 75.9                   | 76.2     | 74.9          | -                |
| <p>AutomationBench</p><p>v1.0.6</p> | 48.8          | 26.2    | 38.8                   | 41.0     | 37.2          | 52.3             |
| Agents' Last Exam                   | 26.3          | 20.4    | 27.3                   | 27.0     | 28.0          | -                |
| 带工具的 HLE                            | 55.3          | 54.7    | 55.1                   | 57.9     | -             | -                |
| GDPval-AA v2                        | 1773          | 1504    | 1675                   | 1582     | 1571          | 1527             |
| 视觉                                  |               |         |                        |          |               |                  |
| OfficeQA Pro                        | 62.4          | -       | 57.9                   | 48.9     | -             | -                |
| <p>CharXiv 推理</p><p>带工具</p>         | 89.4          | -       | 80.4                   | 89.9     | 88.0          | 88.7             |
| <p>Chartography</p><p>带工具</p>       | 78.0          | -       | 64.3                   | 75.0     | 68.0          | 65.0             |
| BabyVision                          | 53.4          | -       | 35.1                   | 46.8     | 61.6          | 70.9             |
| MVbench                             | 77.8          | -       | 69.4                   | 67.1     | 75.0          | 82.2             |
| MMVU                                | 80.5          | -       | 72.7                   | 67.4     | 75.8          | 82.3             |


---

# 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/mo-xing/glm-5.3-flash.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.
