> 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/inkling-2-mini.md). Agents can also search and read this documentation through its [MCP server](https://unsloth.ai/docs/~gitbook/mcp).

# Inkling 2 Mini - 本地运行指南

了解如何使用 Unsloth 和 llama.cpp 在本地运行 Thinking Machines Lab 的 Inkling 2 Mini。

**Inkling 2 Mini** 是 Thinking Machines Lab 的 **26.4B MoE（激活参数 5.4B）** 模型，适用于编程、智能体和 **视觉** 工作负载。该模型基于 Looped Transformers 的一种变体构建，并以 Apache 2.0 许可证发布，具有 **100 万上下文长度** ，并在 **DeepSWE v1.1 上取得 48.2%** ，以及 **在 SWEBench Pro v2 (Hard) 上取得 77.9%**&#x7684;成绩，性能超越 Qwen3.8-27B，成为同等规模中最强的模型。在 Terminal Bench 4.0 上，它与 Qwen3.8-27B 并列，得分为 **5.6%**.

{% columns %}
{% column %}
本指南介绍如何使用 Unsloth Desktop 在 Mac、NVIDIA 或 AMD 设备上运行 Inkling 2 Mini。Unsloth Desktop 可为该模型提供 [约 1.9 倍的推理速度提升](#id-23rd-november-update) 。

可在 16GB 内存或 **24GB 内存** 下运行， **以获得完整精度**。GGUF： [**Inkling 2 Mini GGUF**](https://huggingface.co/unsloth/Inkling-2-Mini-GGUF)

<a href="https://unsloth.ai/docs/zh/mo-xing/inkling-2-mini.md#run-inkling-2-mini-guide" class="button primary">运行 Inkling 2 指南</a><a href="https://unsloth.ai/download" class="button secondary">下载 Unsloth</a>
{% endcolumn %}

{% column %}

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fbnhx2GlFHFh3fjMdbN26%2Fgta%20example.gif?alt=media&amp;token=6f9605aa-3c77-4796-a014-96214063f1b0" alt="" width="563"><figcaption><p>在 Unsloth 中运行 4 位量化 Inkling Mini 的示例</p></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

想要训练该模型？请参阅 [微调 Inkling 2 Mini](https://unsloth.ai/docs/zh/mo-xing/inkling-2-mini/fine-tuning.md) ，了解笔记本、基准测试和配置方法。

### ⚙️ 使用指南

#### Inkling 2 Mini 的运行要求

**`UD-Q8_K_XL`** 属于 **完整精度**。推荐使用的量化版本是 **`UD-Q4_K_XL` （17.6 GB）。**

**表：硬件要求** （RAM + VRAM，或统一内存）

| 1 位  | 2 位      | 3 位      | 4 位      | 8 位（无损） |
| ---- | -------- | -------- | -------- | ------- |
| 9 GB | 10–11 GB | 13–15 GB | 17–18 GB | 24 GB   |

所有 GGUF 大小和结果，请参阅 [量化分析](#quantization-analysis) 。

{% hint style="success" %}
请将这些范围作为起点。更长的上下文、图像输入和其他应用可能会占用更多内存。 `mmproj-F16.gguf` 视觉投影器会使下载文件增大 639 MB。
{% endhint %}

#### 推荐设置

| 温度    | Top-p | Top-k | Min-p |
| ----- | ----- | ----- | ----- |
| `1.0` | `1.0` | `0`   | `0.0` |

### 11 月 24 日更新

现在，你可以使用 Unsloth 在任何本地 GPU 上微调和训练 Inkling-2-Mini，我们还为此提供免费的 Kaggle 2xT4 Notebook！开启所有优化后，我们的训练速度比 TRL 快 1.8 到 3.1 倍，且 VRAM 使用量减少 50%。详情请参阅 [Fine-tune Inkling 2 Mini](https://unsloth.ai/docs/zh/mo-xing/inkling-2-mini/fine-tuning.md) 了解更多详情

我们还进一步修复并提升了 Inkling-2-Mini 的推理速度，并修正了上下文长度定价错误的问题。该问题曾导致 Inkling-2-Mini 在 Unsloth Desktop 中运行速度慢 2 到 3 倍。

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F5HICgfWx3ha64hQ4mpVo%2Finkling-2-mini-vs-trl-v2.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

### 11 月 23 日更新

Unsloth 在 Inkling-2-Mini 推理解码方面 **比主线版 llama.cpp 最快快 1.9 倍** ，这得益于部分 llama.cpp 优化！我们还修复了 Q8\_0 KV 缓存比 F16 占用更多 VRAM 的问题。

此外，所有量化版本也都已更新，因此 **主线版 llama.cpp 可以加载它们**！详情请参阅： [#inference-speed](#inference-speed "mention")

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fc9IoUVjzX5Khdzy2PKIG%2Finkling2_mini_decode_speed_gpus.png?alt=media" alt="Inkling-2-Mini UD-Q4_K_XL decode speed across GPUs: Unsloth llama.cpp prebuilts vs mainline" width="563"><figcaption><p>不同 GPU 上的解码速度：Unsloth 预编译版本与主线版 llama.cpp</p></figcaption></figure>

## 运行 Inkling 2 Mini 指南

请使用支持 **循环层** 和 **每个专家的 NVFP4 缩放因子**. [Inkling 2 Mini 模型卡](https://huggingface.co/unsloth/Inkling-2-Mini-GGUF)

<a href="https://unsloth.ai/docs/zh/mo-xing/inkling-2-mini.md#run-inkling-2-mini-in-unsloth-desktop" class="button primary">在 Unsloth Desktop 中运行</a><a href="https://unsloth.ai/docs/zh/mo-xing/inkling-2-mini.md#run-inkling-2-mini-in-llama-cpp" class="button secondary">在 llama.cpp 中运行</a>

<div><figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fc9F8coH46gJj7gxZEhRU%2Fsnow-fall.webp?alt=media&amp;token=2ede2108-5204-405d-9e6a-57d1a903c5f0" alt=""><figcaption></figcaption></figure> <figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FXRbHGqQn9DJR1prbs4w5%2Flighthouse.webp?alt=media&amp;token=e17bd9b1-d5d4-4659-b532-8373188e3811" alt=""><figcaption></figcaption></figure></div>

### 🦥 在 Unsloth Desktop 中运行 Inkling 2 Mini <a href="#run-inkling-2-mini-in-unsloth-desktop" id="run-inkling-2-mini-in-unsloth-desktop"></a>

{% stepper %}
{% step %}

#### 安装 Unsloth

下载并启动 [Unsloth Desktop 应用](https://unsloth.ai/docs/zh/desktop.md) ，适用于 macOS、Windows 或 Linux。

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

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

{% tabs %}
{% tab title="本地安装" %}
**MacOS、Linux、WSL：**

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

**Windows：**

```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 Desktop：

{% code collapsedlinecount="10" %}

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

{% endcode %}

更新 Unsloth Desktop：

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

{% endtab %}

{% tab title="WinGet" %}
安装 Unsloth Desktop：

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

更新 Unsloth Desktop：

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

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

#### 搜索并下载 Inkling 2 Mini

在 **聊天**中，打开 **选择模型**，或前往 **模型中心**。搜索 **Inkling 2 Mini**，选择 [**unsloth/Inkling-2-Mini-GGUF**](https://huggingface.co/unsloth/Inkling-2-Mini-GGUF) 并下载适合你设备的量化版本。下载完成后，在聊天中选择该模型并开始对话。你也可以从本地文件加载兼容的 Mini GGUF。
{% endstep %}

{% step %}

#### 使用 Unsloth API 运行并部署 Inkling 2 Mini

此示例使用 4 位 `UD-Q4_K_XL` 量化版本（17.63 GB）。更改冒号后的后缀，即可从仓库中选择其他量化版本。

{% code overflow="wrap" collapsedlinecount="10" %}

```bash
unsloth run --model unsloth/Inkling-2-Mini-GGUF:UD-Q4_K_XL \
    --temp 1.0 --top-p 1.0 --top-k 0 --min-p 0.0
```

{% endcode %}

使用终端中显示的端点 URL 和 API 密钥连接客户端。 [Unsloth API 指南](https://unsloth.ai/docs/zh/ji-chu-zhi-shi/api.md)
{% endstep %}
{% endstepper %}

### 🦙 在 llama.cpp 中运行 Inkling 2 Mini <a href="#run-inkling-2-mini-in-llama-cpp" id="run-inkling-2-mini-in-llama-cpp"></a>

{% stepper %}
{% step %}

#### 安装 llama.cpp

Unsloth GGUF 现在可以在主线版 llama.cpp 中运行！我们的 [b12649-mix-c7059d6](https://github.com/unslothai/llama.cpp/releases/tag/b12649-mix-c7059d6) 构建版本在我们的基准测试中解码速度更快，并支持两种 DSpark 起草器布局。

{% tabs %}
{% tab title="Apple" %}
{% code overflow="wrap" collapsedlinecount="10" %}

```bash
curl -L -o llama.tar.gz https://github.com/unslothai/llama.cpp/releases/download/b12649-mix-c7059d6/llama-b12649-mix-c7059d6-bin-macos-arm64.tar.gz
mkdir -p llama.cpp
tar -xzf llama.tar.gz -C llama.cpp --strip-components=1
./llama.cpp/llama-server --version
```

{% endcode %}
{% endtab %}

{% tab title="NVIDIA" %}
**CUDA 12** 此构建适用于大多数 NVIDIA GPU：RTX 20 至 RTX 50 系列、V100、T4、A100、H100 和 B200。请先安装 [CUDA 工具包](https://developer.nvidia.com/cuda-downloads) 。使用 CUDA 13 时，将 `cuda12-portable` 替换为 `cuda13-portable`。对于 GTX 10 系列及更早的显卡，请使用 `cuda12-legacy`.

{% code overflow="wrap" collapsedlinecount="10" %}

```bash
curl -L -o llama.tar.gz https://github.com/unslothai/llama.cpp/releases/download/b12649-mix-c7059d6/app-b12649-mix-c7059d6-linux-x64-cuda12-portable.tar.gz
mkdir -p llama.cpp
tar -xzf llama.tar.gz -C llama.cpp
./llama.cpp/llama-server --version
```

{% endcode %}
{% endtab %}

{% tab title="AMD" %}
**ROCm** 此构建适用于 Radeon RX 9000（`gfx120X`）。它内置了 ROCm 库，因此无需完整安装 ROCm。对于其他 GPU，请将 `gfx120X` 替换为 `gfx1151` （Ryzen AI Max）、 `gfx1150` （Ryzen AI 300）、 `gfx110X` （RX 7000）、 `gfx103X` （RX 6000）、 `gfx90a` （MI200）或 `gfx908` （MI100）。对于其他 AMD GPU，请使用 `vulkan` 构建版本。

{% code overflow="wrap" collapsedlinecount="10" %}

```bash
curl -L -o llama.tar.gz https://github.com/unslothai/llama.cpp/releases/download/b12649-mix-c7059d6/app-b12649-mix-c7059d6-linux-x64-rocm-gfx120X.tar.gz
mkdir -p llama.cpp
tar -xzf llama.tar.gz -C llama.cpp
./llama.cpp/llama-server --version
```

{% endcode %}
{% endtab %}

{% tab title="Windows" %}
**CUDA 12** 为 NVIDIA GPU 构建。请先安装 [CUDA 工具包](https://developer.nvidia.com/cuda-downloads) ，然后在 PowerShell 中运行以下命令。使用 CUDA 13 时，将 `cuda12-portable` 替换为 `cuda13-portable`。对于 AMD，请将其替换为 `rocm-gfx120X` ，或从 AMD 选项卡中选择适用于你的 GPU 的构建版本。其他 GPU 请使用 `vulkan` ，仅使用 CPU 时请使用 `cpu` 。

{% code overflow="wrap" collapsedlinecount="10" %}

```powershell
curl.exe -L -o llama.zip https://github.com/unslothai/llama.cpp/releases/download/b12649-mix-c7059d6/app-b12649-mix-c7059d6-windows-x64-cuda12-portable.zip
Expand-Archive llama.zip -DestinationPath llama.cpp
.\llama.cpp\llama-server.exe --version
```

{% endcode %}
{% endtab %}

{% tab title="DGX Spark" %}
{% code overflow="wrap" collapsedlinecount="10" %}

```bash
curl -L -o llama.tar.gz https://github.com/unslothai/llama.cpp/releases/download/b12649-mix-c7059d6/app-b12649-mix-c7059d6-linux-arm64-cuda13-portable.tar.gz
mkdir -p llama.cpp
tar -xzf llama.tar.gz -C llama.cpp
./llama.cpp/llama-server --version
```

{% endcode %}
{% endtab %}
{% endtabs %}

对于 Intel Mac、仅 CPU、Vulkan 或 Linux ARM64，请从 [发布页面](https://github.com/unslothai/llama.cpp/releases/tag/b12649-mix-c7059d6)中选择相应的文件。请将 `llama-server` 及其附带的库文件一并放在 `llama.cpp`.

你也可以从源代码构建 llama.cpp：

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

```bash
apt-get update
apt-get install pciutils build-essential cmake curl libcurl4-openssl-dev git -y
git clone https://github.com/ggml-org/llama.cpp
git -C llama.cpp fetch origin pull/30817/head:deepseek41
git -C llama.cpp checkout deepseek41
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 %}

#### 下载 GGUF

下载 4 位量化的 `UD-Q4_K_XL` GGUF、F16 视觉投影器和 Q8\_0 DSpark 草稿模型。若要使用其他量化版本，请使用仓库中的对应文件名。 [GGUF 文件](https://huggingface.co/unsloth/Inkling-2-Mini-GGUF/tree/main)

{% code overflow="wrap" collapsedlinecount="10" %}

```bash
pip install -U huggingface_hub
hf download unsloth/Inkling-2-Mini-GGUF \
    Inkling-2-Mini-UD-Q4_K_XL.gguf mmproj-F16.gguf \
    dspark-Inkling-2-Mini-Q8_0.gguf \
    --local-dir Inkling-2-Mini-GGUF
```

{% endcode %}
{% endstep %}

{% step %}

#### 运行 Inkling 2 Mini

使用预编译二进制文件启动本地聊天服务器。

{% tabs %}
{% tab title="macOS、Linux 或 WSL" %}
{% code overflow="wrap" collapsedlinecount="10" %}

```bash
./llama.cpp/llama-server \
    --model Inkling-2-Mini-GGUF/Inkling-2-Mini-UD-Q4_K_XL.gguf \
    --mmproj Inkling-2-Mini-GGUF/mmproj-F16.gguf \
    --model-draft Inkling-2-Mini-GGUF/dspark-Inkling-2-Mini-Q8_0.gguf \
    --spec-type draft-dspark --spec-draft-n-max 2 --n-gpu-layers-draft 99 \
    --temp 1.0 --top-p 1.0 --top-k 0 --min-p 0.0 \
    --host 127.0.0.1 --port 8080
```

{% endcode %}
{% endtab %}

{% tab title="Windows PowerShell" %}
{% code overflow="wrap" collapsedlinecount="10" %}

```powershell
.\llama.cpp\llama-server.exe `
    --model Inkling-2-Mini-GGUF/Inkling-2-Mini-UD-Q4_K_XL.gguf `
    --mmproj Inkling-2-Mini-GGUF/mmproj-F16.gguf `
    --model-draft Inkling-2-Mini-GGUF/dspark-Inkling-2-Mini-Q8_0.gguf `
    --spec-type draft-dspark --spec-draft-n-max 2 --n-gpu-layers-draft 99 `
    --temp 1.0 --top-p 1.0 --top-k 0 --min-p 0.0 `
    --host 127.0.0.1 --port 8080
```

{% endcode %}
{% endtab %}
{% endtabs %}

打开 <http://127.0.0.1:8080> 进行聊天或上传图像。 `--model-draft` 和 `--spec-type draft-dspark` 这两个标志会启用 DSpark 推测解码，并使用 0.4 GB 的草稿模型；而 `--spec-draft-n-max 2` 是此构建版本中 Inkling 2 速度最快的深度（第三个草稿令牌很少被接受）。

若要不使用它，请从下载内容中移除草稿模型，并从服务器命令中删除 `--model-draft` 和 `--spec-type` 这几行。若要进行纯文本聊天，请在下载时省略投影器，并从服务器命令中删除 `--mmproj` 若内存有限，请减小 `--ctx-size` 或 `--n-gpu-layers`。若要仅使用 CPU 进行推理，请设置 `--n-gpu-layers 0` 和 `--n-gpu-layers-draft 0`.
{% endstep %}
{% endstepper %}

### :play\_pause: 循环式 Transformer 架构

Inkling-2-Mini 使用了一种改进的循环式 Transformer 架构，其中第 6 至第 17 层会循环运行 3 次；结合嵌入层计算后，只有 5.4B 参数会被激活。这不同于其他 LLM 架构：其他架构的每个解码器层只运行一次，而 Inkling-2-Mini 实际上会将第 6 至第 17 层运行三次，从而在训练过程中有效压缩其磁盘空间和占用。

有 **传闻称** GPT-6 Astra 系列模型也可能采用某种循环式 Transformer 架构变体，而 Inkling-2-Mini 则是首批采用此机制变体的强大开放模型之一。

### 📊 量化分析 <a href="#quantization-analysis" id="quantization-analysis"></a>

我们使用相同的 llama.cpp 设置，在七个领域中将各个 GGUF 与 `UD-Q8_K_XL` 进行比较。作为参考的版本保留了原始 NVFP4 专家权重，其余权重则以 BF16 格式存储。使用反量化为 Q8\_0 的 MXFP8 权重时，UD-Q4\_K\_XL 也几乎无损。UD-Q8\_K\_XL 会将 MXFP8 升位为 BF16，因此 KLD = 0。

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FqWPOI9paCJed36b9qV1x%2Fsize_vs_top1(7).png?alt=media&amp;token=186fd174-4199-4d66-949e-fc851aa614ef" alt="" width="563"><figcaption></figcaption></figure>

4 位版本 `UD-Q4_K_XL` 的 **平均 KLD 为 0.0107** ，且 **最高概率令牌一致率为 98.0%** 在 **17.63 GB**。2 位 `UD-IQ2_XXS` 将下载量降至 **8.49 GB** 达到 **90.6% 的一致性**.

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FObpB27Pzg7eddzGOefoK%2Fsize_vs_kld(4).png?alt=media&amp;token=b388d982-caaa-402f-bc8f-f49938036713" alt="" width="563"><figcaption></figcaption></figure>

<details>

<summary>点击查看完整量化表</summary>

| 量化方式         | 大小 (GB) | 相对于 UD-Q8\_K\_XL 的平均 KLD | 相同的首选 token |
| ------------ | ------- | ------------------------ | ----------- |
| UD-IQ1\_S    | 7.76    | 0.0911                   | 89.4%       |
| UD-IQ1\_M    | 8.02    | 0.0867                   | 90.2%       |
| UD-IQ2\_XXS  | 8.49    | 0.0726                   | 90.6%       |
| UD-Q2\_K\_XL | 9.14    | 0.0595                   | 91.6%       |
| UD-IQ3\_XXS  | 11.66   | 0.0269                   | 94.7%       |
| UD-Q3\_K\_XL | 13.63   | 0.0174                   | 96.3%       |
| UD-IQ4\_XS   | 15.73   | 0.0109                   | 97.7%       |
| UD-Q4\_K\_M  | 16.61   | 0.0108                   | 97.9%       |
| UD-Q4\_K\_XL | 17.63   | 0.0107                   | 98.0%       |
| UD-Q8\_K\_XL | 22.87   | 参考                       |             |

</details>

### :rocket:推理优化 <a href="#inference-speed" id="inference-speed"></a>

Unsloth 的速度 **最高可比主线版 llama.cpp 快 1.9 倍** 在使用部分 llama.cpp 优化进行 Inkling-2-Mini 推理解码时！我们测量了以下四个 llama.cpp 构建版本的解码速度（`tg1024`，生成 1024 个 token），针对 `UD-Q4_K_XL` 并使用 F16 KV 缓存：我们此前的预编译版本（[b12588-mix-c0c3de8](https://github.com/unslothai/llama.cpp/releases/tag/b12588-mix-c0c3de8)）、我们的 b12631 预编译版本（[b12631-mix-acc0843](https://github.com/unslothai/llama.cpp/releases/tag/b12631-mix-acc0843)）、Unsloth 最新的 llama.cpp 构建版本、主线版 llama.cpp b12649，以及 Strata。此外，我们还通过为其他精度的 flash attention 支持分块注意力，修复了 Q4\_0 / Q8\_0 等格式比 F16 使用更多内存的问题。

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fc9IoUVjzX5Khdzy2PKIG%2Finkling2_mini_decode_speed_gpus.png?alt=media" alt="Inkling-2-Mini UD-Q4_K_XL decode speed across GPUs: Unsloth llama.cpp prebuilts vs mainline" width="563"><figcaption><p>不同 GPU 上的解码速度：Unsloth 预编译版本与主线版 llama.cpp</p></figcaption></figure>

| GPU（token/s）                       | 此前的 b12588 | b12631    | 新版 Unsloth | 主线版 b12649 | 新版相较主线版        |
| ---------------------------------- | ---------- | --------- | ---------- | ---------- | -------------- |
| NVIDIA B200                        | 68.88      | 85.08     | **110.77** | 68.00      | **1.63 倍**     |
| NVIDIA RTX PRO 6000 Blackwell      | 81.71      | 101.11    | **125.24** | 81.35      | **1.54 倍**     |
| NVIDIA A100 40GB                   | 45.11      | 54.17     | **67.02**  | 45.02      | **1.49 倍**     |
| NVIDIA L4                          | 36.23      | 39.09     | **42.88**  | 35.84      | **1.20 倍**     |
| NVIDIA T4（5 个 MoE 层位于 CPU 上）       | 19.68      | 21.71     | **23.90**  | 19.71      | **1.21x**      |
| AMD Ryzen AI Max (gfx1151)，Linux   | 24.40      | 27.58     | **32.78**  | 24.15      | **1.36x**      |
| AMD Ryzen AI Max (gfx1151)，Windows | 16.62      | **25.65** | 未测量        | 13.74      | 1.87x (b12631) |

* Q8\_0 KV 缓存（`--cache-type-k q8_0 --cache-type-v q8_0`）会使候选版本的解码速度降低约 3% 到 7%（B200：103.06 对比 110.77 tokens/s），并且不同构建版本的排序保持不变——但上下文长度可增加到 2 倍！
* `UD-Q2_K_XL` 也遵循相同的趋势。在 B200 上使用 F16 KV 缓存时：旧版为 69.67，当前版为 86.65，新版为 113.90，主线版为 69.31 tokens/s。在 T4 上，它可以完全放入 GPU：分别为 25.64、28.54、31.45 和 25.73 tokens/s。

#### DSpark 推测解码 <a href="#dspark-speculative-decoding" id="dspark-speculative-decoding"></a>

DSpark 确实能提高生成速度，而我们的新构建版本与 DSpark 搭配时速度也更快：

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F6zL3VlE7TyV0Wo0We1Xt%2Finkling2_mini_dspark_speed.png?alt=media" alt="Inkling-2-Mini DSpark speculative decoding speed on B200" width="375"><figcaption><p>B200 上的 DSpark 推测解码</p></figcaption></figure>

| 采样方式   | b12631，不使用起草器 | b12631 + DSpark | 新版，不使用起草器 | 新版 + DSpark       |
| ------ | ------------- | --------------- | --------- | ----------------- |
| 贪婪     | 77.5          | 96.1 (1.24x)    | 99.9      | **117.3** (1.17x) |
| 温度 1.0 | 69.8          | 79.0 (1.13x)    | 86.9      | **96.6** (1.11x)  |

我们发现，使用旧版起草器、深度为 2 时，平均速度比 llama.cpp 当前的 dspark 实现更快，因此在 unsloth 中，我们默认使用旧版 dspark 模块。新版 dspark 的深度应设为 3。

| 起草器                    | 深度 2              | 深度 3          | 深度 4          | 深度 5          |
| ---------------------- | ----------------- | ------------- | ------------- | ------------- |
| 填充词汇表的起草器              | **1.24x / 1.15x** | 1.24x / 1.10x | -             | -             |
| `Mainline_Support` 起草器 | 1.09x / 1.03x     | 1.16x / 1.03x | 1.12x / 1.03x | 1.04x / 0.97x |

#### 与 Strata 的对比 <a href="#comparison-with-strata" id="comparison-with-strata"></a>

我们在 B200 上对 Strata 进行了基准测试（`tg1024`，关闭 DSpark），以 tokens/s 为单位测试运行我们的量化版本：

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FD0cFDouVjxtmuuI0jFTz%2Finkling2_mini_strata_speed.png?alt=media" alt="Inkling-2-Mini decode speed on B200: Unsloth llama.cpp vs Strata" width="563"><figcaption><p>B200 上 Unsloth llama.cpp 与 Strata 的对比</p></figcaption></figure>

| GGUF             | KV 缓存 | Strata    | b12631 | 新版 Unsloth |
| ---------------- | ----- | --------- | ------ | ---------- |
| UD-Q4\_K\_XL     | F16   | 105.2     | 84.2   | **111.8**  |
| UD-Q4\_K\_XL     | Q8\_0 | **107.1** | 80.3   | 101.4      |
| UD-Q2\_K\_XL     | F16   | 105.4     | 85.6   | **113.5**  |
| UD-Q2\_K\_XL     | Q8\_0 | **105.2** | 82.6   | 103.9      |
| UD-Q4\_K\_XL，服务器 | F16   | **110.4** | 81.5   | 102.4      |

在运行 Inkling-2-Mini 时，Unsloth 的解码速度通常更快，或与 Strata 持平。此外，Strata 并非按原样运行我们的 GGUF 权重——加载时会重新打包 `UD-Q4_K_XL` 为 NVFP4，并将 `UD-Q2_K_XL` 重新打包为 IQ1\_S，因此运行时使用的量化方式并不相同。

### 📊 基准测试

在 Thinking Machines Lab 的评测中，Mini 在下列规模相近的模型中，于所列软件工程和搜索基准测试上表现领先。Mini 的得分 **比 Qwen3.8-27B 在 DeepSWE v1.1 上高 6.0 个百分点** ，并且 **在 SWEBench Pro v2 (Hard) 上高 4.1 个百分点**.

<details>

<summary>点击查看完整基准测试表</summary>

| 基准测试                        | Inkling 2 Mini   | Gemma 4 31B  | Muse Glimmer | Qwen3.8-27B  | Nemotron 3.5 Super VL |
| --------------------------- | ---------------- | ------------ | ------------ | ------------ | --------------------- |
| 参数量（激活 / 总计，十亿）             | 5 / 26           | 31 / 31      | 30 / 30      | 27 / 27      | 12 / 125              |
| SWE-bench Verified          | **79.2%**        | 46.1%        | 76.0%        | 77.8%        | 71.1%                 |
| DeepSWE v1.1                | **48.2%**        | 0.3%         | 4.4%         | 42.2%        | 24.7%                 |
| Terminal Bench v4.0         | **5.6%**         | 0.0%         | 0.5%         | **5.6%**     | 0.0%                  |
| AA Index v5.0               | **20.1**         | 4.4          | 6.3          | **20.1**     | 13.6                  |
| Vals Index v2.2             | **46.5%**        | –            | –            | –            | 29.8%                 |
| SWE-bench Pro (Hard)        | **77.9%**        | 14.2%        | 44.3%        | 73.8%        | 44.1%                 |
| Terminal Bench v2.1         | 71.6%            | 43.4%        | 51.7%        | **73.0%**    | 60.7%                 |
| BrowseComp                  | **79.0%**        | 37.0%        | 63.9%        | 61.6%        | 78.9%                 |
| DeepSearchQA                | **85.3%**        | 61.7%        | 74.6%        | 79.7%        | 77.7%                 |
| GDPVal-AA v2.1              | 1319             | 627          | 792          | **1427**     | 1162                  |
| AutomationBench-AA          | 41.8%            | 4.9%         | 6.8%         | **48.2%**    | 14.8%                 |
| JobBench                    | **49.6%**        | 8.2%         | 16.1%        | 33.4%        | 36.5%                 |
| MMMU Pro                    | 74.9%            | 73.4%        | 74.3%        | **76.3%**    | 72.3%                 |
| OmniDocBench v1.6           | **92.8%**        | 82.5%        | 90.4%        | 91.5%        | 77.9%                 |
| ScreenSpot Pro（原版 / Python） | **76.5 / 87.7%** | 5.9 / –      | 75.4 / –     | 57.6 / 78.9% | 43.5 / –              |
| Chartography（原版 / Python）   | **22.1 / 72.5%** | 12.0 / 11.8% | 17.4 / 25.1% | 12.2 / 52.1% | 9.7 / 29.3%           |
| HLE-Diamond                 | 15.2%            | 7.2%         | 9.1%         | **15.3%**    | 8.8%                  |
| ARC-AGI（v1 / v2）            | **84.5 / 49.3%** | –            | –            | 87.5 / 42.4% | 22.7 / 1.5%           |
| LongBench v2                | **66.9%**        | 52.9%        | 33.1%        | 52.3%        | 62.1%                 |
| AA-Omniscience（得分）          | -8.6             | -48.5        | -32.2        | -6.4         | **-2.9**              |
| AA-Omniscience（非幻觉）         | 63.4%            | 14.5%        | 16.4%        | **71.4%**    | 69.5%                 |
| FORTRESS（对抗性）               | 89.5%            | 67.8%        | **90.3%**    | 78.8%        | 79.6%                 |
| FORTRESS（良性）                | 96.4%            | 97.6%        | 89.1%        | **97.8%**    | 92.7%                 |
| StrongREJECT                | 97.8%            | 98.1%        | 99.0%        | 99.0%        | **99.4%**             |

</details>


---

# 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/mo-xing/inkling-2-mini.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.
