From 789ff44559b1f667b5fb6c9ec8ecd7ddeeddfbca Mon Sep 17 00:00:00 2001 From: laurent Date: Mon, 30 Dec 2024 17:51:52 +0100 Subject: [PATCH 1/3] Update the hf-hub dependency to 0.4.0. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 0f70c8e26..27b9bd0e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ criterion = { version = "0.5.1", default-features=false } cudarc = { version = "0.12.1", features = ["std", "cublas", "cublaslt", "curand", "driver", "nvrtc", "f16", "cuda-version-from-build-system", "dynamic-linking"], default-features=false } fancy-regex = "0.13.0" gemm = { version = "0.17.0", features = ["wasm-simd128-enable"] } -hf-hub = { version = "0.3.3", package = "candle-hf-hub" } +hf-hub = "0.4.0" half = { version = "2.3.1", features = ["num-traits", "use-intrinsics", "rand_distr"] } hound = "3.5.1" image = { version = "0.25.2", default-features = false, features = ["jpeg", "png"] } From dfaf9fd557193000c507b7243cc64f9f40baf40c Mon Sep 17 00:00:00 2001 From: laurent Date: Mon, 30 Dec 2024 17:55:54 +0100 Subject: [PATCH 2/3] Fix the book. --- candle-book/src/inference/hub.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/candle-book/src/inference/hub.md b/candle-book/src/inference/hub.md index fb6f9e51f..e8d8b267d 100644 --- a/candle-book/src/inference/hub.md +++ b/candle-book/src/inference/hub.md @@ -11,8 +11,8 @@ Then let's start by downloading the [model file](https://huggingface.co/bert-bas ```rust # extern crate candle_core; -# extern crate candle_hf_hub; -use candle_hf_hub::api::sync::Api; +# extern crate hf_hub; +use hf_hub::api::sync::Api; use candle_core::Device; let api = Api::new().unwrap(); @@ -50,8 +50,8 @@ Now that we have our weights, we can use them in our bert architecture: ```rust # extern crate candle_core; # extern crate candle_nn; -# extern crate candle_hf_hub; -# use candle_hf_hub::api::sync::Api; +# extern crate hf_hub; +# use hf_hub::api::sync::Api; # # let api = Api::new().unwrap(); # let repo = api.model("bert-base-uncased".to_string()); From 71dd2e2ab74243484e8ef289af1a7d0018b4728f Mon Sep 17 00:00:00 2001 From: laurent Date: Tue, 31 Dec 2024 19:00:23 +0100 Subject: [PATCH 3/3] Use 0.4.1. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 27b9bd0e7..bb053d979 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ criterion = { version = "0.5.1", default-features=false } cudarc = { version = "0.12.1", features = ["std", "cublas", "cublaslt", "curand", "driver", "nvrtc", "f16", "cuda-version-from-build-system", "dynamic-linking"], default-features=false } fancy-regex = "0.13.0" gemm = { version = "0.17.0", features = ["wasm-simd128-enable"] } -hf-hub = "0.4.0" +hf-hub = "0.4.1" half = { version = "2.3.1", features = ["num-traits", "use-intrinsics", "rand_distr"] } hound = "3.5.1" image = { version = "0.25.2", default-features = false, features = ["jpeg", "png"] }