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

# Qwen3.8 - 如何在本地运行

Qwen3.8 是 Qwen 的新模型家族，包含 Qwen3.8-**27B**，Qwen3.8-**2.4T-A95B** 以及 Qwen3.8-**Max**。Qwen3.8-27B 具备 **视觉** 和推理能力，拥有 **256K 上下文** 窗口，并且可以在本地 **17GB RAM/VRAM** 配置上运行。Qwen3.8 在智能体编码、视觉和聊天任务上表现出色，并且现在可以通过 Unsloth GGUF、NVFP4 和 [Unsloth Desktop](#run-qwen3.8-in-unsloth-desktop)运行。Qwen3.8-2.4T-A95B 是一个 2.4T 参数（95B 激活）的模型，可与 GPT-5.6 Sol 竞争。

**8月19日更新：** Qwen3.8-27B GGUF 现在使用 [Unsloth Dynamic V3.0](/docs/zh/ji-chu-zhi-shi/dynamic-3.0-ggufs.md) ，在相同大小下可提升 10% 的准确率，整体明显优于其他方案。

{% columns %}
{% column %} <a href="/pages/d03b47babbad2abc249a0979b2d44af1f02bbd20#run-qwen3.8-guide" class="button primary">运行 Qwen3.8 指南</a><a href="https://unsloth.ai/download" class="button primary">下载 Unsloth</a>

感谢 Qwen 提供首日访问权限。Unsloth 量化还包括：

* **开发者角色支持** 用于像 Codex 这样的智能体工具
* [已启用 MTP](/docs/zh/mo-xing/mtp.md) 以实现快速推理
* **工具调用：** 改进了对嵌套对象的解析，使工具更容易成功

完整精度的 Qwen3.8-2.4T-A95B 需要 4.9TB 存储和 1-bit [Unsloth](https://github.com/unslothai/unsloth) Dynamic GGUF 仅需 **397GB（小 91%）**，而更大的 IQ1\_S 需要 508GB。
{% endcolumn %}

{% column %}

<figure><img src="/files/a784ba37c1a67db035da56d244db09245361d940" alt=""><figcaption><p>在 Unsloth Desktop 中运行动态 4-bit 的 Qwen3.8-27B</p></figcaption></figure>

Unsloth 量化：

* [Qwen3.8-**27B**-GGUF](https://huggingface.co/unsloth/Qwen3.8-27B-GGUF)
* [Qwen3.8-27B-**NVFP4**](https://huggingface.co/unsloth/Qwen3.8-27B-NVFP4)
  {% endcolumn %}
  {% endcolumns %}

### :gear: 使用指南

#### Qwen3.8-27B 要求：

Qwen3.8-**27B** 4-bit 量化可在 16-19GB VRAM 上运行，例如 RTX 5080、4090 或配备 24GB RAM 的 Mac。\
**表：硬件需求** （单位 = 总内存：RAM + VRAM，或统一内存）

<table><thead><tr><th>1-bit</th><th>2-bit</th><th>3-bit</th><th>4-bit</th><th width="128">6-bit</th><th>8-bit</th><th>BF16</th></tr></thead><tbody><tr><td>7-8 GB</td><td>9-11 GB</td><td>12-14 GB</td><td>16-19 GB</td><td>23-26 GB</td><td>31 GB</td><td>56 GB</td></tr></tbody></table>

#### Qwen3.8-**2.4T** 要求：

* [Qwen3.8-**2.4T-A95B**-GGUF](https://huggingface.co/unsloth/Qwen3.8-2.4T-A95B-GGUF)

| 动态 1-bit XXXS | 动态 1-bit 标准版 | 动态 2-bit | Q8\_0  | BF16（无损） |
| ------------- | ------------ | -------- | ------ | -------- |
| 397GB         | 508GB        | 657 GB   | 2.6 TB | 4.9 TB   |

### 推荐设置

#### Qwen3.8-**27B 设置：**

Qwen3.8-27B 是一个 **混合思考** 模型，对思考和非思考模式有不同的默认设置。默认启用 Extra high，因此如果你想要更短的思考轨迹，可以 [调整思考力度](#thinking--preserve-thinking):

| 参数                   | 思考模式 | 指令（非思考）模式 |
| -------------------- | ---- | --------- |
| `temperature`        | 1.0  | 0.7       |
| `top_p`              | 0.95 | 0.80      |
| `top_k`              | 20   | 20        |
| `min_p`              | 0.0  | 0.0       |
| `presence_penalty`   | 0.0  | 1.5       |
| `repetition_penalty` | 1.0  | 1.0       |

* **最大上下文窗口：** `262,144` （可通过 YaRN 扩展到 1M）
* 思考模式： `temperature=1.0`, `top_p=0.95`, `top_k=20`, `min_p=0.0`, `presence_penalty=0.0`, `repetition_penalty=1.0`
* 指令（或非思考）模式： `temperature=0.7`, `top_p=0.80`, `top_k=20`, `min_p=0.0`, `presence_penalty=1.5`, `repetition_penalty=1.0`

#### Qwen3.8-**2.4T 设置：**

Qwen3.8-2.4T 是 **仅思考**，而 Qwen3.8-Max 是混合模式。

| 默认                      |
| ----------------------- |
| temperature = 1.0       |
| top\_p = 0.95           |
| top\_k = 20             |
| min\_p = 0.0            |
| presence\_penalty = 0.0 |

* 上下文长度 = 最多 `1,010,000`
* `temperature=1.0`, `top_p=0.95`, `top_k=20`, `min_p=0.0`, `presence_penalty=0.0`, `repetition_penalty=1.0`

如果模型能够装下，在使用 B200 时你将获得约 20 token/s 的生成速度以及 >120 token/s 的吞吐量。最简单的经验法则：RAM+VRAM ≈ 量化大小；否则它仍然可以工作，只是由于磁盘卸载会慢得多。

### 💡 思考 + 保留思考

{% columns %}
{% column %}
Qwen3.8 具有 **保留思考** 功能，它会保留前一轮对话中的思考轨迹。这会增加你使用的 token 数，但在持续对话中可能提高准确率。 [Unsloth](#run-qwen3.8-in-unsloth-desktop) 为 Qwen3.8 提供了“Think”和“保留思考”切换（见右侧）：
{% endcolumn %}

{% column %}

<figure><img src="/files/5bf4061319340fffa680e4d4d884e8d391219a83" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

Qwen3.8-27B 支持 `reasoning_effort`，可用于调整推理深度并控制成本。这些开关在 Unsloth 中会自动启用：

* `xhigh` （默认）：用于需要深入分析的复杂任务
* `medium`：在准确率和速度之间取得平衡
* `low`：高效推理，优化速度和成本
* none

{% hint style="warning" %}
要更改[ 思考 / 推理](#how-to-enable-or-disable-reasoning-and-thinking) 力度，在 `unsloth run` 或 `llama-server`中，使用 `--chat-template-kwargs '{"reasoning_effort":"medium"}'`

如果你在 **Windows** Powershell 中，请使用： `--chat-template-kwargs "{\"reasoning_effort\":\"medium\"}"`

将 `medium` 更改为你想要的推理级别。
{% endhint %}

## 运行 Qwen3.8 指南

你现在可以在 llama.cpp 和 Unsloth Desktop 中运行 Qwen3.8。对于大型的 Qwen3.8-2.T 模型，我们将使用 397GB `IQ1_XXXS` 量化（命名为 Q1\_0），以在可访问性和准确性方面获得最佳结果，并且至少需要 450GB RAM。欢迎更改量化类型。

* Hugging Face： [Qwen3.8-**GGUF**](https://huggingface.co/unsloth/Qwen3.8-GGUF) • [Qwen3.8-**NVFP4**](https://huggingface.co/unsloth/Qwen3.8-NVFP4)
* ModelScope： [Qwen3.8-**GGUF**](https://www.modelscope.cn/models/unsloth/Qwen3.8-27B-GGUF) • [Qwen3.8-**NVFP4**](https://www.modelscope.cn/models/unsloth/Qwen3.8-27B-NVFP4)
* **2.4T-A95B：** [Qwen3.8-**2.4T-A95B**-GGUF](https://huggingface.co/unsloth/Qwen3.8-2.4T-A95B-GGUF)

<a href="/pages/d03b47babbad2abc249a0979b2d44af1f02bbd20#run-qwen3.8-in-unsloth-desktop" class="button primary">在 Unsloth Desktop 中运行</a><a href="/pages/d03b47babbad2abc249a0979b2d44af1f02bbd20#run-qwen3.8-in-llama.cpp" class="button secondary">在 llama.cpp 中运行</a><a href="/pages/d03b47babbad2abc249a0979b2d44af1f02bbd20#run-qwen3.8-in-llama.cpp" class="button secondary">NVFP4 指南</a>

### 🦥 在 Unsloth Desktop 中运行 Qwen3.8

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

{% columns %}
{% column %}

* 搜索、下载、 [运行 GGUF](/docs/zh/xin-zeng/studio.md#run-models-locally) 和 safetensor 模型
* [**自我修复** 工具调用](/docs/zh/xin-zeng/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-zeng/studio.md#no-code-training) 速度快 2 倍，VRAM 减少 70%
  {% endcolumn %}

{% column %}

<figure><img src="/files/d9bdf80905cb5e7edbce0a01521e71d9a20801a3" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% stepper %}
{% step %}

#### 安装 Unsloth

最简单的开始方式是下载 [Unsloth Desktop 应用](/docs/zh/desktop.md)。可在 [macOS](/docs/zh/kuai-su-kai-shi/install/mac.md), [Windows](/docs/zh/kuai-su-kai-shi/install/windows-installation.md)和 [Linux](/docs/zh/kuai-su-kai-shi/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 %}

#### 搜索并下载 Qwen3.8

前往 [Unsloth Chat](/docs/zh/xin-zeng/studio/chat.md) 或 Model hub，在搜索栏中搜索 Qwen3.8，然后下载你想要的模型和量化版本。

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

{% step %}

#### 运行 Qwen3.8

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

更多信息可查看我们的 [Unsloth 推理指南](/docs/zh/xin-zeng/studio/chat.md).

例如，在 Unsloth Desktop 中使用 397GB 的 Qwen3.8（小 91%）可让你切换思考模式、启用内联画布、网页搜索和代码执行等更多功能。

<figure><img src="/files/fb06ccefbeaf320cf6ac52a0d2e834059b2b3c14" alt="" width="563"><figcaption><p>在 Unsloth Desktop 中使用 Qwen3.8 2.4T 的动态 1-bit 397GB 量化，缩小 91%</p></figcaption></figure>
{% endstep %}

{% step %}

#### 通过 Unsloth API 部署 Qwen3.8

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

{% code overflow="wrap" %}

```bash
unsloth run --model unsloth/qwen3.8-27B-GGUF-GGUF:UD-Q4_K_XL
    --temp 1.0 \\
    --top-p 0.95 \\
    --top-k 20 \\
    --min-p 0.0 \\
    --chat-template-kwargs '{"reasoning_effort":"medium"}'
```

{% endcode %}
{% endstep %}

{% step %}

#### Unsloth 现在已准备就绪

你还可以通过 Unsloth Desktop 用 Qwen3.8 做很多其他事情，例如：

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

<figure><img src="/files/78b0d7d22a04dc6a94b49fd0bc6e056bd00cdb2a" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### Qwen3.8-2.4T-A95B 新的 1-bit 数据类型

我们将 llama.cpp 中的 IQ1\_S 从每权重 1.5625 bit 通过减少 codebook 中的条目数扩展到了 1.1875 bpw——我们发现这对大模型效果很好，并且仍能保留大量准确性——我们还发现这些新的数据类型适合训练后量化（PTQ），而不需要 QAT 或 QAD（量化感知训练 / 蒸馏）。 [Qwen3.8-**2.4T-A95B**-GGUF](https://huggingface.co/unsloth/Qwen3.8-2.4T-A95B-GGUF)

由于命名问题，我们使用了 TQ2\_0、TQ1\_0 和 Q1\_0，否则它不会在 HF 仓库中显示。

<table><thead><tr><th>数据类型</th><th width="147.60000610351562">命名</th><th width="114.39996337890625" align="right">BPW</th><th width="106.20001220703125" align="right"># 条目</th><th width="113.413330078125" align="right">索引位</th><th width="106.4000244140625" align="right">块</th></tr></thead><tbody><tr><td>IQ1_S</td><td>IQ1_S</td><td align="right"><strong>1.5625</strong></td><td align="right">2048</td><td align="right">11</td><td align="right">50 B</td></tr><tr><td>UD-IQ1_XS</td><td>TQ2_0</td><td align="right">1.4375</td><td align="right">1024</td><td align="right">10</td><td align="right">46 B</td></tr><tr><td>UD-IQ1_XXS</td><td>TQ1_0</td><td align="right">1.3125</td><td align="right">512</td><td align="right">9</td><td align="right">42 B</td></tr><tr><td>UD-IQ1_XXXS</td><td>Q1_0</td><td align="right"><strong>1.1875</strong></td><td align="right">256</td><td align="right">8</td><td align="right">38 B</td></tr></tbody></table>

我们仍在对新的数据类型进行基准测试，但对于其他大型模型，我们得到了 **无需任何 QAT / QAD 的良好结果**:

| 数据类型         |     GiB |      PPL |      KLD |  top-p |
| ------------ | ------: | -------: | -------: | -----: |
| IQ1\_S       | 553.204 | 2.578876 | 0.564553 | 78.882 |
| UD-IQ1\_XS   | 513.583 | 2.931261 | 0.690161 | 75.726 |
| UD-IQ1\_XXS  | 473.961 | 3.540383 | 0.876007 | 71.284 |
| UD-IQ1\_XXXS | 434.340 | 4.488796 | 1.109944 | 66.257 |

### :llama: 在 llama.cpp 中运行 Qwen3.8

{% stepper %}
{% step %}
我们需要使用特定的 IQ1\_XXXS 分支 [这里](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 iq1-narrow 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 %}
如果你只想运行标准的 `IQ1_S` 和其他量化版本，那么请正常编译 llama.cpp：

{% code overflow="wrap" %}

```bash
apt-get update
apt-get install pciutils build-essential cmake curl libcurl4-openssl-dev -y
git clone https://github.com/ggml-org/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
```

{% endcode %}
{% endstep %}

{% step %}
下载模型前请先（安装 `pip install huggingface_hub`）。你可以选择 `Q1_0` 用于 `IQ1_XXXS` 或者其他量化版本，例如 `Q8_0` 。如果下载卡住，请查看： [Hugging Face Hub、XET 调试](/docs/zh/ji-chu-zhi-shi/troubleshooting-and-faqs/hugging-face-hub-xet-debugging.md)

**Qwen3.8-27B：**

```bash
pip install -U "huggingface_hub[cli]"
hf download unsloth/Qwen3.8-27B-GGUF \\
    --local-dir unsloth/Qwen3.8-27B-GGUF \\
    --include "*UD-Q4_K_XL*" # 3-bit 请使用 "*UD-Q3_K_XL*"
```

**Qwen3.8-2.4T：**

```bash
pip install -U "huggingface_hub[cli]"
hf download unsloth/Qwen3.8-2.4T-A95B-GGUF \\
    --local-dir unsloth/Qwen3.8-2.4T-A95B-GGUF \\
    --include "*Q1_0*" # 2-bit 请使用 "*IQ2_XXS*"
```

{% endstep %}

{% step %}
要在 llama-cli 中运行模型，请按照下面的代码片段操作：\
请记得 [更改设置](#recommended-settings) 以适配你的使用场景。

**Qwen3.8-27B：**

{% code overflow="wrap" %}

```bash
./llama.cpp/llama-cli \\
    --model unsloth/Qwen3.8-27B-GGUF/Qwen3.8-27B-UD-Q4_K_XL.gguf \\
    --temp 1.0 \\
    --top-p 0.95 \\
    --top-k 20 \\
    --min-p 0.0
```

{% endcode %}

**Qwen3.8-2.4T：**

{% code overflow="wrap" %}

```bash
./llama.cpp/llama-cli \\
    --model unsloth/Qwen3.8-2.4T-A95B-GGUF/UD-Q1_0/Qwen3.8-2.4T-A95B-UD-Q1_0-00001-of-00010.gguf \\
    --temp 1.0 \\
    --top-p 0.95 \\
    --top-k 20 \\
    --min-p 0.0
```

{% endcode %}
{% endstep %}

{% step %}
要运行通用的 UD-IQ1\_S，你可以这样做：

**Qwen3.8-2.4T：**

{% code overflow="wrap" %}

```bash
pip install -U "huggingface_hub[cli]"
hf download unsloth/Qwen3.8-2.4T-A95B-GGUF \\
    --local-dir unsloth/Qwen3.8-2.4T-A95B-GGFF \\
    --include "*IQ1_S*" # 2-bit 请使用 "*IQ2_XXS*"
```

{% endcode %}
{% endstep %}

{% step %}
然后运行它：

{% code overflow="wrap" %}

```bash
./llama.cpp/llama-cli \\
    --model unsloth/Qwen3.8-2.4T-A95B-GGUF/UD-IQ1_S/Qwen3.8-2.4T-A95B-UD-IQ1_S-00001-of-00012.gguf \\
    --temp 1.0 \\
    --top-p 0.95 \\
    --top-k 20 \\
    --min-p 0.0
```

{% endcode %}
{% endstep %}
{% endstepper %}

### ⚡️NVFP4

和 Qwen3.6 一样，我们也在发布新的 [动态 NVFP4 Qwen3.8](/docs/zh/ji-chu-zhi-shi/nvfp4.md)-27B 量化版本，可运行 **约快 1.5×** 比 BF16 检查点更快，并且 **性能更好** 并且文件大小相当。运行 Qwen3.8-27B NVFP4 **快 1.5 倍** 在 **24GB 显存上。** 我们还添加了 **FP8 KV 缓存校准** ，可实现 2 倍更长的上下文长度！NVFP4 需要 NVIDIA 的 Blackwell GPU，例如 RTX 50X、DGX Spark（见 [#dgx-spark-with-nvfp4-quants](#dgx-spark-with-nvfp4-quants "mention")），以及 B200、B300 GPU。对于旧款 GPU，我们的 GGUF 很好用！你可以在 [vLLM](#vllm) 中运行 NVFP4 量化模型，目前仅支持该方案（不支持 SGLang）。

* [Qwen3.8-27B-**NVFP4**](https://huggingface.co/unsloth/Qwen3.8-27B-NVFP4) 量化

<table><thead><tr><th width="90" align="right">批量</th><th width="114.5999755859375" align="right">BF16 总 tok/s</th><th width="122.60003662109375" align="right">NVFP4 总 tok/s</th><th width="122" align="right">加速比</th><th width="137.4000244140625" align="right">BF16 单用户</th><th align="right">NVFP4 单用户</th></tr></thead><tbody><tr><td align="right">1</td><td align="right">89.8</td><td align="right"><strong>133.7</strong></td><td align="right">1.49x</td><td align="right">89.8</td><td align="right"><strong>133.7</strong></td></tr><tr><td align="right">8</td><td align="right">649.4</td><td align="right"><strong>938.8</strong></td><td align="right">1.45x</td><td align="right">81.2</td><td align="right"><strong>117.3</strong></td></tr><tr><td align="right">32</td><td align="right">1983.0</td><td align="right"><strong>2787.0</strong></td><td align="right">1.41x</td><td align="right">62.0</td><td align="right"><strong>87.1</strong></td></tr><tr><td align="right">64</td><td align="right">3048.5</td><td align="right"><strong>4407.2</strong></td><td align="right">1.45x</td><td align="right">47.6</td><td align="right"><strong>68.9</strong></td></tr></tbody></table>

请参见下方之前针对 Qwen3.6 进行的基准测试，以及与其他 NVFP4 实现的比较；这些实现使用 16 位激活，而我们的 NVFP4 使用 NVFP4 激活：

<figure><img src="/files/95e13f3a1e64de4dc20202f65fc766c58e3e1e4f" alt="" width="563"><figcaption></figcaption></figure>

所有基准测试均使用 1× B200、128 并发。更高并发可将 35B 提升至 17,561 token/秒。&#x20;

在准确性基准测试中，我们在代码、聊天和许多领域上进行了 KLD 和 Top-1% 一致性评估。与 BF16 相比，NVFP4 的准确率恢复稳定在 92% 到 97% 之间

| 语料                |        KLD 均值 | top-1 一致率 |
| ----------------- | ------------: | --------: |
| 中文                |       0.01628 |    93.55% |
| 代码                |       0.02600 |    96.68% |
| 参考生成              |       0.03993 |    94.46% |
| 聊天                |       0.05818 |    92.15% |
| 日语 / 韩语 / 俄语 / 西语 | 0.0124-0.0155 |    94-95% |

对于准确性基准测试，针对 Qwen 3.6，我们在 FP8、BF16、NVIDIA 的 NVFP4 以及我们的 NVFP4 版本上进行了 MMLU-Pro、AIME 2025、GPQA 测试——我们展示更快的量化版本在所有项目上的表现都差不多：

<figure><img src="/files/d7ee23f84bb6342b555e1ce4070a001d8a8fd327" alt=""><figcaption></figcaption></figure>

更多信息可阅读我们的 [动态 NVFP4 量化博客](/docs/zh/ji-chu-zhi-shi/nvfp4.md).

要运行 NVFP4 量化模型，请参见下方在 [vLLM](/docs/zh/ji-chu-zhi-shi/inference-and-deployment/vllm-guide.md) 或 [SGLang](/docs/zh/ji-chu-zhi-shi/inference-and-deployment/sglang-guide.md):

#### **vLLM：**

要在单独的 venv 中安装 vLLM：

{% code overflow="wrap" expandable="true" %}

```bash
uv venv unsloth-nvfp4-env --python 3.13
source unsloth-nvfp4-env/bin/activate
uv pip install "vllm>=0.25.0" "flashinfer-python>=0.6.13" "nvidia-cutlass-dsl>=4.5.2" \
    --torch-backend=auto
```

{% endcode %}

然后部署 27B 版本：

```shell
vllm serve unsloth/Qwen3.8-27B-NVFP4
```

要启用 MTP / 推测解码（解码更快但吞吐量会略低），请使用：

```bash
vllm serve unsloth/Qwen3.8-27B-NVFP4
    --speculative-config '{"method": "mtp", "num_speculative_tokens": 2}'
```

如果遇到 Torchcodec 问题，请先执行以下操作，然后重新启动 vllm。

{% code overflow="wrap" expandable="true" %}

```bash
sudo apt-get update
sudo apt-get install -y ffmpeg
```

{% endcode %}

#### **SGLang：**

**由于我们将 lm\_head 量化为 FP8，目前尚不支持 SGLang。**

vLLM 有一个 `CompressedTensorsW8A8Fp8` 内核支持这一点，而 SGLang 无法加载 FP8 lm\_head。

### :exploding\_head:量化分析

NVFP4 量化相比 BF16 快 1.5 倍，并保留 92% 到 97% 的 top-1% 准确率。

我们使用了 [Dynamic 3.0 GGUFs](/docs/zh/ji-chu-zhi-shi/dynamic-3.0-ggufs.md) 让 Qwen3.8-27B 大幅提升！

Qwen3.8-27B 的 UD-3 中所示 top-1% 准确率图：

<figure><img src="/files/91cb32190c58b5a98ee3e7d5a2381ec68ec99877" alt=""><figcaption></figcaption></figure>

以及 Qwen3.8 的平均 KLD：

<figure><img src="/files/b44366d434363eb2ded3ff659587ef18b5f54a28" alt=""><figcaption></figcaption></figure>

### 📊 基准测试

#### Qwen3.8-**27B**

表格基准测试请见下方：

<div><figure><img src="/files/a87cb4acd5c89cb065cbf89b864db8e27c53ce75" alt=""><figcaption></figcaption></figure> <figure><img src="/files/483c358a19995b29ca4bdd78a50fd7cf229dc435" alt=""><figcaption></figcaption></figure></div>

#### 文本性能

| 基准测试                                 | Qwen3.8-27B               | Qwen3.6-27B          | Qwen3.7-Plus         | Muse Glimmer-30B | Opus4.6 Max |
| ------------------------------------ | ------------------------- | -------------------- | -------------------- | ---------------- | ----------- |
| **编程**                               |                           |                      |                      |                  |             |
| 智能体终端编码 Terminal Bench 2.1（Terminus） | 73.0                      | 63.4                 | 64.0                 | 51.7             | **78.2**    |
| 智能体编码 SWE-bench Pro                  | **61.7**                  | 53.5                 | 57.6                 | 51.2             | 53.4        |
| 仓库级代码生成 NL2Repo-Bench                | 42.3                      | 36.2                 | 41.1                 | --               | **47.6**    |
| 智能体编码 DeepSWE 1.1                    | **42.2**                  | 13.3                 | 14.2                 | --               | --          |
| 软件工程 QwenSWEBench                    | **79.0**                  | 49.3                 | 59.2                 | --               | 63.8        |
| **智能体**                              |                           |                      |                      |                  |             |
| 长周期办公工作 CoWorkBench                  | **70.7**                  | 61.0                 | 65.1                 | --               | 68.2        |
| 专业工作任务 JobBench                      | **33.4**                  | 21.8                 | 27.6                 | --               | --          |
| 前沿智能体任务 Agents' Last Exam            | Pass\@1**20.4**得分**42.9** | Pass\@1 10.6 得分 27.3 | Pass\@1 13.2 得分 33.6 | --               | --          |
| 通用                                   |                           |                      |                      |                  |             |
| 指令遵循 IFBench                         | **79.5**                  | 69.1                 | 79.1                 | 77.0             | 62.5        |
| 科学推理 GPQA Diamond                    | 89.2                      | 87.8                 | 90.3                 | 83.5             | **91.3**    |
| 多学科推理 HLE                            | 30.8                      | 24.0                 | 34.7                 | 22.0             | **40.0**    |
| 竞技编程 LiveCodeBench v6                | **90.3**                  | 83.9                 | 89.6                 | --               | 88.8        |

#### Qwen3.8-**2.4T-A95B**

<figure><img src="/files/df7099673ee347b50f5ce630ee98efee963a358e" alt=""><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 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/qwen3.8.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.
