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

# Kimi K3 - ローカル実行方法

Moonshot AI の Kimi K3 は、SOTA のコーディング、エージェント、長文コンテキスト、チャット用途向けに構築された、2.8T パラメータのオープンウェイトモデル（アクティブ 104B）です。これは **最強のオープンモデル** これまでで、Claude 4.8 Opus や GPT-5.6 に匹敵します。Kimi K3 はネイティブのビジョン、100万トークンのコンテキストウィンドウを備え、MXFP4 を使用します。フル精度推論には 1.56 TB のストレージと 1-bit の Kimi K3 が必要です [Unsloth](https://github.com/unslothai/unsloth) Dynamic GGUF には **594 GB（62% 少ない）**.

{% columns %}
{% column %}
Dynamic 1-bit（右を参照）は **\~78.9%** top-1 精度に達しつつ **62% 小さい**. Dynamic 2-bit 861.3GB は **\~90%** 精度に達しつつ **45% 小さい**. 実行 [**Kimi-K3-GGUF**](https://huggingface.co/unsloth/Kimi-K3-GGUF) で [Unsloth Studio](/docs/jp/xin-zhe/studio.md) または llama.cpp で。Kimi K3 は NVIDIA DGX Station、または 128GB RAM デバイスに接続された Mac Studio で実行できます。&#x20;

〜には **ロスレス** Kimi K3 には、Q8（`UD-Q8_K_XL`）を使用してください。これは **Q4（より 50GB 大きく** Q4（`UD-Q4_K_XL`）より大きいです。モデルを損なわずに 512GiB 未満まで圧縮できるかはまだ調査中です（dynamic 1-bit は 553.2 GiB）。

<a href="/pages/335086c72f3270ee21c3c5142bcf04bb46883008" class="button primary">Kimi K3 チュートリアルを実行</a><a href="/pages/335086c72f3270ee21c3c5142bcf04bb46883008#usage-guide" class="button secondary">量子化結果</a>
{% endcolumn %}

{% column %}

<figure><img src="/files/9fc97723e72ff47dfb44be604be2c91d2a529099" alt=""><figcaption><p>1-bit Kimi K3 GGUF vs Claude 5 vs GPT 5.6</p></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

**表: ハードウェア要件** (単位 = 総メモリ: RAM + VRAM、またはユニファイドメモリ)

| Dynamic 1-bit S | Dynamic 1-bit M | Dynamic 2-bit XXS | Dynamic 2-bit XL | Q8（ロスレス） |
| --------------- | --------------- | ----------------- | ---------------- | -------- |
| 610 GB          | 665 GB          | 726 GB            | 880 GB           | 1.6 TB   |

### Kimi K3 GGUF 実装詳細

以下をベースに構築しました: [llama.cpp の PR](https://github.com/ggml-org/llama.cpp/pull/26185) と [私たちのフォーク](https://github.com/unslothai/llama.cpp/pull/48) には、ビジョンサポートといくつかのバグ修正が含まれています。

1. mmproj / vision tower は Kimi-K2.5 tower に似ていますが、RMSNorm、bias なし、非正方形の fused QKV（qkv width != n\_embd）、および post-norm projector を備えています。
2. llama.cpp を実行したとき、 `n_tokens * 40` の予算が大きなバッチサイズで失敗したため、私たちは `n_tokens * 160`&#x20;
3. また、Kimi のチャットテンプレートを jinja 形式に変換する必要がありました。
4. 可能な限りテストして、すべてのケースをカバーしました。Kimi はデフォルトで **思考保持を有効にした状態で**で学習されているため、すべての思考トレースは削除されず、保持されます。

### 📊 量子化分析

Kimi と同様に [K2.6](/docs/jp/moderu/kimi-k2.6.md) と [K2.7](/docs/jp/moderu/kimi-k2.7-code.md)、K3 の `UD-Q8_K_XL` はロスレスです。というのも、Kimi は MoE 重みに MXFP4 を使い、それ以外すべてに BF16 を使っており、 `Q8_K_XL` Q8\_K\_XL はそれを正確に踏襲しているからです。 `UD-Q4_K_XL` はそれに似ていますが、残りのテンソルの一部（norms などを除く）が `Q8_0`である点が異なります。そのためほぼフル精度で、1.56 TB の RAM/VRAM が必要です。 `UD-Q8_K_XL` は、MXFP4 の完全な safetensors 版に対して「真にロスレス」です。

<table><thead><tr><th width="119.20001220703125">量子化</th><th width="71.60000610351562" align="right">GB</th><th width="124.800048828125" align="right">平均 KLD</th><th width="104.9998779296875" align="right">PPL(q)</th><th width="188.79998779296875" align="right">top-1 一致率 %</th><th width="140.20001220703125" align="right">RMS dp %</th></tr></thead><tbody><tr><td><code>UD-IQ1_S</code></td><td align="right">594.0</td><td align="right">0.5645</td><td align="right">2.5789</td><td align="right">78.875 +/- 0.107</td><td align="right">36.495</td></tr><tr><td><code>UD-IQ1_M</code></td><td align="right">648.9</td><td align="right">0.4789</td><td align="right">2.3639</td><td align="right">81.219 +/- 0.103</td><td align="right">33.629</td></tr><tr><td><code>UD-IQ2_XXS</code></td><td align="right">711.1</td><td align="right">0.3784</td><td align="right">2.1266</td><td align="right">84.127 +/- 0.096</td><td align="right">29.826</td></tr><tr><td><code>UD-Q2_K_XL</code></td><td align="right">861.3</td><td align="right">0.1779</td><td align="right">1.7359</td><td align="right">90.390 +/- 0.077</td><td align="right">19.862</td></tr><tr><td><code>UD-Q4_K_XL</code></td><td align="right">1,510</td><td align="right"></td><td align="right">1.4579</td><td align="right"></td><td align="right"></td></tr><tr><td><code>UD-Q8_K_XL</code></td><td align="right">1,560</td><td align="right"></td><td align="right">1.4581</td><td align="right"></td><td align="right"></td></tr></tbody></table>

imatrix の生成と量子化には、1.56 TB のロスレス `UD-Q8_K_XL` をキャリブレーション全体で使用しました。そのパープレキシティは 1.4581 です。私たちの Dynamic-1bit 量子化は、top-1 精度 79% でパープレキシティ 2.58 に達し、驚くほど実用的です。

他のコミュニティ製量子化は、より大きいのに劣化ははるかに大きいです。たとえば、ある 618.9 GB の量子化は `IQ1_M` 私たちの 594 GB 1-bit 量子化を上回りますが、そのパープレキシティは 54.56 に跳ね上がり、21倍悪化します。同じ傾向が `IQ2_XXS`: 725 GB で PPL 96、対して私たちは 711 GB で PPL 2.12 であり、45倍悪いです。つまり彼らの 2-bit は 1-bit よりさらに悪い性能です。これは dynamic quantization + proper calibration の重要性を示しています。

**Top-1% 精度、KLD プロットも提供しています:**

<div><figure><img src="/files/53b6918c7612debed5a61f40f80a311b910ce5e3" alt=""><figcaption></figcaption></figure> <figure><img src="/files/c00cba83ebdf746a630d4aede2a9642ad9b772b3" alt=""><figcaption></figcaption></figure> <figure><img src="/files/9b35f584666ea707815d87ec92375b307d25a243" alt=""><figcaption></figcaption></figure></div>

### :gear: 使用ガイド

Kimi K3 は **思考専用**で、 **`preserve_thinking` が常に有効** と **max** の思考がデフォルトで有効です。Instant モードはサポートされていません。思考の強度は `reasoning_effort` リクエストフィールドで設定し、K3 は `「low」`, `「high」`、および `「max」` の思考強度をサポートします。

| デフォルト             | エージェント            |
| ----------------- | ----------------- |
| temperature = 1.0 | temperature = 1.0 |
| top\_p = 0.95     | top\_p = 1.0      |

* コンテキスト長 = 最大 `1,048,576`
* Unsloth で Low、High、Max Thinking を切り替え可能です

モデルが収まる場合、B200 を使用すると生成速度は約 20 tokens/s、スループットは 120 tokens/s 超になります。おすすめは [`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) （594GB）はサイズと品質のバランスが良いです。経験則としては、RAM+VRAM ≈ 量子化サイズです。そうでなくても動作はしますが、ディスクへのオフロードのためかなり遅くなります。

## Kimi K3 実行ガイド

これで Kimi K3 を [llama.cpp](#run-in-llama.cpp) と [Unsloth Desktop](https://unsloth.ai/docs/jp/moderu/pages/1d43caebcc2925464cc42990bf5ebdc3d13c3c85#run-glm-5.2-in-unsloth-studio)。アクセシビリティと精度の観点で最良の結果を得るため、594GB の [`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) 量子化を使用します。少なくとも 610GB の RAM が必要です。量子化タイプは自由に変更してください。GGUF: [**Kimi-K3-GGUF**](https://huggingface.co/unsloth/Kimi-K3-GGUF)

### 🦥 Unsloth で Kimi-K3 を実行

Kimi K3 は [Unsloth Desktop](/docs/jp/desktop.md)ローカル AI 向けのオープンソースデスクトップ UI で実行できます。 **Unsloth Desktop は自動的に RAM にオフロードし、マルチ GPU 構成を検出します**。Unsloth Studio を使えば、ローカルでモデルを実行できます: **MacOS、Windows**、Linux、そして:

{% columns %}
{% column %}

* 検索、ダウンロード、 [GGUF を実行](/docs/jp/xin-zhe/studio.md#run-models-locally) および safetensor モデル
* [**自己修復** ツール呼び出し](/docs/jp/xin-zhe/studio.md#execute-code--heal-tool-calling) + **ウェブ検索**
* [**コード実行**](/docs/jp/xin-zhe/studio.md#run-models-locally) (Python、Bash)
* [自動推論](https://unsloth.ai/docs/desktop#feature-deep-dive) パラメータ調整（temp、top-p など）
* llama.cpp による高速 CPU + GPU 推論
* [LLM を学習](/docs/jp/xin-zhe/studio.md#no-code-training) VRAM を 70% 削減しつつ 2倍高速
  {% endcolumn %}

{% column %}

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

{% stepper %}
{% step %}
**Unsloth のインストールと起動**

始める最も簡単な方法は、次をダウンロードすることです: [Unsloth Desktop app](/docs/jp/desktop.md)。対応: [macOS](/docs/jp/hajimeru/install/mac.md), [Windows](/docs/jp/hajimeru/install/windows-installation.md)、および [Linux](/docs/jp/hajimeru/install/linux.md).

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

または、手動でインストールしたい場合は:

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:

```bash
unsloth studio
```

次に開く `http://127.0.0.1:8888` （または指定された URL）をブラウザで開きます。

**HTTPS と Cloudflare で Unsloth を安全に起動**

**新機能!** Unsloth は、無料の Cloudflare トンネルを通じて HTTPS で Unsloth を起動する安全な方法を提供するようになりました。以下を使用してください（Windows、Mac、Linux で動作します）:

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

{% endstep %}

{% step %}
**Kimi K3 を検索してダウンロード**

Unsloth Studio は自動的に RAM にオフロードし、マルチ GPU 構成を検出します。初回起動時には、アカウントを保護するためのパスワードを作成し、後で再度サインインする必要があります。

次に Model hub タブに移動して **Kimi K3** を検索バーで検索し、希望するモデルと量子化をダウンロードしてください。モデルを実行するのに十分な計算資源があることを確認してください。

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

{% step %}
**Kimi K3 を実行**

Unsloth Studio を使うと推論パラメータは自動設定されますが、手動で変更することもできます。また、 **low、high、または max の思考**を切り替えたり、コンテキスト長、チャットテンプレート、その他の設定を編集したりできます。

詳細は以下をご覧ください: [Unsloth Studio 推論ガイド](/docs/jp/xin-zhe/studio/chat.md).

<figure><img src="/files/4d290e6db3084061982a4dfe5ece693546bb048f" alt=""><figcaption><p>Unsloth の Canvas で動作する 1-bit Kimi-K3 の例</p></figcaption></figure>
{% endstep %}
{% endstepper %}

### 🦙 llama.cpp で Kimi K3 を実行

これらのチュートリアルでは、 [llama.cpp](https://github.com/ggml-org/llama.cpp) を使って高速なローカル推論を行います。特に CPU がある場合に有効です。私たちは [フォークを作成しました](https://github.com/unslothai/llama.cpp/pull/48) Kimi K3 のビジョンをサポートするために特化したものです。これは別の [llama.cpp の PR](https://github.com/ggml-org/llama.cpp/pull/26185).

{% stepper %}
{% step %}
の特定の Unsloth フォークを入手してください `llama.cpp` で [**GitHub はこちら**](https://github.com/unslothai/llama.cpp/pull/48) で、ビジョンサポートを有効にします。以下のビルド手順に従っても構いません。 `-DGGML_CUDA=ON` を `-DGGML_CUDA=OFF` に変更してください。GPU がない場合、または CPU 推論だけをしたい場合。 **Apple Mac / Metal デバイスの場合**は、 `-DGGML_CUDA=OFF` を設定し、その後は通常どおり進めてください。Metal サポートはデフォルトで有効です。

```bash
git clone https://github.com/unslothai/llama.cpp
cd llama.cpp
git fetch origin pull/48/head:kimi-k3-fullsize-vision
git checkout kimi-k3-fullsize-vision
cd ..
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 %}
**まず画像を取得しましょう!** 画像をアップロードすることもできます。ここでは [この画像](https://raw.githubusercontent.com/unslothai/unsloth/refs/heads/main/images/unsloth%20made%20with%20love.png)を使います。これは、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/8ae02fb49d0894924cd953777ab38bc4d56ba3f8" alt="" width="188"><figcaption></figcaption></figure>

2枚目の画像を取得しましょう [ここ](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/5e1b9352de623a1d57f735cf6be692f421bca972" alt="" width="188"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
これで `llama.cpp` を直接使って、モデルの読み込みやダウンロードができます。ちょうど `ollama run`と同じです。まず、使用したい量子化タイプを選択します。たとえば `IQ1_S`も使用します。 `export LLAMA_CACHE="folder"` を使って `llama.cpp` 特定の場所に保存するよう強制できます。 **このダウンロード प्रक्रियाは非常に遅くなる可能性があることに注意してください**。そのため、次のセクションの手動ダウンロード手順を使うのがおそらく最善です。

```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 %}
モデルを手動でダウンロードしたい場合は、以下のコードでダウンロードできます（ `pip install huggingface_hub`をインストールした後）。ダウンロードが止まる場合は、以下を参照してください: [Hugging Face Hub、XET のデバッグ](/docs/jp/ji-ben/troubleshooting-and-faqs/hugging-face-hub-xet-debugging.md)

```bash
hf download unsloth/Kimi-K3-GGUF \
    --local-dir unsloth/Kimi-K3-GGUF \
    --include "*mmproj-BF16*" \
    --include "*UD-IQ1_S*" # フル精度には "*UD-Q8_K_XL*" を使用
```

{% endstep %}

{% step %}
次に、会話モードでモデルを実行します:

{% code overflow="wrap" %}

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

{% endcode %}
{% endstep %}

{% step %}
すると、次のように表示されます:

<figure><img src="/files/255a9f2c6124c95be527af2c27d5375168fecf71" alt=""><figcaption></figcaption></figure>

そして「-1 の平方根は何ですか」と尋ねました:

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

Kimi K3 は画像もサポートしており、たとえば Unsloth の画像を読み込めます:

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

そして次にナマケモノの画像を使い、どう関係しているのかを尋ねます:

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

### 📊 ベンチマーク

ベンチマークの表は下にさらにあります:

<div><figure><img src="/files/aeba4a88fc3ad190371dcdd093fcd0f205aa7a61" alt=""><figcaption></figcaption></figure> <figure><img src="/files/4bf13abb5f766519367ba282f08e233180331583" alt=""><figcaption></figcaption></figure></div>

|       ベンチマーク       | 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) |
| :----------------: | :---------------: | :----------------------: | :-------------------: | :-----------------------: | :-----------------: | :---------------: |
|      **推論と知識**     |                   |                          |                       |                           |                     |                   |
|    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     |         —         |
|     **コーディング**     |                   |                          |                       |                           |                     |                   |
|       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       |
|     **エージェント**     |                   |                          |                       |                           |                     |                   |
|     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        |         —         |
|      **ビジョン**      |                   |                          |                       |                           |                     |                   |
|      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     |         —         |

DeepSWE のベンチマークは、Kimi-K3 が非常に効率的に動作していることを示しています!

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


---

# 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/jp/moderu/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.
