Update phiWorker.js
Browse files- phiWorker.js +2 -2
phiWorker.js
CHANGED
@@ -70,7 +70,7 @@ async function generate(data) {
|
|
70 |
);
|
71 |
|
72 |
self.postMessage({ status: "loading", message: "Initializing model" });
|
73 |
-
model.init_with_prompt(
|
74 |
prompt,
|
75 |
temp,
|
76 |
top_p,
|
@@ -80,7 +80,7 @@ async function generate(data) {
|
|
80 |
);
|
81 |
const seq_len = 2048;
|
82 |
|
83 |
-
let sentence =
|
84 |
let maxTokens = maxSeqLen ? maxSeqLen : seq_len - prompt.length - 1;
|
85 |
let startTime = performance.now();
|
86 |
let tokensCount = 0;
|
|
|
70 |
);
|
71 |
|
72 |
self.postMessage({ status: "loading", message: "Initializing model" });
|
73 |
+
const firstToken = model.init_with_prompt(
|
74 |
prompt,
|
75 |
temp,
|
76 |
top_p,
|
|
|
80 |
);
|
81 |
const seq_len = 2048;
|
82 |
|
83 |
+
let sentence = firstToken;
|
84 |
let maxTokens = maxSeqLen ? maxSeqLen : seq_len - prompt.length - 1;
|
85 |
let startTime = performance.now();
|
86 |
let tokensCount = 0;
|