-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathindex.html
110 lines (109 loc) · 2.92 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Transformers.js | WebGPU Benchmark</title>
<link rel="stylesheet" href="./style.css" />
</head>
<body>
<h1>
<a href="https://github.com/huggingface/transformers.js" target="_blank"
>🤗 Transformers.js</a
>
WebGPU Benchmark
</h1>
<p>
This benchmark measures the execution time of BERT-based embedding models
using the WASM and WebGPU execution providers across different batch
sizes.
</p>
<div id="chart-container">
<canvas id="chart"></canvas>
</div>
<div>
<button id="start" disabled>Start Benchmark</button>
<button id="stop" disabled>Stop Benchmark</button>
</div>
<label id="status"></label>
<details open>
<summary>Options</summary>
<div>
<input
class="tests"
type="checkbox"
value="WASM (int8)"
data-color="33,150,243"
data-device="wasm"
data-dtype="int8"
/>
WASM (int8)<br />
<input
class="tests"
type="checkbox"
value="WASM (fp16)"
data-color="63,81,181"
data-device="wasm"
data-dtype="fp16"
/>
WASM (fp16)<br />
<input
class="tests"
type="checkbox"
value="WASM (fp32)"
data-color="46,204,113"
data-device="wasm"
data-dtype="fp32"
checked
/>
WASM (fp32)<br />
<!-- <input class="tests" type="checkbox" value="WebGPU (int8)" data-color="233,30,99" data-device="webgpu"
data-dtype="int8"> WebGPU (int8)<br /> -->
<input
class="tests"
type="checkbox"
value="WebGPU (fp16)"
data-color="255,193,7"
data-device="webgpu"
data-dtype="fp16"
/>
WebGPU (fp16)<br />
<input
class="tests"
type="checkbox"
value="WebGPU (fp32)"
data-color="0,150,136"
data-device="webgpu"
data-dtype="fp32"
checked
/>
WebGPU (fp32)<br />
</div>
<hr />
<div>
<label>Model ID</label>
<input id="model-id" value="Xenova/all-MiniLM-L6-v2" />
</div>
<div>
<label>Batch sizes</label>
<input id="batch-sizes" value="1, 2, 4, 8, 16, 32" />
</div>
<div>
<label>Sequence length</label>
<input
id="sequence-length"
type="number"
min="1"
max="512"
value="512"
/>
</div>
<hr />
<div>
<input id="x-scale" type="checkbox" /> Log scale (x) <br />
<input id="y-scale" type="checkbox" /> Log scale (y) <br />
</div>
</details>
<script type="module" src="/main.js"></script>
</body>
</html>