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

Bump the version to 0.3.0. #1014

Merged
merged 2 commits into from
Oct 1, 2023
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
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
# Changelog
This documents the main changes to the `candle` crate.

## v0.2.3 - Unreleased
## v0.3.1 - Unreleased

### Added

### Modified

## v0.3.0 - 2023-10-01

### Added

- Added the Mistral 7b v0.1 model
[983](https://github.com/huggingface/candle/pull/983).
- Quantized version of the Mistral model
[1009](https://github.com/huggingface/candle/pull/1009).
- Add the gelu-erf op and activation function
[969](https://github.com/huggingface/candle/pull/969).
- Add the mixformer/phi-v1.5 model
[930](https://github.com/huggingface/candle/pull/930).
- Add the sclice-scatter op
[927](https://github.com/huggingface/candle/pull/927).
- Add the Wuerstchen diffusion model
[911](https://github.com/huggingface/candle/pull/911).

### Modified

- Support for simd128 intrinsics in some quantized vecdots
[982](https://github.com/huggingface/candle/pull/982).
- Optimize the index-select cuda kernel
[976](https://github.com/huggingface/candle/pull/976).
- Self-contained safetensor wrappers
[946](https://github.com/huggingface/candle/pull/946).

## v0.2.2 - 2023-09-18

### Added
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exclude = ["candle-flash-attn", "candle-kernels"]
resolver = "2"

[workspace.package]
version = "0.2.3"
version = "0.3.0"
edition = "2021"
description = "Minimalist ML framework."
repository = "https://github.com/huggingface/candle"
Expand Down
10 changes: 5 additions & 5 deletions candle-book/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ readme = "README.md"

[dependencies]
accelerate-src = { workspace = true, optional = true }
candle = { path = "../candle-core", version = "0.2.3", package = "candle-core" }
candle-datasets = { path = "../candle-datasets", version = "0.2.3" }
candle-nn = { path = "../candle-nn", version = "0.2.3" }
candle-transformers = { path = "../candle-transformers", version = "0.2.3" }
candle-flash-attn = { path = "../candle-flash-attn", version = "0.2.3", optional = true }
candle = { path = "../candle-core", version = "0.3.0", package = "candle-core" }
candle-datasets = { path = "../candle-datasets", version = "0.3.0" }
candle-nn = { path = "../candle-nn", version = "0.3.0" }
candle-transformers = { path = "../candle-transformers", version = "0.3.0" }
candle-flash-attn = { path = "../candle-flash-attn", version = "0.3.0", optional = true }
safetensors = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion candle-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ readme = "README.md"
[dependencies]
accelerate-src = { workspace = true, optional = true }
byteorder = { workspace = true }
candle-kernels = { path = "../candle-kernels", version = "0.2.3", optional = true }
candle-kernels = { path = "../candle-kernels", version = "0.3.0", optional = true }
cudarc = { workspace = true, optional = true }
gemm = { workspace = true }
half = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions candle-datasets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ readme = "README.md"

[dependencies]
byteorder = { workspace = true }
candle = { path = "../candle-core", version = "0.2.3", package = "candle-core" }
candle-nn = { path = "../candle-nn", version = "0.2.3" }
candle = { path = "../candle-core", version = "0.3.0", package = "candle-core" }
candle-nn = { path = "../candle-nn", version = "0.3.0" }
hf-hub = { workspace = true}
intel-mkl-src = { workspace = true, optional = true }
memmap2 = { workspace = true }
Expand Down
10 changes: 5 additions & 5 deletions candle-examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ readme = "README.md"

[dependencies]
accelerate-src = { workspace = true, optional = true }
candle = { path = "../candle-core", version = "0.2.3", package = "candle-core" }
candle-datasets = { path = "../candle-datasets", version = "0.2.3" }
candle-nn = { path = "../candle-nn", version = "0.2.3" }
candle-transformers = { path = "../candle-transformers", version = "0.2.3" }
candle-flash-attn = { path = "../candle-flash-attn", version = "0.2.3", optional = true }
candle = { path = "../candle-core", version = "0.3.0", package = "candle-core" }
candle-datasets = { path = "../candle-datasets", version = "0.3.0" }
candle-nn = { path = "../candle-nn", version = "0.3.0" }
candle-transformers = { path = "../candle-transformers", version = "0.3.0" }
candle-flash-attn = { path = "../candle-flash-attn", version = "0.3.0", optional = true }
cudarc = { workspace = true, optional = true }
half = { workspace = true, optional = true }
image = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions candle-flash-attn/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "candle-flash-attn"
version = "0.2.3"
version = "0.3.0"
edition = "2021"

description = "Flash attention layer for the candle ML framework."
Expand All @@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
readme = "README.md"

[dependencies]
candle = { path = "../candle-core", features = ["cuda"], version = "0.2.3", package = "candle-core" }
candle = { path = "../candle-core", features = ["cuda"], version = "0.3.0", package = "candle-core" }
half = { version = "2.3.1", features = ["num-traits"] }

[build-dependencies]
Expand All @@ -21,4 +21,4 @@ rayon = "1.7.0"

[dev-dependencies]
anyhow = { version = "1", features = ["backtrace"] }
candle-nn = { path = "../candle-nn", version = "0.2.3", features = ["cuda"] }
candle-nn = { path = "../candle-nn", version = "0.3.0", features = ["cuda"] }
2 changes: 1 addition & 1 deletion candle-kernels/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "candle-kernels"
version = "0.2.3"
version = "0.3.0"
edition = "2021"

description = "CUDA kernels for Candle"
Expand Down
2 changes: 1 addition & 1 deletion candle-nn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ readme = "README.md"

[dependencies]
accelerate-src = { workspace = true, optional = true }
candle = { path = "../candle-core", version = "0.2.3", package = "candle-core" }
candle = { path = "../candle-core", version = "0.3.0", package = "candle-core" }
half = { workspace = true }
thiserror = { workspace = true }
intel-mkl-src = { workspace = true, optional = true }
Expand Down
20 changes: 0 additions & 20 deletions candle-nn/src/var_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,26 +412,6 @@ impl<'a> VarBuilder<'a> {
Self::new(Box::new(varmap.clone()), dtype, dev.clone())
}

/// Initializes a `VarBuilder` that retrieves tensors stored in a collection of safetensors
/// data.
#[deprecated(
since = "0.2.3",
note = "use from_mmaped_safetensors or from_buffered_safetensors instead"
)]
pub fn from_safetensors(safetensors: Vec<SafeTensors<'a>>, dtype: DType, dev: &Device) -> Self {
let mut routing = HashMap::new();
for (index, sf) in safetensors.iter().enumerate() {
for k in sf.names() {
routing.insert(k.to_string(), index);
}
}
let tensors = SafeTensorWithRouting {
routing,
safetensors,
};
Self::new(Box::new(tensors), dtype, dev.clone())
}

/// Initializes a `VarBuilder` that retrieves tensors stored in a collection of safetensors
/// files.
///
Expand Down
4 changes: 2 additions & 2 deletions candle-pyo3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ name = "candle"
crate-type = ["cdylib"]

[dependencies]
candle = { path = "../candle-core", version = "0.2.3", package = "candle-core" }
candle-nn = { path = "../candle-nn", version = "0.2.3" }
candle = { path = "../candle-core", version = "0.3.0", package = "candle-core" }
candle-nn = { path = "../candle-nn", version = "0.3.0" }
half = { workspace = true }
pyo3 = { version = "0.19.0", features = ["extension-module"] }

Expand Down
6 changes: 3 additions & 3 deletions candle-transformers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ readme = "README.md"

[dependencies]
accelerate-src = { workspace = true, optional = true }
candle = { path = "../candle-core", version = "0.2.3", package = "candle-core" }
candle-flash-attn = { path = "../candle-flash-attn", version = "0.2.3", optional = true }
candle-nn = { path = "../candle-nn", version = "0.2.3" }
candle = { path = "../candle-core", version = "0.3.0", package = "candle-core" }
candle-flash-attn = { path = "../candle-flash-attn", version = "0.3.0", optional = true }
candle-nn = { path = "../candle-nn", version = "0.3.0" }
intel-mkl-src = { workspace = true, optional = true }
num-traits = { workspace = true }
rand = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions candle-wasm-examples/bert/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ categories.workspace = true
license.workspace = true

[dependencies]
candle = { path = "../../candle-core", version = "0.2.2", package = "candle-core" }
candle-nn = { path = "../../candle-nn", version = "0.2.2" }
candle-transformers = { path = "../../candle-transformers", version = "0.2.2" }
candle = { path = "../../candle-core", version = "0.3.0", package = "candle-core" }
candle-nn = { path = "../../candle-nn", version = "0.3.0" }
candle-transformers = { path = "../../candle-transformers", version = "0.3.0" }
num-traits = { workspace = true }
tokenizers = { workspace = true, features = ["unstable_wasm"] }

Expand Down
6 changes: 3 additions & 3 deletions candle-wasm-examples/llama2-c/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ categories.workspace = true
license.workspace = true

[dependencies]
candle = { path = "../../candle-core", version = "0.2.3", package = "candle-core" }
candle-nn = { path = "../../candle-nn", version = "0.2.3" }
candle-transformers = { path = "../../candle-transformers", version = "0.2.3" }
candle = { path = "../../candle-core", version = "0.3.0", package = "candle-core" }
candle-nn = { path = "../../candle-nn", version = "0.3.0" }
candle-transformers = { path = "../../candle-transformers", version = "0.3.0" }
num-traits = { workspace = true }
tokenizers = { workspace = true, features = ["unstable_wasm"] }

Expand Down
6 changes: 3 additions & 3 deletions candle-wasm-examples/phi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ categories.workspace = true
license.workspace = true

[dependencies]
candle = { path = "../../candle-core", version = "0.2.3", package = "candle-core" }
candle-nn = { path = "../../candle-nn", version = "0.2.3" }
candle-transformers = { path = "../../candle-transformers", version = "0.2.3" }
candle = { path = "../../candle-core", version = "0.3.0", package = "candle-core" }
candle-nn = { path = "../../candle-nn", version = "0.3.0" }
candle-transformers = { path = "../../candle-transformers", version = "0.3.0" }
tokenizers = { workspace = true, features = ["unstable_wasm"] }
num-traits = { workspace = true }

Expand Down
6 changes: 3 additions & 3 deletions candle-wasm-examples/segment-anything/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ categories.workspace = true
license.workspace = true

[dependencies]
candle = { path = "../../candle-core", version = "0.2.3", package = "candle-core" }
candle-nn = { path = "../../candle-nn", version = "0.2.3" }
candle-transformers = { path = "../../candle-transformers", version = "0.2.3" }
candle = { path = "../../candle-core", version = "0.3.0", package = "candle-core" }
candle-nn = { path = "../../candle-nn", version = "0.3.0" }
candle-transformers = { path = "../../candle-transformers", version = "0.3.0" }
num-traits = { workspace = true }

# App crates.
Expand Down
6 changes: 3 additions & 3 deletions candle-wasm-examples/t5/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ categories.workspace = true
license.workspace = true

[dependencies]
candle = { path = "../../candle-core", version = "0.2.2", package = "candle-core" }
candle-nn = { path = "../../candle-nn", version = "0.2.2" }
candle-transformers = { path = "../../candle-transformers", version = "0.2.2" }
candle = { path = "../../candle-core", version = "0.3.0", package = "candle-core" }
candle-nn = { path = "../../candle-nn", version = "0.3.0" }
candle-transformers = { path = "../../candle-transformers", version = "0.3.0" }
num-traits = { workspace = true }
tokenizers = { workspace = true, features = ["unstable_wasm"] }

Expand Down
4 changes: 2 additions & 2 deletions candle-wasm-examples/whisper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ categories.workspace = true
license.workspace = true

[dependencies]
candle = { path = "../../candle-core", version = "0.2.3", package = "candle-core" }
candle-nn = { path = "../../candle-nn", version = "0.2.3" }
candle = { path = "../../candle-core", version = "0.3.0", package = "candle-core" }
candle-nn = { path = "../../candle-nn", version = "0.3.0" }
num-traits = { workspace = true }
tokenizers = { workspace = true, features = ["unstable_wasm"] }

Expand Down
4 changes: 2 additions & 2 deletions candle-wasm-examples/yolo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ categories.workspace = true
license.workspace = true

[dependencies]
candle = { path = "../../candle-core", version = "0.2.3", package = "candle-core" }
candle-nn = { path = "../../candle-nn", version = "0.2.3" }
candle = { path = "../../candle-core", version = "0.3.0", package = "candle-core" }
candle-nn = { path = "../../candle-nn", version = "0.3.0" }
num-traits = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion candle-wasm-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords.workspace = true
categories.workspace = true

[dependencies]
candle = { path = "../candle-core", version = "0.2.3", package = "candle-core" }
candle = { path = "../candle-core", version = "0.3.0", package = "candle-core" }
rand = { workspace = true }
getrandom = { version = "0.2", features = ["js"] }

Expand Down