From 636eff652aca3f0b1228535f7a67ebf61e49d813 Mon Sep 17 00:00:00 2001 From: Jacob Marshall Date: Sun, 28 Jul 2024 13:36:05 +0100 Subject: change DTypes (fixes #2355) (#2363) --- candle-wasm-examples/bert/src/bin/m.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'candle-wasm-examples/bert/src/bin/m.rs') 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>, + data: Vec>, } #[derive(serde::Serialize, serde::Deserialize)] -- cgit v1.2.3