Skip to content

Commit 891dc78

Browse files
committed
Use Prettier code style
1 parent aa2422d commit 891dc78

File tree

3 files changed

+29
-16
lines changed

3 files changed

+29
-16
lines changed

examples/get-started-latency-breakdown/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# WebLLM Get Started App
22

3-
This folder provides a minimum demo to show WebLLM API in a webapp setting with
3+
This folder provides a minimum demo to show WebLLM API in a webapp setting with
44
collection of latency statistics for individual token sampling steps.
55
To try it out, you can do the following steps under this folder
66

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
3-
<head>
3+
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>GPU sampleTokenFromLogits Tests</title>
77
<style>
8-
body { font-family: Arial, sans-serif; margin: 2em; }
9-
.label { margin: 0.5em 0; font-weight: bold; }
10-
.result { margin: 0.5em 0 1.5em 0; padding: 0.5em; background: #f4f4f4; border-radius: 4px; }
11-
button { padding: 0.5em 1em; font-size: 1em; }
8+
body {
9+
font-family: Arial, sans-serif;
10+
margin: 2em;
11+
}
12+
.label {
13+
margin: 0.5em 0;
14+
font-weight: bold;
15+
}
16+
.result {
17+
margin: 0.5em 0 1.5em 0;
18+
padding: 0.5em;
19+
background: #f4f4f4;
20+
border-radius: 4px;
21+
}
22+
button {
23+
padding: 0.5em 1em;
24+
font-size: 1em;
25+
}
1226
</style>
13-
</head>
14-
<body>
27+
</head>
28+
<body>
1529
<h1>GPU sampleTokenFromLogits Tests</h1>
1630
<button id="run-tests">Re-run All Tests</button>
1731
<div class="label">Overall:</div>
@@ -25,11 +39,11 @@ <h1>GPU sampleTokenFromLogits Tests</h1>
2539
<div class="label">Logprobs:</div>
2640
<div id="logprobs-label" class="result"></div>
2741
<script type="module">
28-
import './sanity_checks.ts';
29-
document.getElementById('run-tests').onclick = () => {
30-
// Reload the module to rerun tests
31-
window.location.reload();
32-
};
42+
import "./sanity_checks.ts";
43+
document.getElementById("run-tests").onclick = () => {
44+
// Reload the module to rerun tests
45+
window.location.reload();
46+
};
3347
</script>
34-
</body>
48+
</body>
3549
</html>

src/llm_chat.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,6 @@ export class LLMChatPipeline {
12761276
temperature = Math.max(1e-6, temperature); // to prevent division by zero
12771277

12781278
const numSeqs = 1;
1279-
const numTokens = this.appearedTokensFreq.size;
12801279

12811280
const temperatures = new Float32Array([temperature]);
12821281

0 commit comments

Comments
 (0)