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

# Fine-tuning multi-GPU avec Unsloth

Unsloth prend actuellement en charge les configurations multi-GPU via des bibliothèques comme Accelerate et DeepSpeed. Cela signifie que vous pouvez déjà tirer parti de méthodes de parallélisme telles que **FSDP** et **DDP** avec Unsloth.

#### **Consultez notre nouveau guide Distributed Data Parallel** [**(DDP) multi-GPU ici**](/docs/fr/notions-de-base/multi-gpu-training-with-unsloth/ddp.md)**.**

Nous savons que le processus peut être complexe et nécessite une configuration manuelle. Nous travaillons dur pour rendre la prise en charge multi-GPU beaucoup plus simple et conviviale, et nous annoncerons bientôt la prise en charge multi-GPU officielle pour Unsloth.

Pour l’instant, vous pouvez utiliser notre [carnet Kaggle Magistral-2509](/docs/fr/modeles/tutorials/magistral-how-to-run-and-fine-tune.md#fine-tuning-magistral-with-unsloth) comme exemple qui utilise Unsloth multi-GPU pour entraîner le modèle de 24 milliards de paramètres ou notre [guide DDP](/docs/fr/notions-de-base/multi-gpu-training-with-unsloth/ddp.md).

**En attendant**, pour activer le multi-GPU pour DDP, faites ce qui suit :

1. Créez votre script d’entraînement sous le nom `train.py` (ou similaire). Par exemple, vous pouvez utiliser l’un de nos [scripts d’entraînement](https://github.com/unslothai/notebooks/tree/main/python_scripts) créés à partir de nos différents notebooks !
2. Exécutez `accelerate launch train.py` ou `torchrun --nproc_per_node N_GPUS train.py` où `N_GPUS` est le nombre de GPU que vous possédez.

#### **Chargement par pipeline / découpage du modèle**

Si vous n’avez pas assez de VRAM pour qu’un seul GPU charge par exemple Llama 70B, pas d’inquiétude - nous diviserons le modèle pour vous sur chaque GPU ! Pour activer cela, utilisez le `device_map = "balanced"` paramètre :

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

**Restez à l’écoute pour notre annonce officielle !**\
Pour plus de détails, consultez notre [Pull Request](https://github.com/unslothai/unsloth/issues/2435) en cours qui discute de la prise en charge multi-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 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/fr/notions-de-base/multi-gpu-training-with-unsloth.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.
