# Use GPU on pc to load the models

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-gpu-on-pc-to-load-the-models%2F604%3E%5C
**Category:** Beginners\
**Created:** [August 5, 2020, 2:33pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-gpu-on-pc-to-load-the-models%2F604 "2020-08-05T14:33:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hildweig](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/hildweig/32/190_2.png) [@Hildweig](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FHildweig)%5C
**Post date:** [August 5, 2020, 2:33pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-gpu-on-pc-to-load-the-models%2F604%2F1 "2020-08-05T14:33:02Z")

</div>

Good evening,  
I’m trying to load the distillbart-cnn-12-6 on my local machine, my GPU is NVIDIA GeForce GT 740M, and is located on “GPU 1”, when I try to load the model it’s not detected.  
Any idea how to solve that?

---

<div class="post-metadata">

**Author:** ![BramVanroy](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/bramvanroy/32/47360_2.png) [@BramVanroy](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBramVanroy)%5C
**Post date:** [August 5, 2020, 4:21pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-gpu-on-pc-to-load-the-models%2F604%2F2 "2020-08-05T16:21:20Z")

</div>

What do you mean it is not detected. What is not detected, the model or your GPU? Can you post the code that you used to load the model?

---

<div class="post-metadata">

**Author:** ![Hildweig](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/hildweig/32/190_2.png) [@Hildweig](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FHildweig)%5C
**Post date:** [August 5, 2020, 6:04pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-gpu-on-pc-to-load-the-models%2F604%2F3 "2020-08-05T18:04:40Z")

</div>

I get this error:  
File “c:\users\acer\appdata\local\programs\python\python38\lib\site-packages\torch\cuda\__init_\_.py”, line 47, in \_check\_driver  
raise AssertionError(“Torch not compiled with CUDA enabled”)  
AssertionError: Torch not compiled with CUDA enabled

For running, I’m using [https://github.com/huggingface/transformers/blob/master/examples/seq2seq/run\_eval.py](https://github.com/huggingface/transformers/blob/master/examples/seq2seq/run_eval.py)

---

<div class="post-metadata">

**Author:** ![BramVanroy](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/bramvanroy/32/47360_2.png) [@BramVanroy](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBramVanroy)%5C
**Post date:** [August 5, 2020, 8:36pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fuse-gpu-on-pc-to-load-the-models%2F604%2F4 "2020-08-05T20:36:03Z")

</div>

You did not install the correct torch version. You have to install torch with CUDA support if you want to use the GPU. U install torch and then install the right version from [https://pytorch.org/get-started/locally/](https://pytorch.org/get-started/locally/)
