3 ms·
Give this a look: https://github.com/guillaume-be/rust-bert https://github.com/guillaume-be/rust-bert https://github.com/guillaume-be/rust-bert/blob/master/ex
by smoldesu 4y ago
Give this a look:
https://github.com/guillaume-be/rust-bert https://github.com/guillaume-be/rust-bert
https://github.com/guillaume-be/rust-bert/blob/master/examples/generation_gpt_neo.rs https://github.com/guillaume-be/rust-bert/blob/master/exampl...
If you have Pytorch configured correctly, this should "just work" for a lot of the smaller models. It won't be a 1:1 ChatGPT replacement, but you can build some pretty cool stuff with it.
> it's basically Python or bust in this space
More or less, but that doesn't have to be a bad thing. If you're on Apple Silicon, you have plenty of performance headroom to deploy Python code for this. I've gotten this library to work on systems with as little as 2gb of memory, so outside of ultra-low-end use cases, you should be fine.
- MuffinFlavored 4y agoTo clarify, > Port of Hugging Face's Transformers library, using the tch-rs crate and pre-processing from rust-tokenizers. > tch-rs: Rust bindings for the C++ api of PyTorch. Which "backend" does this end up using on Apple Silicon, MPS (Metal Performance Shaders) or OpenCL? https://pytorch.org/docs/stable/notes/mps.html https://pytorch.org/docs/stable/notes/mps.html I'm going to guess MPS?
- smoldesu 4y agoWhatever your Pytorch install is designed to accelerate. I've got Ampere-accelerated Pytorch running it on my ARM server, I assume MPS is used on compatible systems.