# Trainer attribute, n\_gpu

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrainer-attribute-n-gpu%2F75103%3E%5C
**Category:** 🤗Transformers\
**Created:** [February 28, 2024, 5:55am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrainer-attribute-n-gpu%2F75103 "2024-02-28T05:55:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![qiying](https://avatars.discourse-cdn.com/v4/letter/q/8e8cbc/32.png) [@qiying](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fqiying)%5C
**Post date:** [February 28, 2024, 5:55am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrainer-attribute-n-gpu%2F75103%2F1 "2024-02-28T05:55:01Z")

</div>

In a ddp training with multiple gpus, what should the value of `n_gpu` be?

In my setting, the `n_gpu` is always 1 no matter how many gpus are used. I am worried about whether this indicates a bug.

framework: pytorch, GPU type: nvidia-a100
