> 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/kimi-k3.md).

# Kimi K3 - How to Run Locally

Kimi K3 by Moonshot AI is a 2.8T parameter (104B active) open-weight model built for SOTA coding, agentic, long-context and chat workloads. It features native vision capabilities and a 1-million-token context window. Kimi K3 full precision inference requires 1.57 TB of disk space. Unsloth [Dynamic](/docs/basics/unsloth-dynamic-2.0-ggufs.md) 1-bit requires **620GB (-60%)**. Run [**Kimi-K3-GGUF**](https://huggingface.co/unsloth/Kimi-K3-GGUF) via [Unsloth Studio](/docs/new/studio.md) or llama.cpp.

[**Unsloth Dynamic**](/docs/basics/unsloth-dynamic-2.0-ggufs.md) **quants** upcasts important layers to 8-bit and 1-bit needs **650GB+ RAM/VRAM** setup&#x73;**.** For **lossless** Kimi K3, use Q8 (`UD-Q8_K_XL`), which is **50GB larger** than Q4 (`UD-Q4_K_XL`). You can run Kimi K3 via a Mac Studio / DGX Stations connected with a 128GB RAM device.

{% hint style="warning" %}
**Quants are still uploading and article is a WIP! Even smaller 1-bit quants are coming soon.**
{% endhint %}

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

| Dynamic 1-bit | Dynamic 2-bit | Dynamic Q3 | Q8 (Lossless) |
| ------------- | ------------- | ---------- | ------------- |
| TBD           | TBD           | TBD        | 1.6 TB        |

Like Kimi [K2.6](/docs/models/kimi-k2.6.md) and [K2.7](/docs/models/kimi-k2.7-code.md), `UD-Q8_K_XL` is lossless because Kimi uses int4 for MoE weights and BF16 for everything else, and `Q8_K_XL` follows that. Thus, we use the same Dynamic methodology for Kimi-K2.6 conversion. `UD-Q4_K_XL` is similar except the remaining tensors are `Q8_0`, so it is near full precision and requires 1.55TB RAM/VRAM. `UD-Q8_K_XL` is 'truly lossless'.

### :gear: Usage Guide

Kimi K3 is **thinking-only**, with **`preserve_thinking` always enabled** and **max** thinking on by default. Instant mode is not supported. Thinking effort is configured with the `reasoning_effort` request field, and K3 supports `"low"`, `"high"`, and `"max"` thinking efforts.

| Default           | Agentic           |
| ----------------- | ----------------- |
| temperature = 1.0 | temperature = 1.0 |
| top\_p = 0.95     | top\_p = 1.0      |

* Context length = up to `1,048,576`

If the model fits, you will get >100 tokens/s when using B200s. We recommend [`UD-IQ1_S`](https://huggingface.co/unsloth/Kimi-K3-GGUF?show_file_info=UD-IQ1_S%2FKimi-K3-UD-IQ1_S-00001-of-00015.gguf) (650GB) as a good size/quality balance. Best rule of thumb: RAM+VRAM ≈ the quant size; otherwise it’ll still work, just slower due to offloading.

## Run Kimi K3 Guide

You can now run Kimi K3 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 650GB [`UD-IQ1_S`](https://huggingface.co/unsloth/Kimi-K3-GGUF?show_file_info=UD-IQ1_S%2FKimi-K3-UD-IQ1_S-00001-of-00015.gguf) quant for best results in terms of accessibility and accuracy.

### 🦥 Run Kimi-K3 in Unsloth Studio

Kimi K3 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/dQy5izI8WRumFBHqVXtW" alt=""><figcaption></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.
{% endstep %}

{% step %}
**Search and download Kimi K3**

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 [Unsloth Chat](/docs/new/studio/chat.md) tab and search for **Kimi-K3** in the search bar and download your desired model and quant. Ensure you have enough compute the run the model.
{% endstep %}

{% step %}
**Run Kimi K3**

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

<figure><img src="/files/eWtsSUZq82xQyEJ1rRm8" alt=""><figcaption><p>Example of 1-bit GLM-5.2 running with Unsloth's Canvas</p></figcaption></figure>
{% endstep %}
{% endstepper %}

### 🦙 Run Kimi K3 in llama.cpp

For this guide we'll be running the `UD-IQ1_M` quant which will require at least 345GB RAM. Feel free to change quantization type. GGUF: [**Kimi-K3-GGUF**](https://huggingface.co/unsloth/Kimi-K3-GGUF)

For these tutorials, we will using [llama.cpp](llama.cpphttps://github.com/ggml-org/llama.cpp) for fast local inference, especially if you have a CPU.

{% stepper %}
{% step %}
Obtain the SPECIFIC `llama.cpp` PR on [**GitHub here**](https://github.com/ggml-org/llama.cpp/pull/26185). 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
git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp
git fetch origin pull/26185/head:kimi-k3-text
git checkout kimi-k3-text
cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release -j --target llama-cli llama-server
```

{% endstep %}

{% step %}
**Let's first get an image!** You can also upload images as well. We shall use [this image](https://raw.githubusercontent.com/unslothai/unsloth/refs/heads/main/images/unsloth%20made%20with%20love.png), which is just our mini logo showing how finetunes are made with Unsloth:

{% code overflow="wrap" %}

```bash
wget https://raw.githubusercontent.com/unslothai/unsloth/refs/heads/main/images/unsloth%20made%20with%20love.png -O unsloth.png
```

{% endcode %}

<figure><img src="/files/6grTWZGCnR0olP2Q8SgB" alt="" width="188"><figcaption></figcaption></figure>

Let's get the 2nd image [here](https://files.worldwildlife.org/wwfcmsprod/images/Sloth_Sitting_iStock_3_12_2014/story_full_width/8l7pbjmj29_iStock_000011145477Large_mini__1_.jpg)

{% code overflow="wrap" %}

```bash
wget https://files.worldwildlife.org/wwfcmsprod/images/Sloth_Sitting_iStock_3_12_2014/story_full_width/8l7pbjmj29_iStock_000011145477Large_mini__1_.jpg -O picture.png
```

{% endcode %}

<figure><img src="/files/Bo2dlyVZZXbxGr2zhpKU" alt="" width="188"><figcaption></figcaption></figure>
{% 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/Kimi-K3-GGUF"
./llama.cpp/llama-cli \
    -hf unsloth/Kimi-K3-GGUF:UD-IQ1_S \
    --temp 1.0 \
    --top-p 0.95
```

{% 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/Kimi-K3-GGUF \
    --local-dir unsloth/Kimi-K3-GGUF \
    --include "*mmproj-F16*" \
    --include "*UD-IQ1_S*" # Use "*UD-Q8_K_XL*" for full precision
```

{% endstep %}

{% step %}
Then run the model in conversation mode:

{% code overflow="wrap" %}

```bash
./llama.cpp/llama-cli \
    --model unsloth/Kimi-K3-GGUF/UD-IQ1_S/Kimi-K3-UD-IQ1_M-00001-of-00015.gguf \
    --mmproj unsloth/Kimi-K3-GGUF/mmproj-F16.gguf \
    --temp 1.0 \
    --top-p 0.95
```

{% endcode %}

Then you will see the below:\
![](/files/ob2iB0C92LI2catVxe3a)
{% endstep %}

{% step %}
Then use `/image` to load both images in and ask "What is this image":

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

and you will get something like below:

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

On the 2nd image of the sloth:

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

Which will get you:

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

### 📊 Benchmarks

You can view further below for benchmarks in table format:

<div><figure><img src="/files/OwVA6ICc5Ar0XG19SXF3" alt=""><figcaption></figcaption></figure> <figure><img src="/files/EuG872Nz3lIRms7i0No0" alt=""><figcaption></figcaption></figure></div>

|         Benchmark         | Kimi K3&#xA;(max) | Claude Fable 5&#xA;(max) | GPT-5.6 Sol&#xA;(max) | Claude Opus 4.8&#xA;(max) | GPT-5.5&#xA;(xhigh) | GLM-5.2&#xA;(max) |
| :-----------------------: | :---------------: | :----------------------: | :-------------------: | :-----------------------: | :-----------------: | :---------------: |
| **Reasoning & Knowledge** |                   |                          |                       |                           |                     |                   |
|        GPQA Diamond       |        93.5       |           92.6           |        **94.1**       |            91.0           |         93.5        |        91.2       |
|          HLE-Full         |    43.5 / 56.0    |      **53.3 / 63.0**     |      44.5 / 58.0      |        49.8 / 57.9        |     41.4 / 52.2     |         —         |
|         **Coding**        |                   |                          |                       |                           |                     |                   |
|          DeepSWE          |        67.5       |           70.0           |        **73.0**       |            59.0           |         67.0        |        46.2       |
|     Terminal-Bench 2.1    |        88.3       |           88.0           |        **88.8**       |            84.6           |         83.4        |        82.7       |
|        **Agentic**        |                   |                          |                       |                           |                     |                   |
|         BrowseComp        |      **91.2**     |           88.0           |          90.4         |            84.3           |         84.4        |         —         |
|     GDPval-AA v2 (Elo)    |        1686       |         **1747**         |          1736         |            1593           |         1491        |        1510       |
|        OSWorld 2.0        |        58.3       |         **66.1**         |          62.6         |            55.7           |         49.5        |         —         |
|         **Vision**        |                   |                          |                       |                           |                     |                   |
|          MMMU-Pro         |    81.6 / 83.4    |      81.2 / **86.5**     |    **83.0** / 84.6    |        78.9 / 82.7        |     81.2 / 83.2     |         —         |
|         MathVision        |    94.3 / 97.8    |      94.8 / **98.6**     |    **95.8** / 97.8    |        86.7 / 97.1        |     92.2 / 96.8     |         —         |


---

# 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/kimi-k3.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.
