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

# Inkling - 如何本地运行

Thinking Machines Labs 的 Inkling 是开源权重的多模态模型，由以下部分组成： **Inkling-Small** 新的 **276B** （12B 激活）模型，以及更早的 **975B** （41B）参数模型。该模型采用 Apache 2.0 许可证，支持 100 万 token 的上下文窗口，并原生支持以下多模态输入： **文本**, **图像**、 **音频**, 并生成 **文本** 作为输出。Inkling 在编程、智能体与工具调用、RAG、聊天、多语言和多模态工作负载方面表现出色。

动态 2-bit 可达到 81% 的 top-1% 准确率，同时体积缩小 82%。这表明，如果我们用我们的 [Unsloth 动态 ](/docs/zh/ji-chu/dynamic-3.0-ggufs.md)GGUF 方法将模型缩小 82%——这并不意味着模型会变得“蠢” 82%——实际上只会看到约 18% 的性能下降。感谢 Thinking Machines Lab（TML）在第一时间为 Unsloth 提供访问权限。 [**Inkling-Small-GGUF**](https://huggingface.co/unsloth/Inkling-Small-GGUF) 和 [**Inkling-GGUF**](https://huggingface.co/unsloth/inkling-GGUF)

<a href="/pages/2c9b1eabcb0e4d54444498ac08c65652e5f625d9#run-inkling-tutorials" class="button primary">运行 Inkling 教程</a><a href="/pages/2c9b1eabcb0e4d54444498ac08c65652e5f625d9#quantization-analysis" class="button secondary">量化结果</a>

#### &#x20;:gear: 使用指南

{% columns %}
{% column width="50%" %}
1-bit 动态量化 `UD-IQ1_S` 使用 **270GB** 的磁盘空间——这将需要 Mac Studio Ultra，或至少拥有约 290GB RAM+VRAM 的机器。

该 **1 位** 该量化可适配 290GB RAM，而 6/8-bit 需要 900GB RAM。右侧可查看 1-bit GGUF 的实际效果，我们让 Inkling 生成了一个数独 HTML 游戏。

右侧查看 Unsloth 中的 1-bit Inkling GGUF：
{% endcolumn %}

{% column width="50%" %}

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

**表：推理硬件要求** （单位 = 总内存：RAM + VRAM，或统一内存）：

| 模型            | 2 位    | 3 位    | 4-bit        | 6/8bit | BF16    |
| ------------- | ------ | ------ | ------------ | ------ | ------- |
| Inkling-Small | 89 GB  | 128 GB | 132 - 170 GB | 256 GB | 543 GB  |
| Inkling       | 325 GB | 450 GB | 600 GB       | 870 GB | 1900 GB |

**表：975B Inkling 的 top-1% 保留率（准确率恢复）：**

| 1 位         | 2 位   | 3 位   | 4-bit | 6/8bit | BF16   |
| ----------- | ----- | ----- | ----- | ------ | ------ |
| 74.2%-77.4% | 81.0% | 88.7% | 94.4% | 99.8%  | 100.0% |

{% hint style="success" %}
为获得最佳性能，请确保总可用内存（包括 VRAM 和系统 RAM）比量化模型文件大小充裕地大出一截。
{% endhint %}

<div align="left"><figure><img src="/files/68811dd8942e7f918e071884334786c5fd88791c" alt=""><figcaption><p>使用 Inkling 1-bit 进行数独</p></figcaption></figure> <figure><img src="/files/c2273b0f5411087e47d59b7a7eff573992e4ed21" alt=""><figcaption><p>使用 1-bit Inkling 进行音频解析</p></figcaption></figure></div>

### 推荐设置

Inkling 具有非思考和思考模式。在 [Unsloth Studio](#run-glm-5.2-in-unsloth-studio) 你可以通过 UI 轻松切换思考和非思考模式。

大多数用例请使用这些设置：

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

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

#### 聊天模板与思考努力程度

Inkling 使用了一个有趣的“Thinking effort level:”系统提示组件，其中它是一个从 0.00 到 0.99 的数值！对下面内容进行分词：

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

```python
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("unsloth/inkling")
tokenizer.apply_chat_template([
    {"role" : "user", "content" : "1+1 等于多少？"},
    {"role" : "assistant", "content" : "2!"},
    {"role" : "user", "content" : "2+2 等于多少？"},
], tokenize = False, reasoning_effort = "xhigh")
```

{% endcode %}

将得到如下内容：

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

```
<|message_system|><|content_text|>思考努力级别：0.99<|end_message|><|message_user|><|content_text|>1+1 等于多少？<|end_message|><|message_model|><|content_text|>2!<|end_message|><|content_model_end_sampling|><|message_user|><|content_text|>2+2 等于多少？<|end_message|>
```

{% endcode %}

#### 禁用思考，调整推理强度

Inkling 默认使用推理。它还支持推理努力程度，其中 `reasoning_effort` 可以是 none = 0、low = 0.2、medium = 0.7、high = 0.9、xhigh = 0.99 和 max = 0.99。

要禁用思考，请使用 `--chat-template-kwargs '{"reasoning_effort":'none'}'`。如果你使用的是 **Windows** PowerShell 上，请使用： `--chat-template-kwargs "{\"reasoning_effort\":'none'}"`

如需自定义推理强度或禁用推理，请使用以下示例：

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

```bash
--chat-template-kwargs '{"reasoning_effort":"none"}'
--chat-template-kwargs '{"reasoning_effort":"low"}'
--chat-template-kwargs '{"reasoning_effort":"medium"}'
--chat-template-kwargs '{"reasoning_effort":"high"}'
--chat-template-kwargs '{"reasoning_effort":"xhigh"}'
--chat-template-kwargs '{\"reasoning_effort\":\"max\"}'
```

{% endcode %}

{% columns %}
{% column %}
Inkling 也支持交错思考和工具调用——即使使用动态 1-bit 量化也是如此！
{% endcolumn %}

{% column %}

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

## 运行 Inkling 教程：

Inkling 可在 Unsloth 上运行于 MacOS、Windows 和 Linux。你可以：

{% columns %}
{% column %}

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

{% column %}

<figure><img src="/files/f1d0455f4ecc29e9d528d1f48beacf59b5162dee" alt=""><figcaption><p>1-bit Inkling GGUF 多模态示例</p></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% stepper %}
{% step %}
**安装并启动 Unsloth**

要安装，请在终端中运行：

MacOS、Linux、WSL：

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

Windows PowerShell：

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

**启动 Unsloth**

MacOS、Linux、WSL 和 Windows：
{% endstep %}

{% step %}
**搜索并下载** Inkling

然后前往 [Unsloth Chat](/docs/zh/xin/studio/chat.md) 选项卡并搜索 **Inkling** 在搜索栏中下载你想要的模型和量化版本。确保你有足够的算力来运行模型。

<div data-with-frame="true"><figure><img src="/files/515e3f91263383c184dc043368c8e733c64b33aa" alt="" width="563"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**运行 Inkling**

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

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

<div data-with-frame="true"><figure><img src="/files/faa2fa5f1b0b82dae60e6ab511aabf12a4cf2d93" alt=""><figcaption><p>在 Unsloth Studio 中运行的 1-bit Inkling</p></figcaption></figure></div>
{% endstep %}
{% endstepper %}

### 🦙 在 llama.cpp 中运行 Inkling

在本指南中，我们将运行 `UD-IQ1_S` 该量化将至少需要 290GB RAM。你可以自由更改量化类型。对于这些教程，我们将使用 [llama.cpp](llama.cpphttps://github.com/ggml-org/llama.cpp) 以进行快速本地推理。GGUF： [**Inkling-GGUF**](https://huggingface.co/unsloth/Inkling-GGUF)&#x20;

#### 下载 Unsloth

### Unsloth 指南

<https://unsloth.ai/download>

{% stepper %}
{% step %}
获取指定的 `llama.cpp` PR 于 [GitHub 这里](https://github.com/ggml-org/llama.cpp/pull/25731)。你也可以按照下面的构建说明操作。将 `-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 https://github.com/ggml-org/llama.cpp
gh pr checkout 25731
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 %}
你现在可以使用 `llama.cpp` 直接加载和下载模型，就像 `ollama run`。首先，选择你想要的量化类型，例如 `Q2_K_XL`。还可以使用 `export LLAMA_CACHE="folder"` 来强制 `llama.cpp` 来保存到指定位置。注意，此下载过程可能非常慢，因此最好使用下一节中的手动下载方式。

**Inkling-Small 276B：**

```bash
export LLAMA_CACHE="unsloth/Inkling-Small-GGUF"
./build/bin/llama-cli \\
    -hf unsloth/Inkling-Small-GGUF:UD-Q3_K_XL \\
    --temp 1.0 \
    --top-p 1.0 \
    --min-p 0.0
```

**Inkling 975B：**

{% code overflow="wrap" %}

```bash
export LLAMA_CACHE="unsloth/Inkling-GGUF"
./build/bin/llama-cli \\
    -hf unsloth/Inkling-GGUF:UD-IQ1_S \\
    --temp 1.0 \
    --top-p 1.0 \
    --min-p 0.0
```

{% endcode %}
{% endstep %}

{% step %}
如果你想手动下载模型，我们可以通过下面的代码下载模型（在安装 `pip install huggingface_hub`）之后。如果下载卡住，请查看： [Hugging Face Hub，XET 调试](/docs/zh/ji-chu/troubleshooting-and-faqs/hugging-face-hub-xet-debugging.md)

**Inkling-Small 276B：**

```bash
hf download unsloth/Inkling-Small-GGUF \\
    --local-dir unsloth/Inkling-Small-GGUF \\
    --include "*UD-Q3_K_XL*" # 4-bit 使用 "*UD-Q4_K_XL*"
```

**Inkling 975B：**

{% code overflow="wrap" %}

```bash
hf download unsloth/Inkling-GGUF \\
    --local-dir unsloth/Inkling-GGUF \\
    --include "*UD-IQ1_S*" # 2-bit 使用 "*UD-Q2_K_XL*"
```

{% endcode %}
{% endstep %}

{% step %}
你可以修改 `--threads 32` 以设置 CPU 线程数， `--ctx-size 32768` 以设置上下文长度， `--n-gpu-layers 2` 用于 GPU 卸载的层数。若你的 GPU 显存不足，请尝试调整它。如果你只使用 CPU 推理，也请移除它。我们还在 llama.cpp 中实现了一个 Flash Attention bias 融合内核，以减少 VRAM 使用——但最好还是保持 `--ctx-size` 尽量适中！

**Inkling-Small 276B：**

{% code overflow="wrap" %}

```bash
./build/bin/llama-cli \\
    --model unsloth/Inkling-Small-GGUF/UD-Q3_K_XL/Inkling-Small-UD-Q3_K_XL-00001-of-00004.gguf \\
    --temp 1.0 \
    --top-p 1.0 \
    --min-p 0.0
```

{% endcode %}

**Inkling 975B：**

{% code overflow="wrap" %}

```bash
./build/bin/llama-cli \\
    --model unsloth/Inkling-GGUF/UD-IQ1_S/inkling-UD-IQ1_S-00001-of-00007.gguf \\
    --temp 1.0 \
    --top-p 1.0 \
    --min-p 0.0
```

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

### :triangular\_ruler:量化分析

我们还进行了 KLD（KL 散度）基准测试，以评估 Inkling-GGUF 量化的准确性。我们首先为该模型创建了一个 8-bit + 6-bit 的混合量化方案，对 ffn\_up 和 ffn\_gate 的指数使用 6-bit，并发现从反量化角度看 RMSE 为 1e-4 或更低；将 ffn\_down 量化会使误差增加 10 倍，因此在 8/6-bit 量化中它被保留为 Q8\_0

在纯 top-1% 准确率上， **动态 1-bit 的准确率约为 74.2%，同时体积缩小 86%**！动态 2-bit 的准确率约为 81%，同时体积缩小 82%。这表明，将某些层动态量化到更高精度并不会让模型变得不可用、毫无价值——我们展示了选择性量化层可以恢复很多准确率！

<figure><img src="/files/7c5ad2faf7b8f7fbe0ef6237c12afa006682736d" alt="" width="563"><figcaption></figcaption></figure>

**但“74% 准确率”究竟意味着什么？**

这并不意味着有 26% 的时候模型会输出胡言乱语或错误结果——相反，它表示在前 26% 的情况下，它可能会更多选择第二高概率的答案。

例如，询问“创作一首诗”会产生截然不同的结果——74% 的时候，它会生成与 BF16 基线相似的诗歌，但 26% 的时候，它会生成另一首诗，但仍然是正确的。对于不涉及创造性和采样的事实性问题，模型将始终回忆出相同答案（例如“2+2 等于多少”，它永远会回答 4，绝不会是 5）

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

## 📊 基准测试

你可以在下方以表格形式查看 Inkling 的更多基准结果：

Inkling 结果按 effort=0.99 报告。对比评分生成于 2026 年 7 月 14 日。Nemotron 3 Ultra、Kimi K2.5、Kimi K2.6、GLM 5.2 和 DeepSeek V4 Pro 是开放权重模型；Gemini 3.1 Pro、Claude Fable 5 和 GPT 5.6 Sol 是闭源权重模型。

|             |                            | Inkling | Nemotron 3 Ultra | Kimi K2.5 | Kimi K2.6 | GLM 5.2 | DeepSeek V4 Pro | Gemini 3.1 Pro（high） | Claude Fable 5（max） | GPT 5.6 Sol（xhigh） |
| ----------- | -------------------------- | ------- | ---------------- | --------- | --------- | ------- | --------------- | -------------------- | ------------------- | ------------------ |
| **推理**      |                            |         |                  |           |           |         |                 |                      |                     |                    |
|             | HLE（仅文本）                   | 29.7%   | 26.6%            | 29.4%     | 35.9%     | 40.1%   | 35.9%           | 44.7%                | 53.3%               | 47.2%              |
|             | HLE（有工具）                   | 46.0%   | 37.4%            | 50.2%     | 54.0%     | 54.7%   | 48.2%           | 51.4%                | 64.5%               | 55.0%              |
|             | AIME 2026                  | 97.1%   | 94.2%            | 95.8%     | 96.4%     | 99.2%   | 96.7%           | 98.3%                | –                   | 99.9%              |
|             | GPQA Diamond               | 87.2%   | 86.7%            | 87.9%     | 91.1%     | 89.5%   | 88.8%           | 94.1%                | 92.6%               | 94.1%              |
| **智能体（编程）** |                            |         |                  |           |           |         |                 |                      |                     |                    |
|             | SWEBench Verified          | 77.6%   | 70.7%            | 76.8%     | 80.2%     | –       | 80.6%           | 80.6%                | 95.0%               | –                  |
|             | SWEBench Pro（公开）           | 54.3%   | 46.4%            | 50.7%     | 58.6%     | 62.1%   | 55.4%           | 54.2%                | 80.0%               | 64.6%              |
|             | Terminal Bench 2.1（最佳测试框架） | 63.8    | 56.4             | 51.3      | 71.3      | 82.7    | 64              | 73.8                 | 84.6                | 89.5               |
|             | GDPVal-AA v2               | 1233    | 1164             | 1009      | 1190      | 1514    | 1307            | 962                  | 1760                | 1748               |
| **智能体（通用）** |                            |         |                  |           |           |         |                 |                      |                     |                    |
|             | MCP Atlas                  | 74.1%   | 44.7%            | 64.0%     | 68.1%     | 77.8%   | 73.2%           | 78.2%                | 83.3%               | 81.8%              |
|             | Tau 3 Banking              | 23.7%   | 13.8%            | 13.2%     | 20.6%     | 26.8%   | 25.8%           | 16.5%                | 26.8%               | 33.0%              |
| **事实性**     |                            |         |                  |           |           |         |                 |                      |                     |                    |
|             | BrowseComp（含上下文）           | 77.1%   | –                | 74.9%     | 83.2%     | –       | 83.4%           | 85.9%                | 88.0%               | 89.4%              |
|             | SimpleQA Verified          | 43.9%   | 32.4%            | 36.9%     | 38.7%     | 38.1%   | 57.0%           | 77.3%                | 68.3%               | 71.6%              |
|             | AA Omniscience             | 1.0%    | -1.0%            | -8.0%     | 6.0%      | 4.0%    | -10.0%          | 33.0%                | 40.0%               | 22.0%              |
| **聊天**      |                            |         |                  |           |           |         |                 |                      |                     |                    |
|             | IFBench                    | 79.8%   | 81.4%            | 70.2%     | 76.0%     | 73.3%   | 76.5%           | 77.1%                | 63.5%               | 72.7%              |
|             | Global-MMLU-Lite           | 88.7%   | 85.6%            | 84.0%     | 88.4%     | 89.2%   | 89.3%           | 92.7%                | 93.3%               | 91.8%              |
| **视觉**      |                            |         |                  |           |           |         |                 |                      |                     |                    |
|             | MMMU Pro（标准 10）            | 73.3%   | –                | 75.0%     | 79.0%     | –       | –               | 82.0%                | 84.2%               | 83.0%              |
|             | Charxiv RQ                 | 78.1%   | –                | 77.5%     | 80.4%     | –       | –               | 80.2%                | 86.5%               | 84.7%              |
|             | Charxiv RQ（含 Python）       | 82.0%   | –                | 78.7%     | 86.7%     | –       | –               | 89.9%                | 89.4%               | 87.8%              |
| **音频**      |                            |         |                  |           |           |         |                 |                      |                     |                    |
|             | 音频选择题                      | 56.6%   | –                | –         | –         | –       | –               | 66.8%                | –                   | –                  |
|             | MMAU                       | 77.2%   | –                | –         | –         | –       | –               | 82.5%                | –                   | –                  |
|             | VoiceBench                 | 91.4%   | –                | –         | –         | –       | –               | 94.3%                | –                   | –                  |
| **安全性**     |                            |         |                  |           |           |         |                 |                      |                     |                    |
|             | FORTRESS（对抗）               | 78.0%   | 77.6%            | 54.1%     | 65.6%     | 71.3%   | 36.0%           | 65.2%                | 96.0%               | 82.4%              |
|             | FORTRESS（良性）               | 95.9%   | 90.5%            | 98.3%     | 97.2%     | 90.0%   | 98.5%           | 98.0%                | 55.1%               | 98.1%              |
|             | StrongREJECT               | 98.6%   | 98.7%            | 99.5%     | 99.8%     | 98.5%   | 98.6%           | 98.0%                | 98.7%               | 98.5%              |


---

# 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/inkling.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.
