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

# Qwen3.8-Flash-Next: How to Run Locally

Guide to run Qwen3.8-Flash-Next locally.

Qwen3.8-Flash-Next is a new open-weight, **125B parameter** MoE multimodal model from Qwen. Built on the new Qwen4 architecture, it supports a 256K context window. [Qwen3.8](https://unsloth.ai/docs/models/qwen3.8.md)-Flash-Next outperforms Claude-4.6-Opus (Max) and can run locally on devices with **32GB+ RAM**/unified memory with no GPU VRAM required. To run the model, use our [GGUFs](https://huggingface.co/unsloth/Qwen3.8-Flash-Next-GGUF) via llama.cpp, Strata or [Unsloth Desktop](https://unsloth.ai/docs/desktop.md). Thank you Qwen for day zero access.

{% columns %}
{% column %}
**Nov 4:** We're introducing our new Unsloth [Dynamic v3.1](https://unsloth.ai/docs/basics/dynamic-3.0-ggufs.md) GGUFs, where 1-bit quant achieves 54.0% on DeepSWE v1.1 and 68.3% on Terminal Bench 2.1. Unsloth Qwen GGUFs result in **10-15% increased accuracy** and **50% less token usage** vs other quants of the same size.

<a href="https://unsloth.ai/pages/Ef8lrnBt1lmETOqIFCHj#run-qwen3.8-flash-next-in-unsloth" class="button primary">Run Qwen3.8-Flash</a><a href="https://unsloth.ai/download" class="button secondary">Download Unsloth</a>
{% endcolumn %}

{% column %}

<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F1YneA51oWzaIiwep9H5I%2F1000024423.gif?alt=media&amp;token=40a169cc-12f1-403a-898c-b310f81ff52a" alt=""><figcaption><p>4-bit Qwen3.8-Flash running in Unsloth</p></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Dynamic V3.1 Update (November 4th 2026) <a href="#dynamic-v3.1-update-november-2nd-2026" id="dynamic-v3.1-update-november-2nd-2026"></a>

We're releasing new Qwen3.8-Flash-Next GGUFs which using our new [**Unsloth Dynamic**](https://unsloth.ai/docs/basics/dynamic-3.0-ggufs) **V3.1 (preview) algorithm** which improves Unsloth quants on most benchmarks and is the best in class for it's size vs other providers. We previously showed how V3.1 for [/pages/P265CJSPfOXTtJ9qxh3j#dynamic-v3.1-update-november-2nd-2026](https://unsloth.ai/pages/P265CJSPfOXTtJ9qxh3j#dynamic-v3.1-update-november-2nd-2026 "mention") worked very well, and we're extending our new algorithms to Qwen3.8-Flash-Next.

<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FqdXHweLFGzUhUcqj7jZX%2Ffinal%20key%204.png?alt=media&amp;token=8e3249b1-e26c-4a04-82ba-7cfdef952fe6" alt=""><figcaption></figcaption></figure>

**We ran agentic benchmarks including Terminal Bench 2.1, DeepSWE v1.1,** Automation Bench v1.0.6, Aider Polyglot, and general benchmarks like LiveCodeBench v6, GPQA Diamond, MMLU-Pro, AIME25 and many others. Some highlights of our benchmarking process:

* Benchmarks are noisy - we did **26.2B tokens of benchmarking** - DeepSWE accounted for 18.1B tokens of the total budget followed by Terminal Bench (5.2B tokens).
* temperature 1.0, top\_p 0.95, top\_k 20, min\_p 0, no presence or repetition penalty. preserve\_thinking and xhigh reasoning.
* We did the max 256K non YaRN context for all agentic benchmarks and 128K for generic non agentic benchmarks
* We ran benchmarks multiple times including LiveCodeBench x3 times, HMMT and others 8-16x and agentic benchmarks multiple times.

Not only do you get extra accuracy, but Dynamic V3.1 bring thinking and token use down to match 95% of the full precision Qwen3.8-Flash-Next model. Result: up to **50% fewer token use**, 7% faster + \~15% higher accuracy vs other quants of the same size.

<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FWTSMbLLxexSW1HiwU411%2Fqwen%20speed%20token%20con.png?alt=media&amp;token=fea0700d-24e7-4046-a915-4c087e0230aa" alt=""><figcaption></figcaption></figure>

Full benchmark results are provided as well, with the first plot being a percentage accuracy recovery from the baseline and averaged across all (not weighted). This approximately is a metric of what each quant retains in accuracy vs the Qwen3.8-Flash-Next baseline. We also ran KLD benchmarks as well vs our old V3 quants, and show a massive improvement as well.

<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FqtYLWCee7jmzbN0QkdZ2%2Ffully%20final.png?alt=media&amp;token=13bc2b54-bb90-440c-a090-18e7d7cee627" alt="" width="563"><figcaption></figcaption></figure>

All our metholodogies and graders, methods are discussed in [Dynamic 3.1 GGUFs](https://unsloth.ai/docs/basics/dynamic-3.0-ggufs/dynamic-3.1-ggufs.md)

### Mix N Match Engrams

We also now allow you to mix n match the engram with BF16, Q8\_0, Q5\_1 or IQ4\_NL components, so if you have more disk space you can use higher precisions.

<table><thead><tr><th width="254.699951171875">file</th><th>type</th><th>size</th><th>relative RMSE vs BF16</th></tr></thead><tbody><tr><td><code>Qwen3.8-Flash-Next-engram-BF16.gguf_file</code></td><td>BF16</td><td>102.4 GB</td><td>0</td></tr><tr><td><code>Qwen3.8-Flash-Next-engram-Q8_0.gguf_file</code></td><td>Q8_0</td><td>54.4 GB</td><td>0.0053</td></tr><tr><td><code>Qwen3.8-Flash-Next-engram-Q5_1.gguf_file</code></td><td>Q5_1</td><td>38.4 GB</td><td>0.0376</td></tr><tr><td><code>Qwen3.8-Flash-Next-engram-IQ4_NL.gguf_file</code></td><td>IQ4_NL</td><td>28.8 GB</td><td>0.0757</td></tr></tbody></table>

In Unsloth, open the model picker, hover the model and click its gear icon to open its run settings, turn on **Advanced settings**, and pick a table under **Memory > Engram Table**. The menu shows each table's size and marks the one the quant ships with as built-in. Unsloth downloads the chosen table when it next loads the model, and skips the quant's own table if you have not downloaded it yet. From the command line, add `--engram`:

<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F5CbIEHhVy6nTxIwaQrD1%2Fengram-table-qwen.png?alt=media&amp;token=7bfe930f-c498-496a-9ce2-95bfdbaf56fa" alt="" width="375"><figcaption></figcaption></figure>

```bash
unsloth run --model unsloth/Qwen3.8-Flash-Next-GGUF:UD-Q4_K_XL --engram Q8_0
```

llama.cpp b12233 or newer can load a table directly with `--ple` ([PR #31185](https://github.com/ggml-org/llama.cpp/pull/31185)), with no `set_split.py` or renaming. Download the table you want and add `--ple` to your usual command. Example: UD-Q4\_K\_XL with the Q8\_0 table:

```bash
hf download unsloth/Qwen3.8-Flash-Next-GGUF \
    --local-dir unsloth/Qwen3.8-Flash-Next-GGUF \
    --include "engram/*Q8_0*"
./llama.cpp/llama-server \
    --model unsloth/Qwen3.8-Flash-Next-GGUF/UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf \
    --ple unsloth/Qwen3.8-Flash-Next-GGUF/engram/Qwen3.8-Flash-Next-engram-Q8_0.gguf_file
```

llama.cpp then ignores the quant's own table, which is one of the quant's files (`-00004-of-00004` for UD-Q4\_K\_XL; the [engram README](https://huggingface.co/unsloth/Qwen3.8-Flash-Next-GGUF/blob/main/engram/README.md) lists it for each quant). Deleting that file, or not downloading it with `--exclude "UD-Q4_K_XL/*-00004-of-00004.gguf"`, saves 28.8 GB. Without `--ple`, the quant goes back to its own table, or fails to start if that file is gone. The manual method below still works on older builds, including the MTP branch further down this page.

You do not need to download the table a quant ships with if you want a different one. Exclude the quant's table shard and fetch the table you want from this folder instead. Use [the script here](https://huggingface.co/unsloth/Qwen3.8-Flash-Next-GGUF/blob/main/engram/set_split.py) which isn't very long ie:

{% code overflow="wrap" %}

```python
import struct, sys
path, idx, cnt = sys.argv[1], int(sys.argv[2]), int(sys.argv[3])
with open(path, "r+b") as f:
    head = f.read(1 << 24)
    for key, val in ((b"split.no", idx - 1), (b"split.count", cnt)):
        f.seek(head.index(struct.pack("<Q", len(key)) + key + struct.pack("<I", 2)) + len(key) + 12)
        f.write(struct.pack("<H", val))
```

{% endcode %}

Example: UD-Q4\_K\_XL with the Q8\_0 table (saves the 28.8 GB IQ4\_NL shard):

{% code expandable="true" %}

```bash
# 1. UD-Q4_K_XL without its table shard (-00004-of-00004)
hf download unsloth/Qwen3.8-Flash-Next-GGUF \
  --include "UD-Q4_K_XL/*" --exclude "UD-Q4_K_XL/*-00004-of-00004.gguf" --local-dir .

# 2. the Q8_0 table + the script
hf download unsloth/Qwen3.8-Flash-Next-GGUF \
  --include "engram/*Q8_0*" "engram/set_split.py" --local-dir .

# 3. stamp it as shard 4 of 4 and put it in the table shard's place
python engram/set_split.py engram/Qwen3.8-Flash-Next-engram-Q8_0.gguf_file 4 4
mv engram/Qwen3.8-Flash-Next-engram-Q8_0.gguf_file \
   UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00004-of-00004.gguf

# 4. run as usual
llama-server -m UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf
```

{% endcode %}

### Swap an engram you already downloaded

For example you want to switch out UD-Q6\_K\_XL with the lossless BF16 table. llama.cpp checks that each shard's `split.no` / `split.count` match its place in the set, so the table file has to be stamped for your quant first. `set_split.py` (in this folder, plain Python, no dependencies) changes those two header values in place in milliseconds; nothing else in the file changes.

{% code expandable="true" %}

```bash
# 1. get the table + the script
hf download unsloth/Qwen3.8-Flash-Next-GGUF \
  --include "engram/*BF16*" "engram/set_split.py" --local-dir .

# 2. stamp it as shard 3 of 6 (UD-Q6_K_XL's table slot)
python engram/set_split.py engram/Qwen3.8-Flash-Next-engram-BF16.gguf_file 3 6

# 3. keep the old table aside, then rename the new one to the table shard's name
mv UD-Q6_K_XL/Qwen3.8-Flash-Next-UD-Q6_K_XL-00003-of-00006.gguf UD-Q6_K_XL/engram-Q8_0.bak
mv engram/Qwen3.8-Flash-Next-engram-BF16.gguf_file \
   UD-Q6_K_XL/Qwen3.8-Flash-Next-UD-Q6_K_XL-00003-of-00006.gguf

# 4. run as usual
llama-server -m UD-Q6_K_XL/Qwen3.8-Flash-Next-UD-Q6_K_XL-00001-of-00006.gguf
```

{% endcode %}

### :gear: Usage Guide

Whether you run **Qwen3.8-Flash-Next** on a CPU with system RAM or on a GPU with VRAM may make relatively little difference. Its unique architecture allows inference using RAM or unified memory to achieve performance closer to that of GPU VRAM than is typical for other models. This makes it particularly well suited to Macs, NVIDIA DGX Spark systems, and other devices with large memory capacities.

You will need at least **75 GB of RAM or unified memory** to run the model. Its smallest 1-bit quantized version is larger than usual because of new Ngram layers or per layer embeddings which is like a lookup table. However, this also means the quantization is less aggressive, allowing the model to retain more of its original accuracy than more heavily quantized models. You can also offload the PLE / Ngram layer to SSD and use mmap which allows less usage of CPU and GPU VRAM.

#### Qwen3.8-Flash-Next Requirements:

The smallest quant works on 32GB RAM so it's best to have a 32GB RAM/unified memory device.\
**Table: Hardware requirements** (units = total memory: RAM + VRAM, or unified memory)

<table><thead><tr><th>1-bit</th><th>2-bit</th><th>3-bit</th><th>4-bit</th><th width="128">5-bit</th><th>8-bit</th><th>BF16</th></tr></thead><tbody><tr><td>32 GB</td><td>42 GB</td><td>50 GB</td><td>64 GB</td><td>80 GB</td><td>128 GB</td><td>355 GB</td></tr></tbody></table>

{% hint style="info" %}
If you want to use [MTP](https://unsloth.ai/docs/models/mtp.md) for faster inference, prepare to have 1-2GB extra headroom.
{% endhint %}

### Recommended Settings

Qwen3.8-Flash-Next is a **hybrid thinking** model with different default settings for thinking and non-thinking modes. Extra high is enabled by default so if you want shorter thinking traces, you can [adjust the thinking effort](#thinking--preserve-thinking):

| Parameter            | Thinking Mode | Instruct (non-thinking) Mode |
| -------------------- | ------------- | ---------------------------- |
| `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                          |

* Context length = up to `262,144`
* Thinking Mode: `temperature=1.0`, `top_p=0.95`, `top_k=20`, `min_p=0.0`, `presence_penalty=0.0`, `repetition_penalty=1.0`
* Instruct (or non-thinking) mode: `temperature=0.7`, `top_p=0.80`, `top_k=20`, `min_p=0.0`, `presence_penalty=1.5`, `repetition_penalty=1.0`

### 💡 Thinking + Preserve Thinking

{% columns %}
{% column %}
Qwen3.8-Flash-Next has **Preserve Thinking** which leaves the thinking trace from the previous conversation. This increases the number of tokens you use, but could increase accuracy in continued conversations. [Unsloth](#run-qwen3.8-in-unsloth-desktop) has 'Think' and Preserved Thinking toggles for Qwen3.8 (see right):
{% endcolumn %}

{% column %}

<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FLdgmjRrb5qhpbY9PwYe8%2FScreenshot%202026-08-14%20at%2011.26.15%E2%80%AFAM.png?alt=media&amp;token=6333f5ca-196d-46ae-9efd-2e522014e6db" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

Qwen3.8-Flash-Next comes with support for `reasoning_effort`, which can be used to adjust reasoning depth and control cost. These toggles are automatically enabled in Unsloth:

* `xhigh` (default): for complex tasks demanding thorough analysis
* `medium`: balancing accuracy and speed
* `low`: efficient reasoning optimizing for speed and cost
* none

{% hint style="warning" %}
To change[ thinking / reasoning](#how-to-enable-or-disable-reasoning-and-thinking) effort in `unsloth run` or `llama-server`, use `--chat-template-kwargs '{"reasoning_effort":"medium"}'`

If you're on **Windows** Powershell, use: `--chat-template-kwargs "{\"reasoning_effort\":\"medium\"}"`

Change `medium` to your desired reasoning level.
{% endhint %}

## Run Qwen3.8-Flash-Next Guide

You can now run Qwen3.8-Flash-Next in Unsloth Desktop and llama.cpp. Feel free to change quantization type.

* Hugging Face: [Qwen3.8-Flash-Next-**GGUF**](https://huggingface.co/unsloth/Qwen3.8-Flash-Next-GGUF)
* ModelScope: [Qwen3.8-Flash-Next-GGUF](https://www.modelscope.cn/models/unsloth/Qwen3.8-Flash-Next-GGUF)

<a href="https://unsloth.ai/pages/CLyZKmpoJZpdaJXhLW4v#run-qwen3.8-in-unsloth-desktop" class="button primary">Run in Unsloth Desktop</a><a href="https://unsloth.ai/pages/CLyZKmpoJZpdaJXhLW4v#run-qwen3.8-in-llama.cpp" class="button secondary">Run in llama.cpp</a><a href="https://unsloth.ai/docs/models/qwen3.8-next.md#mtp-guide" class="button primary">MTP Guide</a>

{% hint style="success" %}
Qwen3.8-Flash-Next is now available to run locally in [Unsloth Desktop](#run-qwen3.8-flash-next-in-unsloth)!
{% endhint %}

### 🦥 Run Qwen3.8-Flash-Next in Unsloth

Qwen3.8-Flash-Next now is able to run in [Unsloth Desktop](#run-qwen3.8-in-unsloth-desktop), an open-source UI app for local AI. **Unsloth automatically offloads to RAM and detects multiGPU setups**. With Unsloth Desktop, you can run models locally on **MacOS, Windows**, Linux and:

{% columns %}
{% column %}

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

{% column %}

<figure><img src="https://3215535692-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 %}

#### Install Unsloth

The easiest way to get started is by downloading the [Unsloth Desktop app](https://unsloth.ai/docs/desktop.md). Works on [macOS](https://unsloth.ai/docs/get-started/install/mac.md), [Windows](https://unsloth.ai/docs/get-started/install/windows-installation.md), and [Linux](https://unsloth.ai/docs/get-started/install/linux.md).

<a href="https://unsloth.ai/download" class="button primary" data-icon="down-to-bracket">Download Unsloth</a>

* <i class="fa-apple">:apple:</i> [Download for macOS](https://unsloth.ai/download/mac)
* <i class="fa-windows">:windows:</i> [Download for Windows](https://unsloth.ai/download/windows)
* <i class="fa-linux">:linux:</i> [Download for Linux](https://unsloth.ai/download/linux)

Or, if you prefer to install manually:

{% tabs %}
{% tab title="Native install" %}
**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" %}
The [Unsloth Docker image](https://hub.docker.com/r/unsloth/unsloth) `unsloth/unsloth` is available on Docker. [Read guide.](https://unsloth.ai/docs/get-started/install/docker)
{% endtab %}

{% tab title="Homebrew" %}
Install Unsloth Desktop:

{% code collapsedlinecount="10" %}

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

{% endcode %}

Update Unsloth Desktop:

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

{% endtab %}

{% tab title="WinGet" %}
Install Unsloth Desktop:

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

Update Unsloth Desktop:

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

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

{% step %}

#### Search and download Qwen3.8-Flash-Next

Go to [Unsloth Chat](https://unsloth.ai/docs/new/studio/chat.md) or Model hub and search for Qwen3.8-Flash in the search bar and download your desired model and quant.

<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FiEMEgtWrGc0DMZ4FLRez%2FScreenshot%202026-08-27%20at%204.21.05%E2%80%AFAM.png?alt=media&amp;token=94ad9ccf-f882-48b0-8aaa-83e90bfc2630" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Run Qwen3.8-Flash-Next

MTP is automatically enabled bit you can disable it. Inference parameters should be auto-set when using Unsloth, 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 inference guide](https://unsloth.ai/docs/new/studio/chat.md).

For example using Unsloth Desktop with the 397GB Qwen3.8 (-91% smaller) allows you to toggle thinking modes, allow inline canvas, web search and code execution and much more.

<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F1YneA51oWzaIiwep9H5I%2F1000024423.gif?alt=media&amp;token=40a169cc-12f1-403a-898c-b310f81ff52a" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Serve Qwen3.8-Flash-Next with Unsloth API

You can use `unsloth run` command and serve Qwen3.8 via an API using `llama-server` runtime flags, including context sizing, GPU layers, threading, sampling, networking, and tool configuration. For more info see our [API docs](https://unsloth.ai/docs/basics/api.md) or [unsloth start](https://unsloth.ai/docs/integrations/unsloth-start.md).

{% code overflow="wrap" %}

```bash
unsloth run --model unsloth/Qwen3.8-Flash-Next-GGUF:UD-Q4_K_XL
```

{% endcode %}
{% endstep %}

{% step %}

#### Unsloth is now ready

You can also do many other things with Qwen3.8-Flash-Next via Unsloth Desktop like:

* **Connect tools:** [Claude Code](https://unsloth.ai/docs/basics/claude-code.md), [Codex](https://unsloth.ai/docs/basics/codex.md), [web search](https://unsloth.ai/docs/new/studio/chat.md#advanced-web-search), [MCP](https://unsloth.ai/docs/basics/mcp.md) and more
* **Train models:** Fine-tune text, diffusion, [embedding](https://unsloth.ai/docs/basics/embedding-finetuning.md), and more
* **Generate media:** Create and train [images](https://unsloth.ai/docs/basics/diffusion-image.md), video, [TTS](https://unsloth.ai/docs/basics/text-to-speech-tts-fine-tuning.md) locally

<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FRnU2breyPzalRzIHyq8U%2FScreenshot%202026-08-28%20at%2012.12.20%E2%80%AFAM.png?alt=media&amp;token=da925810-e1d3-4c06-bf27-7caad15a2330" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### :llama: Run Qwen3.8-Flash-Next in llama.cpp

{% stepper %}
{% step %}
Install the latest version of llama.cpp. 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
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 %}
To run the model, you can do:

{% code overflow="wrap" %}

```bash
pip install -U "huggingface_hub[cli]"
hf download unsloth/Qwen3.8-Flash-Next-GGUF \
    --local-dir unsloth/Qwen3.8-Flash-Next-GGUF \
    --include "*UD-Q4_K_XL*" # Use "*UD-IQ2_XS*" for 2-bit
```

{% endcode %}
{% endstep %}

{% step %}
Then to run it:

{% code overflow="wrap" %}

```bash
./llama.cpp/llama-cli \
    --model unsloth/Qwen3.8-Flash-Next-GGUF/UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf \
    --temp 1.0 \
    --top-p 0.95 \
    --top-k 20 \
    --min-p 0.0
```

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

### MTP Guide

Qwen3.8-Flash can run with 1.3 to **1.7x faster inference** via [MTP](https://unsloth.ai/docs/models/mtp.md) (Multi-Token Prediction) with no accuracy degradation! MTP enables Qwen3.8-Flash to reach **170 tokens/s** on 1x RTX 6000 PRO GPU compared to the 100 token baseline. MTP speeds up inference by letting a model predict multiple upcoming tokens at once instead of generating one token per step, and is especially effective on GPUs.

To run Qwen3.8-Flash with MTP, MTP is enabled by default in [Unsloth Desktop](#run-qwen3.8-flash-next-in-unsloth) or you can use our custom llama.cpp PR.

<div><figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F39BmPdGOL8IlwrdQFsGh%2Fqwen38_flash_next_unsloth_ggufs_mtp_speedup_no_mtp.png?alt=media&amp;token=77c52179-821a-406b-a5ab-fd027ebe8d30" alt=""><figcaption></figcaption></figure> <figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FF9IF8IWG2DAgfLBXzhyz%2Fqwen38_flash_next_unsloth_ggufs_mtp_decode_tokens_per_s.png?alt=media&amp;token=def0f8fb-5268-4e33-9e85-0a1fed4a1156" alt=""><figcaption></figcaption></figure></div>

Gains are smaller on devices with lower memory bandwidth, such as older Macs. We created both shared MTP modules (excludes the embed\_tokens and shares it with the main model) to save disk space, RAM and VRAM usage by around 1 to 2GB.

| MTP Type | General MTP | Shared MTP | Savings |
| -------- | ----------- | ---------- | ------- |
| BF16     | 7.77 GB     | 5.23 GB    | 2.54 GB |
| Q8\_0    | 4.14 GB     | 2.79 GB    | 1.35 GB |
| Q4\_K\_M | 2.79 GB     | 1.91 GB    | 880 MB  |

The 3-bit MTP quant works on 91GB RAM so it's best to have a 96GB RAM/unified memory device.\
**Table: MTP Hardware requirements** (units = total memory: RAM + VRAM, or unified memory)

<table><thead><tr><th>1-bit</th><th>2-bit</th><th>3-bit</th><th>4-bit</th><th width="128">5-bit</th><th>8-bit</th><th>BF16</th></tr></thead><tbody><tr><td>76 GB</td><td>80 GB</td><td>91 GB</td><td>97-115 GB</td><td>164 GB</td><td>200 GB</td><td>355 GB</td></tr></tbody></table>

#### Run MTP Qwen3.8-Flash

To run Qwen3.8-Flash with MTP, all you need to do is [**install Unsloth Desktop**](#run-qwen3.8-flash-next-in-unsloth) or update to the latest verison of Unsloth then re-download the model or download the MTP file. See further below for llama.cpp instructions.

{% columns %}
{% column width="66.66666666666666%" %}
Unsloth Desktop Works on [macOS](https://unsloth.ai/docs/get-started/install/mac.md), [Windows](https://unsloth.ai/docs/get-started/install/windows-installation.md), and [Linux](https://unsloth.ai/docs/get-started/install/linux.md).

<a href="https://unsloth.ai/download" class="button primary" data-icon="down-to-bracket">Download Unsloth</a>

* <i class="fa-apple">:apple:</i> [Download for macOS](https://unsloth.ai/download/mac)
* <i class="fa-windows">:windows:</i> [Download for Windows](https://unsloth.ai/download/windows)
* <i class="fa-linux">:linux:</i> [Download for Linux](https://unsloth.ai/download/linux)

In Unsloth Desktop, you can also change the number of draft tokens or customize MTP. Use the advanced settings in the right sidebar, and enable "Advanced settings" and you can select MTP / Ngram speculative decoding, the number of draft tokens and more:
{% endcolumn %}

{% column width="33.33333333333334%" %}

<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FqKy281quNOdn5toIr5am%2Fimage.png?alt=media&amp;token=bf0f6f00-1192-4494-977c-1bf4fa346fa0" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

#### MTP Llama.cpp Guide

{% code overflow="wrap" %}

```bash
apt-get update
apt-get install pciutils build-essential cmake curl libcurl4-openssl-dev -y
git clone --branch qwen4exp/mtp https://github.com/danielhanchen/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 %}

Then to download the shared MTP module:

{% code overflow="wrap" %}

```bash
pip install -U "huggingface_hub[cli]"
hf download unsloth/Qwen3.8-Flash-Next-GGUF \
    --local-dir unsloth/Qwen3.8-Flash-Next-GGUF \
    --include "*mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf*"
```

{% endcode %}

And to use llama-server with it:

{% code overflow="wrap" %}

```bash
llama.cpp/llama-server \
    -hf unsloth/Qwen3.8-Flash-Next-GGUF:UD-Q4_K_XL \
    -md unsloth/Qwen3.8-Flash-Next-GGUF/MTP/mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf \
    --spec-type draft-mtp --spec-draft-n-max 5
```

{% endcode %}

### Further Quantization Analysis

We ran KLD for Qwen3.8-Flash quants, and show that 80% top-1 accuracy recovery is possible with 79% less disk space usage. The new architecture uses PLE / Ngrams, and these are not quantized that heavily (4-bit minimum) since they have random access pattern, and quantizing them heavily will damage the model.

<div><figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FPemX6jyt4OWohwHfcjqo%2Fqwen38_flash_unsloth_top1_accuracy_new_data.png?alt=media&amp;token=3fd7713b-e9d9-43d4-bbca-96d56df43a80" alt=""><figcaption></figcaption></figure> <figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F8bGa4A4jbGsn0qrNY6Gc%2Fqwen38_flash_unsloth_kld_new_data.png?alt=media&amp;token=45ac0e9a-c9b3-4530-90f6-ed8a2328ef08" alt=""><figcaption></figcaption></figure></div>

<details>

<summary>Click for detailed table analysis</summary>

<table data-search="false"><thead><tr><th>quant</th><th>GB</th><th>top-1</th><th>mean KLD</th><th>99.9% KLD</th></tr></thead><tbody><tr><td>UD-IQ1_S</td><td>72.5</td><td>77.325</td><td>0.396070</td><td>7.2126</td></tr><tr><td>UD-IQ1_M</td><td>74.5</td><td>79.691</td><td>0.314739</td><td>6.1965</td></tr><tr><td>UD-Q2_K_XL</td><td>78.9</td><td>82.715</td><td>0.224607</td><td>4.9121</td></tr><tr><td>UD-IQ3_XXS</td><td>82.0</td><td>85.414</td><td>0.165120</td><td>4.0375</td></tr><tr><td>UD-Q3_K_XL</td><td>90.0</td><td>88.315</td><td>0.106504</td><td>3.0538</td></tr><tr><td>UD-IQ4_XS</td><td>93.7</td><td>89.554</td><td>0.083630</td><td>2.3677</td></tr><tr><td>UD-Q4_K_XL</td><td>111.3</td><td>92.255</td><td>0.046893</td><td>1.5468</td></tr><tr><td>UD-Q5_K_XL</td><td>158.3</td><td>93.680</td><td>0.030415</td><td>1.0036</td></tr><tr><td>UD-Q6_K_XL</td><td>169.2</td><td>94.089</td><td>0.027091</td><td>0.8416</td></tr><tr><td>Q8_0</td><td>188.2</td><td>94.122</td><td>0.026574</td><td>0.8118</td></tr></tbody></table>

</details>

### 📊 Benchmarks

For GGUF quantization benchmarks you can see above for our [quantization analysis](#quantization-analysis) or [Dynamic V3.0 article](https://unsloth.ai/docs/basics/dynamic-3.0-ggufs.md).


---

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