Skip to content
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

Torch version update #467

Merged
merged 7 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ features = ["doc-only"]

[dependencies]
rust_tokenizers = "8.1.1"
tch = { version = "0.16.0", features = ["download-libtorch"] }
tch = { version = "0.17.0", features = ["download-libtorch"] }
serde_json = "1"
serde = { version = "1", features = ["derive"] }
ordered-float = "4.2.0"
uuid = { version = "1", features = ["v4"] }
thiserror = "1"
half = "2"
regex = "1.6"
regex = "1.10"

cached-path = { version = "0.6", default-features = false, optional = true }
dirs = { version = "5", optional = true }
Expand All @@ -92,7 +92,7 @@ ort = { version = "1.16.3", optional = true, default-features = false, features
"half",
] }
ndarray = { version = "0.15", optional = true }
tokenizers = { version = "0.19.1", optional = true, default-features = false, features = [
tokenizers = { version = "0.20", optional = true, default-features = false, features = [
"onig",
] }

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ models used by this library are in the order of the 100s of MBs to GBs.
package requires `v2.2`: if this version is no longer available on the "get
started" page, the file should be accessible by modifying the target link,
for example
`https://download.pytorch.org/libtorch/cu121/libtorch-cxx11-abi-shared-with-deps-2.2.0%2Bcu121.zip`
`https://download.pytorch.org/libtorch/cu124/libtorch-cxx11-abi-shared-with-deps-2.4.0%2Bcu124.zip`
for a Linux version with CUDA12. **NOTE:** When using `rust-bert` as
dependency from [crates.io](https://crates.io), please check the required
`LIBTORCH` on the published package
Expand Down Expand Up @@ -140,7 +140,7 @@ Alternatively, you can let the `build` script automatically download the
`libtorch` library for you. The `download-libtorch` feature flag needs to be
enabled. The CPU version of libtorch will be downloaded by default. To download
a CUDA version, please set the environment variable `TORCH_CUDA_VERSION` to
`cu118`. Note that the libtorch library is large (order of several GBs for the
`cu124`. Note that the libtorch library is large (order of several GBs for the
CUDA-enabled version) and the first build may therefore take several minutes to
complete.

Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
//!
//! ### Manual installation (recommended)
//!
//! 1. Download `libtorch` from <https://pytorch.org/get-started/locally/>. This package requires `v2.2`: if this version is no longer available on the "get started" page,
//! the file should be accessible by modifying the target link, for example `https://download.pytorch.org/libtorch/cu121/libtorch-cxx11-abi-shared-with-deps-2.2.0%2Bcu121.zip` for a Linux version with CUDA12.
//! 1. Download `libtorch` from <https://pytorch.org/get-started/locally/>. This package requires `v2.4`: if this version is no longer available on the "get started" page,
//! the file should be accessible by modifying the target link, for example `https://download.pytorch.org/libtorch/cu124/libtorch-cxx11-abi-shared-with-deps-2.4.0%2Bcu124.zip` for a Linux version with CUDA12.
//! 2. Extract the library to a location of your choice
//! 3. Set the following environment variables
//! ##### Linux:
Expand All @@ -109,7 +109,7 @@
//! ### Automatic installation
//!
//! Alternatively, you can let the `build` script automatically download the `libtorch` library for you. The `download-libtorch` feature flag needs to be enabled.
//! The CPU version of libtorch will be downloaded by default. To download a CUDA version, please set the environment variable `TORCH_CUDA_VERSION` to `cu118`.
//! The CPU version of libtorch will be downloaded by default. To download a CUDA version, please set the environment variable `TORCH_CUDA_VERSION` to `cu124`.
//! Note that the libtorch library is large (order of several GBs for the CUDA-enabled version) and the first build may therefore take several minutes to complete.
//!
//! ## ONNX Support (Optional)
Expand Down
Loading