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

# Multi-GPU-Feinabstimmung mit Unsloth

Erfahren Sie, wie Sie LLMs mit Unsloth auf mehreren GPUs und mit Parallelisierung feinabstimmen.

Unsloth unterstützt derzeit Multi-GPU-Setups über Bibliotheken wie Accelerate und DeepSpeed. Das bedeutet, dass Sie bereits Parallelisierungsmethoden wie **FSDP** und **DDP** mit Unsloth.

#### **Siehe unseren neuen Distributed Data Parallel** [**(DDP)-Multi-GPU-Leitfaden hier**](/docs/de/grundlagen/multi-gpu-training-with-unsloth/ddp.md)**.**

Wir wissen, dass der Prozess komplex sein kann und eine manuelle Einrichtung erfordert. Wir arbeiten hart daran, die Multi-GPU-Unterstützung viel einfacher und benutzerfreundlicher zu machen, und werden bald die offizielle Multi-GPU-Unterstützung für Unsloth ankündigen.

Vorerst können Sie unser [Magistral-2509 Kaggle-Notebook](/docs/de/modelle/tutorials/magistral-how-to-run-and-fine-tune.md#fine-tuning-magistral-with-unsloth) als Beispiel verwenden, das Unsloth mit Multi-GPU nutzt, um das 24B-Parametermodell unterzubringen, oder unseren [DDP-Leitfaden](/docs/de/grundlagen/multi-gpu-training-with-unsloth/ddp.md).

**Bis dahin**, um Multi-GPU für DDP zu aktivieren, gehen Sie wie folgt vor:

1. Erstellen Sie Ihr Trainingsskript als `train.py` (oder ähnlich). Zum Beispiel können Sie eines unserer [Trainingsskripte](https://github.com/unslothai/notebooks/tree/main/python_scripts) verwenden, die aus unseren verschiedenen Notebooks erstellt wurden!
2. Ausführen `accelerate launch train.py` oder `torchrun --nproc_per_node N_GPUS train.py` wobei `N_GPUS` die Anzahl Ihrer GPUs ist.

#### **Pipeline-/Modell-Splitting-Ladevorgang**

Wenn Sie nicht genug VRAM haben, damit 1 GPU beispielsweise Llama 70B laden kann, keine Sorge – wir teilen das Modell für Sie auf jede GPU auf! Um dies zu aktivieren, verwenden Sie den `device_map = "balanced"` Schalter:

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

**Bleiben Sie dran für unsere offizielle Ankündigung!**\
Für weitere Details sehen Sie sich unseren laufenden [Pull Request](https://github.com/unslothai/unsloth/issues/2435) an, in dem die Multi-GPU-Unterstützung diskutiert wird.


---

# 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/de/grundlagen/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.
