Skip to content

Commit 5c638eb

Browse files
authored
Torch version update (#467)
* tch version update * Updated readmes * fix readme * fix readme
1 parent 9707981 commit 5c638eb

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ features = ["doc-only"]
7676

7777
[dependencies]
7878
rust_tokenizers = "8.1.1"
79-
tch = { version = "0.16.0", features = ["download-libtorch"] }
79+
tch = { version = "0.17.0", features = ["download-libtorch"] }
8080
serde_json = "1"
8181
serde = { version = "1", features = ["derive"] }
8282
ordered-float = "4.2.0"
8383
uuid = { version = "1", features = ["v4"] }
8484
thiserror = "1"
8585
half = "2"
86-
regex = "1.6"
86+
regex = "1.10"
8787

8888
cached-path = { version = "0.6", default-features = false, optional = true }
8989
dirs = { version = "5", optional = true }
@@ -92,7 +92,7 @@ ort = { version = "1.16.3", optional = true, default-features = false, features
9292
"half",
9393
] }
9494
ndarray = { version = "0.15", optional = true }
95-
tokenizers = { version = "0.19.1", optional = true, default-features = false, features = [
95+
tokenizers = { version = "0.20", optional = true, default-features = false, features = [
9696
"onig",
9797
] }
9898

README.md

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

src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@
9090
//!
9191
//! ### Manual installation (recommended)
9292
//!
93-
//! 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,
94-
//! 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.
93+
//! 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,
94+
//! 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.
9595
//! 2. Extract the library to a location of your choice
9696
//! 3. Set the following environment variables
9797
//! ##### Linux:
@@ -109,7 +109,7 @@
109109
//! ### Automatic installation
110110
//!
111111
//! Alternatively, you can let the `build` script automatically download the `libtorch` library for you. The `download-libtorch` feature flag needs to be enabled.
112-
//! 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`.
112+
//! 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`.
113113
//! 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.
114114
//!
115115
//! ## ONNX Support (Optional)

0 commit comments

Comments
 (0)