guillaume-be / rust-bert

Rust native ready-to-use NLP pipelines and transformer-based models (BERT, DistilBERT, GPT2,...)
https://docs.rs/crate/rust-bert
Apache License 2.0
2.67k stars 217 forks source link

update tch and torch-sys from 0.13.0 to 0.14.0 #426

Closed OhMyVolk closed 1 year ago

OhMyVolk commented 1 year ago

Tested locally using cargo test --features hf-tokenizers onnx with both CPU and GPU versions of libtorch 2.1.0.

System specs: OS: Linux Distro: Manjaro Kernel version: 6.1.53

brianm commented 1 year ago

bump?

guillaume-be commented 1 year ago

Unfortunately the latest version of tch causes error when loading models that have been saved in half precision on a CPU (the CI for this PR is failing). I have raised an issue in the upstream repository (see https://github.com/LaurentMazare/tch-rs/issues/805) but this has not yet been addressed.

guillaume-be commented 1 year ago

Thank you @volking0 for opening this. Unfortunately the migration to 0.14.0 was a bit more involved and required a more careful handling of model weights casting. I have made these changes in https://github.com/guillaume-be/rust-bert/pull/435 , including the migration to 0.14.0. Closing this as it is no longer needed - please let me know if you are still facing issues on Arch