Repository: huggingface/candle (language: rust)

Issue:
Error: unsupported dtype for rmsnorm F64 in `candle-wasm-examples/bert`
I'm trying to run `candle-wasm-examples/bert` on my machine. I've removed it from the rest of the repo, and added versions for the deps in `Cargo.toml`. It builds fine.

When I attempt to download the paris wikipedia article on the served html page, it does that, and downloads the model, however when trying to run the model, I get this error: `Error: Error: unsupported dtype for rmsnorm F64`.

Here's full console output:
```
GET http://localhost:8000/code.js net::ERR_ABORTED 404 (File not found)
(index):61 cdn.tailwindcss.com should not be used in production. To use Tailwind CSS in production, install it as a PostCSS plugin or use the Tailwind CLI: https://tailwindcss.com/docs/installation
m.js:400 loading model
m.js:400 running inference on batch [1, 22]
utils.js:21 Uncaught (in promise) 
Error: Error: unsupported dtype for rmsnorm F64
```
Error: unsupported dtype for rmsnorm F64 in `candle-wasm-examples/bert`
I'm trying to run `candle-wasm-examples/bert` on my machine. I've removed it from the rest of the repo, and added versions for the deps in `Cargo.toml`. It builds fine.

When I attempt to download the paris wikipedia article on the served html page, it does that, and downloads the model, however when trying to run the model, I get this error: `Error: Error: unsupported dtype for rmsnorm F64`.

Here's full console output:
```
GET http://localhost:8000/code.js net::ERR_ABORTED 404 (File not found)
(index):61 cdn.tailwindcss.com should not be used in production. To use Tailwind CSS in production, install it as a PostCSS plugin or use the Tailwind CLI: https://tailwindcss.com/docs/installation
m.js:400 loading model
m.js:400 running inference on batch [1, 22]
utils.js:21 Uncaught (in promise) 
Error: Error: unsupported dtype for rmsnorm F64
```


Discussion / hints:

Fix patch:
diff --git a/candle-wasm-examples/bert/src/bin/m.rs b/candle-wasm-examples/bert/src/bin/m.rs
index 67d85e7173..92617f15d4 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)]


Test patch: