# Gpt-neo 27 and 13

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgpt-neo-27-and-13%2F6702%3E%5C
**Category:** Models\
**Created:** [June 10, 2021, 3:03pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgpt-neo-27-and-13%2F6702 "2021-06-10T15:03:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikeyBeez](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mikeybeez/32/21067_2.png) [@MikeyBeez](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FMikeyBeez)%5C
**Post date:** [June 10, 2021, 3:03pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgpt-neo-27-and-13%2F6702%2F1 "2021-06-10T15:03:38Z")

</div>

When I run on my CPU everything is fine, but when I run on my GPU, I get garbage. Is this the correct syntax?

`generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B', device=1)`

---

<div class="post-metadata">

**Author:** ![kurbster](https://avatars.discourse-cdn.com/v4/letter/k/7bcc69/32.png) [@kurbster](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fkurbster)%5C
**Post date:** [June 18, 2021, 2:27am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgpt-neo-27-and-13%2F6702%2F2 "2021-06-18T02:27:25Z")

</div>

The devices are 0 indexed. So if you have 1 GPU you should use  
`generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B', device=0)`  
You can check how many devices are available with `torch.cuda.device_count()` Then check a specific device with `torch.cuda.get_device_name[0]`

---

<div class="post-metadata">

**Author:** ![MikeyBeez](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mikeybeez/32/21067_2.png) [@MikeyBeez](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FMikeyBeez)%5C
**Post date:** [June 18, 2021, 4:46am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgpt-neo-27-and-13%2F6702%2F3 "2021-06-18T04:46:50Z")

</div>

Thanks. I have three: a 1050ti and two k80s.
