summaryrefslogtreecommitdiff
path: root/candle-wasm-examples/llama2-c
diff options
context:
space:
mode:
authorNicolas Patry <patry.nicolas@protonmail.com>2023-07-26 15:21:50 +0200
committerNicolas Patry <patry.nicolas@protonmail.com>2023-07-26 15:21:50 +0200
commit81bfa46702f35a4fca8e88b7b5402bfdbf3d8f07 (patch)
tree3faf0819b2b97728db3b8770e12f3a8e7138cdca /candle-wasm-examples/llama2-c
parent035372248e73ea5138bcae58f49904f499ba9d28 (diff)
downloadcandle-81bfa46702f35a4fca8e88b7b5402bfdbf3d8f07.tar.gz
candle-81bfa46702f35a4fca8e88b7b5402bfdbf3d8f07.tar.bz2
candle-81bfa46702f35a4fca8e88b7b5402bfdbf3d8f07.zip
Updated.
Diffstat (limited to 'candle-wasm-examples/llama2-c')
-rw-r--r--candle-wasm-examples/llama2-c/src/app.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/candle-wasm-examples/llama2-c/src/app.rs b/candle-wasm-examples/llama2-c/src/app.rs
index a2307471..2ecd771e 100644
--- a/candle-wasm-examples/llama2-c/src/app.rs
+++ b/candle-wasm-examples/llama2-c/src/app.rs
@@ -116,6 +116,7 @@ impl Component for App {
let start_time = performance_now();
self.current_decode = Some(CurrentDecode { start_time });
self.status = "generating...".to_string();
+ self.n_tokens = 0;
self.generated.clear();
let temp = *self.temperature.borrow();
console_log!("temp: {}", temp);
@@ -159,7 +160,6 @@ impl Component for App {
}
Msg::WorkerInMsg(inp) => {
self.worker.send(inp);
- self.n_tokens = 0;
true
}
Msg::UpdateStatus(status) => {