-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replacing the python utils with rust code? #12
Comments
Hello, I had a look at the serde-pickle crate (https://docs.rs/serde-pickle/0.6.0/serde_pickle/) and I am afraid a Rust native loading of the Pytorch model files would require a significant amount of work. Here are the issues I have identified following a very brief investigation:
This conversion requirement is linked to the However, I would like to support in getting you started using the library. Please note that the download scripts have all been tested and are running in a controlled CI Linux environment. The CI setup can be seen at https://travis-ci.com/guillaume-be/rust-bert/jobs/295652126 Regarding the segfaults, could you post the error message you are getting? The |
Hello, Sorry for the delayed response on this as I was working on a more convenient alternative for a pure Rust utilization. I have worked with the Transformers' authors (Thank you to @julien-c and the Hugging Face team for the support), to offer Rust-compatible model weights for direct download in the library. This means that users no longer need to use Python if they want to load a set of pre-trained weights. Please refer to the updated documentation for examples on how to use the library. |
it works brilliantly thanks. for other people who come across this bug, you need to run (and make sure that you have
|
Do you mind going ahead with replacing the python utilities with rust code?
The python utilis scripts are segfaulting (!!) on my system (possibly due to out of memory). Even the first import alone causes a segfault. I've been careful to create a fresh venv using python 3.6 and installed torch torchvision and transformers only in the venv on an up-to-date linux system running cuda 10.1 (several different versions of python actually including 3.7 and 3.8).
This line alone causes a segfault:
The text was updated successfully, but these errors were encountered: