# Accelarator can't detect my GPUs?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faccelarator-cant-detect-my-gpus%2F79187%3E%5C
**Category:** 🤗Accelerate\
**Created:** [March 28, 2024, 7:32pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faccelarator-cant-detect-my-gpus%2F79187 "2024-03-28T19:32:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Buggod](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@Buggod](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBuggod)%5C
**Post date:** [March 28, 2024, 7:32pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faccelarator-cant-detect-my-gpus%2F79187%2F1 "2024-03-28T19:32:32Z")

</div>

![Screenshot 2024-03-28 at 3.31.03 PM](https://us1.discourse-cdn.com/hellohellohello/original/3X/4/4/445545f0a4b500713e99a778f50801773d705d54.png)  
Is my config incorrect? I belive the kernel warning is not relevant to this issue.  
Would appreciate any help! I really want to use two GPUs in parrallel to have more CUDA memory!

---

<div class="post-metadata">

**Author:** ![muellerzr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/muellerzr/32/21583_2.png) [@muellerzr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmuellerzr)%5C
**Post date:** [March 28, 2024, 7:38pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faccelarator-cant-detect-my-gpus%2F79187%2F2 "2024-03-28T19:38:06Z")

</div>

> [@Buggod](#):
>
> Would appreciate any help! I really want to use two GPUs in parrallel to have more CUDA memory!

You’re in a notebook, you need the notebook launcher 🙂 [Launching Multi-GPU Training from a Jupyter Environment](https://huggingface.co/docs/accelerate/basic_tutorials/notebook)

---

<div class="post-metadata">

**Author:** ![Buggod](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@Buggod](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBuggod)%5C
**Post date:** [March 28, 2024, 7:48pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faccelarator-cant-detect-my-gpus%2F79187%2F3 "2024-03-28T19:48:42Z")

</div>

Thank vm for the reply!  
Howeveer, I’m just trying to run inference on a server. The link is about training on different IPs? How to work on this with a single line of code? I feel like it’s gonna be super easy.

---

<div class="post-metadata">

**Author:** ![muellerzr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/muellerzr/32/21583_2.png) [@muellerzr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmuellerzr)%5C
**Post date:** [March 28, 2024, 7:58pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faccelarator-cant-detect-my-gpus%2F79187%2F4 "2024-03-28T19:58:03Z")

</div>

You’ll find running that code from a python file + `accelerate launch` or `torchrun`. will show what you want. This is a limitation of you working out of a Jupyter notebook session.

If you use regular big model inference it will do single parallel inference by loading one GPU after the next.

Here is an example of how to get distributed inference to work, which again requires the use of the `notebook_launcher` if using Jupyter.

> **[Distributed Inference with 🤗 Accelerate](https://huggingface.co/docs/accelerate/usage_guides/distributed_inference)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

---

<div class="post-metadata">

**Author:** ![Buggod](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@Buggod](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBuggod)%5C
**Post date:** [March 28, 2024, 8:25pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faccelarator-cant-detect-my-gpus%2F79187%2F5 "2024-03-28T20:25:07Z")

</div>

![Screenshot 2024-03-28 at 4.23.38 PM](https://us1.discourse-cdn.com/hellohellohello/original/3X/b/c/bcc483db02955f49e317e49881b92010082db37b.png)  
Thank vm!

However, I still encounter issues. Can I know why ?

---

<div class="post-metadata">

**Author:** ![Buggod](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@Buggod](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBuggod)%5C
**Post date:** [March 28, 2024, 8:25pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faccelarator-cant-detect-my-gpus%2F79187%2F6 "2024-03-28T20:25:37Z")

</div>

![Screenshot 2024-03-28 at 4.23.46 PM](https://us1.discourse-cdn.com/hellohellohello/original/3X/4/0/40ac191c9e52f311534c8d3cb7ad5959b9496463.png)

---

<div class="post-metadata">

**Author:** ![muellerzr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/muellerzr/32/21583_2.png) [@muellerzr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmuellerzr)%5C
**Post date:** [March 28, 2024, 8:26pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faccelarator-cant-detect-my-gpus%2F79187%2F7 "2024-03-28T20:26:36Z")

</div>

That means you ran out of CPU memory most likely (RAM)

---

<div class="post-metadata">

**Author:** ![Buggod](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@Buggod](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBuggod)%5C
**Post date:** [March 28, 2024, 8:29pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faccelarator-cant-detect-my-gpus%2F79187%2F8 "2024-03-28T20:29:13Z")

</div>

Wow , I requested 50 GB. I’m running 2 V100 16 GB, so what’s the ideal RAM in this case?

---

<div class="post-metadata">

**Author:** ![Buggod](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@Buggod](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBuggod)%5C
**Post date:** [March 28, 2024, 9:27pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faccelarator-cant-detect-my-gpus%2F79187%2F9 "2024-03-28T21:27:12Z")

</div>

![Screenshot 2024-03-28 at 5.26.34 PM](https://us1.discourse-cdn.com/hellohellohello/original/3X/6/d/6db4a14b8f9a74c0ee5a12acb361ff564f687d18.png)  
Sir I fixed the memory issue but can I know what went wrong now?

---

<div class="post-metadata">

**Author:** ![muellerzr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/muellerzr/32/21583_2.png) [@muellerzr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmuellerzr)%5C
**Post date:** [March 28, 2024, 10:10pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faccelarator-cant-detect-my-gpus%2F79187%2F10 "2024-03-28T22:10:02Z")

</div>

Why are you using the accelerator as a context manager? What documentation are you going off of? That’s mentioned absolutely no where in any of our documentation. I’d highly recommend starting on our basic tutorials, such as the first one I linked there and this one [Handling big models for inference](https://huggingface.co/docs/accelerate/usage_guides/big_modeling)

---

<div class="post-metadata">

**Author:** ![Buggod](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@Buggod](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBuggod)%5C
**Post date:** [March 29, 2024, 3:14am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faccelarator-cant-detect-my-gpus%2F79187%2F11 "2024-03-29T03:14:59Z")

</div>

Sir upon reading those docs, I have following questions:

1. My project requires me to inference a LLM (requires 24+ GB in full precision) on two 16g v100s, it seems that Doc Distributed Inference 2nd and 3rd part is related to my request using accelerate. While the 1st part in the Distributed Inference Doc and big model inference aren’t relevant, while I’ve being trying to deploy them the whole night.  
Am I correct?
2. While the 3rd part of the Distributed Inference being helpful, the 2nd part of it is missing in the doc, which I find most straightforward and relevant. The name is " 2. Loading parts of a model onto each GPU and processing a single input at one time" Can you please provide that part of doc to me?

Thank you very much!
