jxmorris12 / vec2text

utilities for decoding deep representations (like sentence embeddings) back to text
Other
673 stars 75 forks source link

Vector to Text inversion using MPS/CPU #23

Closed hyungkwonko closed 8 months ago

hyungkwonko commented 8 months ago

Hi, Thanks for great work. I have realized that inverting vector to text is only possible using CUDA. Is there any way I can do this using MPS/CPU? I am using Macbook (Intel). Thanks.

The error I get is:

RuntimeError: Placeholder storage has not been allocated on MPS device!
jxmorris12 commented 8 months ago

Merry Christmas. I think MPS usage is exactly what this unfinished pull request is intended to support. Feel free to try it out: https://github.com/jxmorris12/vec2text/pull/17

hyungkwonko commented 8 months ago

Thanks a lot Jack. It works well. You may also want to consider this: https://github.com/hyungkwonko/vec2text/blob/dc05fe6f6725083304c42bfe5556978872c53098/vec2text/api.py#L71

Hope you have a happy holiday.

Best, Kwon