mirror of
https://github.com/huggingface/candle.git
synced 2025-06-22 04:22:50 +00:00
Bump the version to 0.3.0. (#1014)
* Bump the version to 0.3.0. * Changelog update.
This commit is contained in:
@ -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 }
|
||||
|
@ -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.
|
||||
///
|
||||
|
Reference in New Issue
Block a user