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

# Inkling - How to Run Locally

**Inkling** by Thinking Machines Labs is a new 975B parameter (41B active) open model with up to a **1M context window**. Licensed under Apache 2.0, Inkling accepts text, images, and **audio** and generates text. The model excels at coding, agentic and tool-calling systems, RAG, chat, multilingual applications, and multimodal workloads.

The BF16 full weights requires at least **1.9 TB of disk space** - our dynamic GGUFs lowers this to **270–285 GB at dynamic 1-bit** and **317 GB at 2-bit**. [**Dynamic 1-bit retains \~74.2%**](#quantization-analysis) of top-1% accuracy whilst being **86% smaller!**

Dynamic 2-bit reaches 81% top-1% accuracy whilst being 82% smaller. This shows if we shrink the model down by 82% with our [Unsloth Dyanmic ](/docs/basics/unsloth-dynamic-2.0-ggufs.md)GGUF method - it does NOT mean the model gets 82% "dumber" - only \~18% degradation is seen. Thanks Thinking Machines Lab (TML) for giving Unsloth day-zero access. [**Inkling-GGUF**](https://huggingface.co/unsloth/inkling-GGUF)

<a href="/pages/Ow56TiJ4YSXurQDJ0d13#run-inkling-tutorials" class="button primary">Run Inkling Tutorials</a><a href="/pages/Ow56TiJ4YSXurQDJ0d13#quantization-analysis" class="button secondary">Quantization Results</a>

#### &#x20;:gear: Usage Guide

{% columns %}
{% column width="50%" %}
The 1-bit dynamic quant `UD-IQ1_S` uses **270GB** of disk space - this will need a Mac Studio Ultra or machines with at least RAM+VRAM to be 290GB or so.

The **1-bit** quant will fit on a 290GB RAM and 6/8-bit requires 900GB RAM. See the 1-bit GGUF in action to the right where we asked Inkling to make a Sudoku HTML game.

See right for 1-bit Inkling GGUF in Unsloth:
{% endcolumn %}

{% column width="50%" %}

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

**Table: Inference hardware requirements** (units = total memory: RAM + VRAM, or unified memory):

| 1-bit      | 2-bit  | 3-bit  | 4-bit  | 6/8bit | BF16    |
| ---------- | ------ | ------ | ------ | ------ | ------- |
| 280-295 GB | 325 GB | 450 GB | 600 GB | 870 GB | 1900 GB |

**Table: Top-1% Retained (Accuracy Recovery):**

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

{% hint style="success" %}
For best performance, make sure your total available memory, including VRAM and system RAM, exceeds the quantized model file size by a comfortable margin.
{% endhint %}

<div align="left"><figure><img src="/files/R507hUVgdMYftZiCVvje" alt=""><figcaption><p>Aquarium animation with Inkling 1-bit</p></figcaption></figure> <figure><img src="/files/sH59rM0X19RvCqJ53fDN" alt=""><figcaption><p>Audio parsing with 1-bit Inkling</p></figcaption></figure></div>

### Recommended Settings

Inkling has Non-thinking and Thinking modes. In [Unsloth Studio](#run-glm-5.2-in-unsloth-studio) you can easily toggle Thinking and non-Thinking with a UI.

Use these settings for most use cases:

| Default Settings (Most Tasks) |
| ----------------------------- |
| `temperature` = 1.0           |
| `top_p` = 1.0 (Off)           |

* **Maximum context window:** `1,048,576`. Tinker from TML provides the model through their API service at 64K and 256K context lengths as well.

#### Chat Template & thinking efforts

Inkling uses an interesting "Thinking effort level:" system prompt component where it's a number from 0.00 to 0.99! Tokenizing the below:

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

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

{% endcode %}

will get the below:

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

```
<|message_system|><|content_text|>Thinking effort level: 0.99<|end_message|><|message_user|><|content_text|>What is 1+1?<|end_message|><|message_model|><|content_text|>2!<|end_message|><|content_model_end_sampling|><|message_user|><|content_text|>What is 2+2?<|end_message|>
```

{% endcode %}

#### Disabling Thinking, changing reasoning effort

Inkling uses reasoning by default. It also supports reasoning efforts where `reasoning_effort` can be none = 0, low = 0.2, medium = 0.7, high = 0.9, xhigh = 0.99 and max = 0.99.

To disable thinking, use `--chat-template-kwargs '{"reasoning_effort":'none'}'`. If you're on **Windows** Powershell, use: `--chat-template-kwargs "{\"reasoning_effort\":'none'}"`

For reasoning effort customization and or to disable reasoning, use the below examples:

{% 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 also does interleaved thinking and tool calling - even with the dynamic 1-bit quant!
{% endcolumn %}

{% column %}

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

## Run Inkling Tutorials:

You can now run Inkling in [llama.cpp](#run-in-llama.cpp) and [Unsloth Studio](https://unsloth.ai/docs/models/pages/cZiZ00cwk1GGz1O1TOHo#run-glm-5.2-in-unsloth-studio). We will be utilizing the 270GB [`UD-IQ1_M`](https://huggingface.co/unsloth/inkling-GGUF) quant for best results in terms of accessibility and accuracy.

### 🦥 Run Inkling in Unsloth Studio

Inkling can run in [Unsloth Studio](/docs/new/studio.md), an open-source web UI for local AI. **Unsloth Studio automatically offloads to RAM and detects multiGPU setups**. With Unsloth Studio, you can run models locally on **MacOS, Windows**, Linux and:

{% columns %}
{% column %}

* Search, download, [run GGUFs](/docs/new/studio.md#run-models-locally) and safetensor models
* [**Self-healing** tool calling](/docs/new/studio.md#execute-code--heal-tool-calling) + **web search**
* [**Code execution**](/docs/new/studio.md#run-models-locally) (Python, Bash)
* [Automatic inference](/docs/new/studio.md#model-arena) parameter tuning (temp, top-p, etc.)
* Fast CPU + GPU inference via llama.cpp
* [Train LLMs](/docs/new/studio.md#no-code-training) 2x faster with 70% less VRAM
  {% endcolumn %}

{% column %}

<figure><img src="/files/peBtCZuyRNLPLZ5cVNO8" alt=""><figcaption><p>1-bit Inkling GGUF multimodal example</p></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% stepper %}
{% step %}
**Install and Launch Unsloth**

To install, run in your terminal:

MacOS, Linux, WSL:

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

Windows PowerShell:

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

**Launch Unsloth**

MacOS, Linux, WSL and Windows:

```bash
unsloth studio -H 0.0.0.0 -p 8888
```

Then open `http://127.0.0.1:8888` (or your specific URL) in your browser.

**Launch Unsloth securely with HTTPS and Cloudflare**

**NEW!** Unsloth now provides a secure way to launch Studio over HTTPS through a free Cloudflare tunnel. Use the below (works in Windows, Mac & Linux):

```bash
unsloth studio --secure
```

{% endstep %}

{% step %}
**Search and download** Inkling

Unsloth Studio automatically offloads to RAM and detects multiGPU setups. On first launch you will need to create a password to secure your account and sign in again later.

Then go to the [Studio Chat](/docs/new/studio/chat.md) tab and search for **Inkling** in the search bar and download your desired model and quant. Ensure you have enough compute the run the model.

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

{% step %}
**Run Inkling**

Inference parameters should be auto-set when using Unsloth Studio, however you can still change it manually. You can also edit the context length, chat template and other settings.

For more information, you can view our [Unsloth Studio inference guide](/docs/new/studio/chat.md).

<div data-with-frame="true"><figure><img src="/files/R507hUVgdMYftZiCVvje" alt=""><figcaption><p>1-bit Inkling running in Unsloth Studio</p></figcaption></figure></div>
{% endstep %}
{% endstepper %}

### 🦙 Run Inkling in llama.cpp

For this guide we'll be running the `UD-IQ1_S` quant which will require at least 290GB RAM. Feel free to change quantization type. For these tutorials, we will using [llama.cpp](llama.cpphttps://github.com/ggml-org/llama.cpp) for fast local inference. GGUF: [**Inkling-GGUF**](https://huggingface.co/unsloth/Inkling-GGUF)&#x20;

{% stepper %}
{% step %}
Obtain the SPECIFIC `llama.cpp` PR on [GitHub here](https://github.com/ggml-org/llama.cpp/pull/25731). You can follow the build instructions below as well. Change `-DGGML_CUDA=ON` to `-DGGML_CUDA=OFF` if you don't have a GPU or just want CPU inference. **For Apple Mac / Metal devices**, set `-DGGML_CUDA=OFF` then continue as usual - Metal support is on by default.

```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 %}
You can now use `llama.cpp` directly to load and download models, just like `ollama run`. First, select the quantization type you want like `Q2_K_XL`. Also use `export LLAMA_CACHE="folder"` to force `llama.cpp` to save to a specific location. Note this download process might be very slow, so it's probably best to use the manual download process in the next section.

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

{% endstep %}

{% step %}
If you want to download the model manually, we can download the model via the code below (after installing `pip install huggingface_hub`). If downloads get stuck, see: [Hugging Face Hub, XET debugging](/docs/basics/troubleshooting-and-faqs/hugging-face-hub-xet-debugging.md)

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

{% endstep %}

{% step %}
You can edit `--threads 32` for the number of CPU threads, `--ctx-size 32768` for context length, `--n-gpu-layers 2` for GPU offloading on how many layers. Try adjusting it if your GPU goes out of memory. Also remove it if you have CPU only inference. We implemented a Flash Attention bias fused kernel in llama.cpp as well to reduce VRAM usage - but best to keep `--ctx-size` modest still!

{% 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:Quantization Analysis

We also ran KLD (KL Divergence) benchmarks to gauge the accuracy of our quantizations of Inkling-GGUF. We first created a 8-bit + 6-bit quant mixture for the model with 6-bit for the ffn\_up and ffn\_gate exps, and found RMSE to be 1e-4 or less in terms of dequantization - quantizing ffn\_down increased error 10x more, so that is kept in Q8\_0 for the 8/6-bit quant

On pure top-1% accuracy, **dynamic 1-bit gets around 74.2% accuracy yet being 86% smaller**! Dynamic 2-bit gets around 81% accuracy whilst being 82% smaller. This shows dynamically quantizing some layers to higher precision does not make the model unusable and fully useless - we show selectively quantizing layers can recover a lot of accuracy!

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

**But what does "74% accuracy" actually entail?**

It does NOT mean 26% of the time the model outputs gibberish or wrong results - instead it means 26% of the top, it might choose the 2nd highest probable answer more.

For example asking "Create a poem" will produce vastly different results - 74% of the time it'll be similar poems to the BF16 baseline, but 26% it'll be another poem, but still correct. For factual answers where creativity and sampling is not involved, the model will always recall the same answer (for example "What is 2+2", it'll always say 4, not 5 ever)

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

## 📊 Benchmarks

You can view further below for Inkling benchmarks in table format:


---

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