# Using pipelin on pytorch mps device

**URL:** <https://discuss.huggingface.co/t/using-pipelin-on-pytorch-mps-device/19986>\
**Category:** Beginners\
**Created:** [July 4, 2022, 9:00pm UTC](https://discuss.huggingface.co/t/using-pipelin-on-pytorch-mps-device/19986 "2022-07-04T21:00:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AsaKal](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/asakal/32/299_2.png) [@AsaKal](https://discuss.huggingface.co/u/AsaKal)\
**Post date:** [July 4, 2022, 9:00pm UTC](https://discuss.huggingface.co/t/using-pipelin-on-pytorch-mps-device/19986/1 "2022-07-04T21:00:11Z")

</div>

Hi  
i want to run pipeline abstract for zero-shot-classification task on the mps device. Here is my code

```auto
pipe = pipeline('zero-shot-classification', device = mps_device)
seq = "i love watching the office show"
labels = ['negative', 'positive']
pipe(seq, labels)

```

The error generated is

```auto
RuntimeError: Placeholder storage has not been allocated on MPS device!

```

Which my guess is because seq is on my cpu and not mps. How can i fix this ?  
Is there a way to send seq to the mps device so that i can pass it to the pipe for inference?

Thanks
