• 6 Posts
  • 15 Comments
Joined 1 year ago
cake
Cake day: August 5th, 2023

help-circle














  • Without mps it uses a lot more memory, because fp16 is not supported on the cpu backend. However, I tried it and noticed that there was an update pushed to the repository that split the model into several parts. It seems like I’m not getting any memory leaks now, even with mps as backend. Not sure why, but maybe it needs less RAM if the weights can be converted part by part. Time to test this model more I guess!


  • By MPS I mean “metal performance shaders”, it’s the backend that enables pytorch to use apple’s metal api to use apple silicon specific optimizations. I actually think it’s not unlikely that the issue is with pytorch. The mps support is still beta, and there was a bug that caused a lot of models to output gibberish when I used it. This bug was an open issue for a year and they only just fixed in a recent nightly release, which is why I even bothered to give this model a try.

    That being said, I think one should generally be cautious about what to run their computers, so I appreciate that you started this discussion.


  • I think that’s a very relevant comment, and I also got spooked by this before I ran it. But I noticed that the GitHub repo and the huggingface repo aren’t the same. You can find the remote code in the huggingface repo. I also briefly skimmed the code for potential causes of the memory leak, but it’s not clear to me what’s causing it. It could also be PyTorch or one of the huggingface libraries, since mps support is still very beta.