diff options
author | Jacob Marshall <me@jhqcat.com> | 2024-07-28 13:36:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-28 14:36:05 +0200 |
commit | 636eff652aca3f0b1228535f7a67ebf61e49d813 (patch) | |
tree | 384ac0f65abfd6d3c56a8f7848b11a50bc21fe31 | |
parent | 0f5cbb08b36a2d962470ec590a2d2bd9770bd12d (diff) | |
download | candle-636eff652aca3f0b1228535f7a67ebf61e49d813.tar.gz candle-636eff652aca3f0b1228535f7a67ebf61e49d813.tar.bz2 candle-636eff652aca3f0b1228535f7a67ebf61e49d813.zip |
change DTypes (fixes #2355) (#2363)
-rw-r--r-- | candle-wasm-examples/bert/src/bin/m.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/candle-wasm-examples/bert/src/bin/m.rs b/candle-wasm-examples/bert/src/bin/m.rs index 67d85e71..92617f15 100644 --- a/candle-wasm-examples/bert/src/bin/m.rs +++ b/candle-wasm-examples/bert/src/bin/m.rs @@ -18,7 +18,7 @@ impl Model { console_error_panic_hook::set_once(); console_log!("loading model"); let device = &Device::Cpu; - let vb = VarBuilder::from_buffered_safetensors(weights, DType::F64, device)?; + let vb = VarBuilder::from_buffered_safetensors(weights, DType::F32, device)?; let config: Config = serde_json::from_slice(&config)?; let tokenizer = Tokenizer::from_bytes(&tokenizer).map_err(|m| JsError::new(&m.to_string()))?; @@ -78,7 +78,7 @@ impl Model { #[derive(serde::Serialize, serde::Deserialize)] struct Embeddings { - data: Vec<Vec<f64>>, + data: Vec<Vec<f32>>, } #[derive(serde::Serialize, serde::Deserialize)] |