> 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/mistral-large-4.md).

# Mistral Large 4（Le Chonk）：ローカルで実行

Unsloth と llama.cpp を使って Mistral Large 4 の GGUF をローカルで実行するためのガイド。

Mistral Large 4（Le Chonk）はMistralの **1兆パラメータの** MoEモデルで、 **520億のアクティブパラメータ** （埋め込み層と出力層を含む）。Mistral Large 4は **最強の西側のオープン** モデルであり、テキストと画像入力、 **100万コンテキスト** ウィンドウ、160以上の言語、そして推論に対応しています。Le ChonkはUnslothまたはllama.cpp経由でUnsloth Dynamic GGUFを使ってローカル実行できます。GGUF： [Mistral-Large-4-1T-A52B-GGUF](https://huggingface.co/unsloth/Mistral-Large-4-1T-A52B-GGUF)

Dynamic 1bitは **トップ1精度の91%** コーディング、エージェントタスク、数学、その他の分野全体で、なおかつ80%小型化されつつ（**223GB** 対 **1.1TB** FP8）。Dynamic 2bitはトップ1精度の95%を維持しつつ、66%小型化（378GB）。初日アクセスを提供してくれたMistralに感謝します。

<a href="/docs/jp/moderu/mistral-large-4.md#run-mistral-large-4-tutorials" class="button primary">Mistral Large 4チュートリアルを実行</a><a href="/docs/jp/moderu/mistral-large-4.md#quantization-analysis" class="button secondary">量子化分析</a>

### **⚙️ 使用ガイド**

最小のDynamic 1-bit量子化で、 `UD-IQ1_S`、およそ **233GB** のディスク容量を使用し、Mac StudioやNVIDIA DGX Spark 2台を含む256GB RAMに収まるはずです。

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

| 1ビット      | 2ビット      | 3ビット      | 4ビット  | 8ビット  |
| --------- | --------- | --------- | ----- | ----- |
| 256–270GB | 310–390GB | 435–500GB | 630GB | 1.2TB |

最高の性能のためには、利用可能な総 **RAM + VRAM**、またはユニファイドメモリは、量子化ファイルサイズを上回り、OS、KVキャッシュ、ランタイムバッファのための余裕が必要です。より長いコンテキストにはより多くのメモリが必要です。

#### 推奨設定

Mistralは、すべての推論レベルに同じサンプリング設定を推奨しています：

| 温度    | Top-p  |
| ----- | ------ |
| `1.0` | `0.95` |

* 推論レベル = low、medium、high
* 最大 **コンテキストウィンドウ** は `1,048,576` トークンです。

すべての量子化についてKLDベンチマークも実施しました。詳細は [#quantization-analysis](#quantization-analysis "mention")

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FAtJWJHFOCP7cu7IQKiGt%2Fsize_vs_top1_unsloth.png?alt=media&amp;token=27d694b8-db6f-4661-a8c8-c354823ca2c6" alt="" width="563"><figcaption></figcaption></figure>

## Mistral Large 4チュートリアルを実行：

以下の例では [`UD-Q2_K_XL`](https://huggingface.co/unsloth/Mistral-Large-4-1T-A52B-GGUF/tree/main/UD-Q2_K_XL) をテキスト推論に使用しています。量子化タイプは、 [GGUFリポジトリ](https://huggingface.co/unsloth/Mistral-Large-4-1T-A52B-GGUF).

### 🦥 UnslothでMistral Large 4を実行

[Unsloth Desktop](https://unsloth.ai/docs/desktop) はGGUFをローカルで実行します。対応OSは **macOS、Windows、Linux**で、自動的にRAMへオフロードし、マルチGPU構成を検出します。

{% stepper %}
{% step %}

#### Unslothをインストール

始める最も簡単な方法は、 [Unsloth Desktopアプリ](/docs/jp/desktop.md)をダウンロードすることです。対応： [macOS](/docs/jp/meru/install/mac.md), [Windows](/docs/jp/meru/install/windows-installation.md)、 [Linux](/docs/jp/meru/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：**

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

{% endstep %}

{% step %}

#### Mistral Large 4を検索してダウンロード

に移動して [Unsloth Chat](https://unsloth.ai/docs/new/studio/chat) またはModel hubで、 **Mistral-Large-4-1T-A52B** を検索し、 [unsloth/Mistral-Large-4-1T-A52B-GGUF](https://huggingface.co/unsloth/Mistral-Large-4-1T-A52B-GGUF)を選択します。上記のサイズとメモリ要件を参考に、必要な量子化をダウンロードしてください。
{% endstep %}

{% step %}

#### Mistral Large 4を実行

Mistral Large 4は `high` をデフォルトの推論レベルとして使用します。 `low` 高速チャットには `medium` 日常タスクには `high` を、複雑なプロンプトやエージェント型コーディングには使用します。Unslothが最適な設定を自動選択しますが、手動でも調整できます。

詳細は、 [Unsloth推論ガイド](/docs/jp/shii/studio/chat.md).
{% endstep %}

{% step %}

#### Unsloth APIでMistral Large 4を提供

を使用できます。 `unsloth run` コマンドで、 `llama-server` のランタイムフラグを使用して、コンテキストサイズ、GPUレイヤー、スレッディング、サンプリングを設定できます。詳細は [APIドキュメント](https://unsloth.ai/docs/basics/api) または [unsloth start](https://unsloth.ai/docs/integrations/unsloth-start).

{% code overflow="wrap" %}

```bash
unsloth run --model unsloth/Mistral-Large-4-1T-A52B-GGUF:UD-Q2_K_XL \\
    --temp 1.0 \\
    --top-p 0.95 \\
    --top-k 0 \\
    --min-p 0.0 \\
    --chat-template-kwargs '{"reasoning_effort":"high"}'
```

{% endcode %}

Mistral Large 4をサポートするランタイムを使用してください。
{% endstep %}

{% step %}

#### Unslothの準備ができました

Unsloth Desktopを通じてMistral Large 4をツールに接続できます。Unslothは以下のワークフローもサポートしています：

* **ツール接続：** [Claude Code](/docs/jp/ji-chu/claude-code.md), [Codex](/docs/jp/ji-chu/codex.md), [ウェブ検索](/docs/jp/shii/studio/chat.md#advanced-web-search), [MCP](/docs/jp/ji-chu/mcp.md) など
* **モデルの学習：** 他の対応するテキスト、拡散、 [埋め込み](/docs/jp/ji-chu/embedding-finetuning.md)、など
* **メディア生成：** 作成・学習 [画像](/docs/jp/ji-chu/diffusion-image.md)、動画、 [TTS](/docs/jp/ji-chu/text-to-speech-tts-fine-tuning.md) ローカルで

<div align="center"><figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FYShiiub5gs5pCQLX6d4U%2FScreenshot%202026-08-15%20at%2012.18.24%E2%80%AFAM.png?alt=media&amp;token=d6996797-a144-4113-b4c3-155cca6c39a0" alt="Unsloth Desktop Agents settings interface example" width="563"><figcaption><p>Unsloth DesktopのAgents設定（インターフェース例）。ツールを接続する際はMistral Large 4とダウンロード済みの量子化を選択してください。</p></figcaption></figure></div>
{% endstep %}
{% endstepper %}

### 量子化分析

ツール呼び出し、コーディング、エージェントの長い推論軌跡などさまざまな分野でKLDおよびtop-1%ベンチマークを実施し、Unslothの動的量子化（UD3）がモデルを小型化しながらも多くの精度を維持できることを示しています。

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F57miJQhlcpxXmZ1XuYc1%2Fsize_vs_top1_per_axis.png?alt=media&amp;token=6e121fc8-6f9a-43df-bea8-d317cbe5448e" alt=""><figcaption></figcaption></figure>

KLDも実施し、コーパスごとにも提供しています：

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FeclA1iBNKp9D2Gk2TzyL%2Fsize_vs_kld_per_axis.png?alt=media&amp;token=88cfa583-370a-4e1b-bf44-e9b797df8a9d" alt=""><figcaption></figcaption></figure>

| 量子化                                                                                              | サイズ     | 平均KLD（7カテゴリ） | トップ1一致率 |
| ------------------------------------------------------------------------------------------------ | ------- | ------------ | ------- |
| [UD-IQ1\_S](https://huggingface.co/unsloth/Mistral-Large-4-1T-A52B-GGUF/tree/main/UD-IQ1_S)      | 233 GB  | 0.1263       | 90.6%   |
| [UD-IQ1\_M](https://huggingface.co/unsloth/Mistral-Large-4-1T-A52B-GGUF/tree/main/UD-IQ1_M)      | 260 GB  | 0.0919       | 92.3%   |
| [UD-IQ2\_XXS](https://huggingface.co/unsloth/Mistral-Large-4-1T-A52B-GGUF/tree/main/UD-IQ2_XXS)  | 302 GB  | 0.0566       | 93.9%   |
| [UD-Q2\_K\_XL](https://huggingface.co/unsloth/Mistral-Large-4-1T-A52B-GGUF/tree/main/UD-Q2_K_XL) | 378 GB  | 0.0298       | 95.6%   |
| [UD-IQ3\_XXS](https://huggingface.co/unsloth/Mistral-Large-4-1T-A52B-GGUF/tree/main/UD-IQ3_XXS)  | 424 GB  | 0.0217       | 96.2%   |
| [UD-Q3\_K\_XL](https://huggingface.co/unsloth/Mistral-Large-4-1T-A52B-GGUF/tree/main/UD-Q3_K_XL) | 493 GB  | 0.0162       | 96.6%   |
| [UD-Q4\_K\_XL](https://huggingface.co/unsloth/Mistral-Large-4-1T-A52B-GGUF/tree/main/UD-Q4_K_XL) | 605 GB  | 0.0071       | 97.8%   |
| [UD-Q5\_K\_XL](https://huggingface.co/unsloth/Mistral-Large-4-1T-A52B-GGUF/tree/main/UD-Q5_K_XL) | 784 GB  | 0.0038       | 98.5%   |
| [UD-Q6\_K\_XL](https://huggingface.co/unsloth/Mistral-Large-4-1T-A52B-GGUF/tree/main/UD-Q6_K_XL) | 890 GB  | 0.0032       | 98.6%   |
| [UD-Q8\_K\_XL](https://huggingface.co/unsloth/Mistral-Large-4-1T-A52B-GGUF/tree/main/UD-Q8_K_XL) | 1115 GB |              |         |

### 🦙 llama.cppでMistral Large 4を実行

次の機能を備えたllama.cppビルドを使用してください： **Mistral Large 4サポート**。以下のコマンドでは `UD-Q2_K_XL` 量子化（およそ **378GB**).

{% stepper %}
{% step %}

#### llama.cppをインストール

入手するには [GitHubのllama.cpp](https://github.com/ggml-org/llama.cpp)を取得するか、以下の手順でビルドしてください。LinuxでNVIDIA GPUを使う場合は、最初にCUDAツールキットとビルド依存関係をインストールします：

```bash
sudo apt-get update
sudo apt-get install -y build-essential cmake curl libcurl4-openssl-dev
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 --target llama-cli llama-server
```

向けに **CPUまたはApple Metal**の場合は `-DGGML_CUDA=OFF`。MetalサポートはmacOSでデフォルトで有効です。Windowsや他のGPUバックエンドについては、リポジトリのビルド手順に従ってください。
{% endstep %}

{% step %}

#### Mistral Large 4をダウンロードして実行

このコマンドは量子化をダウンロードし、ローカルチャットサーバーを起動します：

```bash
./llama.cpp/build/bin/llama-server \\
    -hf unsloth/Mistral-Large-4-1T-A52B-GGUF:UD-Q2_K_XL \\
    --ctx-size 32768 \\
    --temp 1.0 \\
    --top-p 0.95 \\
    --top-k 0 \\
    --min-p 0.0 \\
    --chat-template-kwargs '{"reasoning_effort":"high"}' \\
    --host 127.0.0.1 --port 8080
```

開く [http://127.0.0.1:8080](http://127.0.0.1:8080/) をブラウザで開いてチャットしてください。APIは次で利用できます： `http://127.0.0.1:8080/v1`.

この例では **32Kコンテキスト** を使用してKVキャッシュメモリを抑えています。 `--top-k 0` と `--min-p 0.0` 追加のサンプリングフィルタを無効にし、推奨のtemperatureとtop-p設定を適用します。メモリ不足になった場合は、 `--ctx-size` を下げるか、より小さい量子化を選んでください。
{% endstep %}

{% step %}

#### 任意：手動でダウンロード

Hugging Face CLIをインストールし、必要な量子化のみをダウンロードします：

```bash
pip install -U huggingface_hub
hf download unsloth/Mistral-Large-4-1T-A52B-GGUF \\
    --local-dir unsloth/Mistral-Large-4-1T-A52B-GGUF \\
    --include "UD-Q2_K_XL/*"
```

9つのシャードを **すべて** 同じディレクトリに置いてください。上記のサーバーコマンドでは、 `-hf unsloth/Mistral-Large-4-1T-A52B-GGUF:UD-Q2_K_XL` を次のように置き換えます：

```bash
--model unsloth/Mistral-Large-4-1T-A52B-GGUF/UD-Q2_K_XL/Mistral-Large-4-1T-A52B-UD-Q2_K_XL-00001-of-00009.gguf
```

llama.cppは残りのシャードを自動的に読み込みます。代わりにDynamic 1-bitを使うには、 `UD-IQ1_S/*` をダウンロードし、 `--model` を `Mistral-Large-4-1T-A52B-UD-IQ1_S-00001-of-00006.gguf` そのフォルダ内に指定してください。
{% endstep %}
{% endstepper %}

### ベンチマーク

その他のベンチマークはMistralの [公式ブログ](https://mistral.ai/news/mistral-large-4-oss/).

<div><figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FrTfj0eor2jVXeH9huZQf%2Fartificial-analysis-coding-agent-index-terminal-bench-4-0.png?alt=media&amp;token=a08947b8-0048-4c41-bc9d-1e5f3daed76f" alt=""><figcaption></figcaption></figure> <figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FQSsBf7oTXp1DgRkktb3a%2Fartificial-analysis-cyber-index.png?alt=media&amp;token=1d81038d-082e-4784-93d4-24ebfdcb8eea" alt=""><figcaption></figcaption></figure></div>

<div><figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FvL6PLiJRKH6fuE5PIkY8%2Fweb-browsing-browsecomp.png?alt=media&amp;token=df26f6fa-e8ad-42f1-b29f-8284e9b27323" alt=""><figcaption></figcaption></figure> <figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FwlEZNXmsndI26kr6zLZP%2Fartificial-analysis-coding-agent-index-vs-token-efficiency.png?alt=media&amp;token=ec0e687d-1165-4602-8e5d-b5ccb395eb85" alt=""><figcaption></figcaption></figure></div>


---

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