> 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/ji-chu/multi-gpu-training-with-unsloth.md).

# Unsloth によるマルチ GPU ファインチューニング

Unsloth で複数 GPU と並列処理を使って LLM をファインチューニングする方法を学びます。

Unslothは現在、AccelerateやDeepSpeedのようなライブラリを通じてマルチGPU構成をサポートしています。つまり、すでに次のような並列化手法を活用できます **FSDP** そして **DDP** Unslothを使って。

#### **新しい分散データ並列** [**(DDP) マルチGPUガイドはこちら**](/docs/jp/ji-chu/multi-gpu-training-with-unsloth/ddp.md)**.**

このプロセスは複雑で、手動でのセットアップが必要であることは承知しています。マルチGPUサポートをもっと簡単で使いやすくするために全力で取り組んでおり、Unslothの公式マルチGPUサポートをまもなく発表する予定です。

当面は、こちらをご利用ください [Magistral-2509 Kaggleノートブック](/docs/jp/moderu/tutorials/magistral-how-to-run-and-fine-tune.md#fine-tuning-magistral-with-unsloth) 24Bパラメータのモデルを収めるためにマルチGPU版Unslothを利用している例として、または [DDPガイド](/docs/jp/ji-chu/multi-gpu-training-with-unsloth/ddp.md).

**それまでの間**、DDPでマルチGPUを有効にするには、以下を行ってください：

1. トレーニングスクリプトを `train.py` として作成します（または同様のもの）。たとえば、次のいずれかを使えます [トレーニングスクリプト](https://github.com/unslothai/notebooks/tree/main/python_scripts) 私たちのさまざまなノートブックから作成されたものです！
2. 実行 `accelerate launch train.py` または `torchrun --nproc_per_node N_GPUS train.py` ここで `N_GPUS` は、お持ちのGPUの数です。

#### **パイプライン / モデル分割による読み込み**

1枚のGPUにLlama 70Bなどを読み込むだけのVRAMがない場合でも心配いりません。モデルを各GPUに分割します！これを有効にするには、次の `device_map = "balanced"` フラグを使用します：

```python
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
    "unsloth/Llama-3.3-70B-Instruct",
    load_in_4bit = True,
    device_map = "balanced",
)
```

**公式発表をお待ちください！**\
詳細については、進行中のこちらをご覧ください [プルリクエスト](https://github.com/unslothai/unsloth/issues/2435) マルチGPUサポートについて議論しています。


---

# 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/ji-chu/multi-gpu-training-with-unsloth.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.
