whitphx HF Staff commited on
Commit
f8d016c
Β·
1 Parent(s): 945bdba

Merge bench-node and bench-web into bench

Browse files
.claude/settings.local.json CHANGED
@@ -1,26 +1,7 @@
1
  {
2
  "permissions": {
3
  "allow": [
4
- "Bash(npm run bench:*)",
5
- "Bash(npm install:*)",
6
- "Bash(npm run bench:cli:*)",
7
- "Bash(timeout 120 npm run bench:cli -- Xenova/all-MiniLM-L6-v2 feature-extraction --mode warm --repeats 2 --device wasm)",
8
- "Bash(timeout 120 npm run bench:cli -- Xenova/all-MiniLM-L6-v2 feature-extraction --mode warm --repeats 2 --device webgpu)",
9
- "Bash(timeout 180 npm run bench:cli -- Xenova/all-MiniLM-L6-v2 feature-extraction --mode cold --repeats 2 --device wasm)",
10
- "Bash(timeout 180 npm run bench:cli -- Xenova/distilbert-base-uncased feature-extraction --mode warm --repeats 2 --device wasm)",
11
- "Bash(timeout 180 npm run bench:cli -- Xenova/distilbert-base-uncased feature-extraction --mode warm --repeats 2 --device webgpu)",
12
- "Bash(timeout 120 npm run bench:cli -- Xenova/distilbert-base-uncased feature-extraction --mode warm --repeats 2 --device wasm --dtype fp32)",
13
- "Bash(cd:*)",
14
- "Bash(timeout 120 npm run bench:cli -- Xenova/distilbert-base-uncased feature-extraction --mode warm --repeats 2 --device wasm --dtype q8)",
15
- "Bash(timeout 120 npm run bench:cli -- Xenova/distilbert-base-uncased feature-extraction --mode warm --repeats 2 --device webgpu --dtype q8)",
16
- "Bash(timeout 180 npm run bench:cli -- Xenova/bert-base-uncased feature-extraction --mode warm --repeats 2 --device wasm --dtype fp32)",
17
- "Bash(timeout 180 npm run bench:cli -- Xenova/bert-base-uncased feature-extraction --mode warm --repeats 2 --device webgpu --dtype fp32)",
18
- "Bash(timeout 180 npm run bench:cli -- Xenova/bert-base-uncased feature-extraction --mode warm --repeats 2 --device wasm --dtype q8)",
19
- "Bash(timeout 180 npm run bench:cli -- Xenova/bert-base-uncased feature-extraction --mode warm --repeats 2 --device webgpu --dtype q8 --batch-size 8)",
20
- "Bash(timeout 300 npm run bench:cli -- Xenova/gpt2 feature-extraction --mode warm --repeats 2 --device webgpu --dtype q8 --batch-size 1)",
21
- "Bash(timeout 300 npm run bench -- Xenova/gpt2 feature-extraction --mode warm --repeats 2 --dtype q8 --batch-size 1 --cache-dir .bench-cache/warm)",
22
- "Bash(timeout 300 npm run bench:cli -- Xenova/t5-small feature-extraction --mode warm --repeats 2 --device webgpu --dtype fp32 --batch-size 1)",
23
- "Bash(timeout 300 npm run bench:cli -- Xenova/t5-small feature-extraction --mode warm --repeats 2 --device wasm --dtype fp32 --batch-size 1)"
24
  ],
25
  "deny": [],
26
  "ask": []
 
1
  {
2
  "permissions": {
3
  "allow": [
4
+ "Bash(npm run bench:*)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  ],
6
  "deny": [],
7
  "ask": []
.gitignore CHANGED
@@ -128,3 +128,8 @@ dist
128
  .yarn/build-state.yml
129
  .yarn/install-state.gz
130
  .pnp.*
 
 
 
 
 
 
128
  .yarn/build-state.yml
129
  .yarn/install-state.gz
130
  .pnp.*
131
+
132
+ # Benchmark cache directories
133
+ bench/.bench-cache
134
+ bench-node/.bench-cache
135
+ bench-web/.transformers-cache
AGENTS.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Repository Guidelines
2
+
3
+ ## Project Structure & Module Organization
4
+ - Root: overview in `README.md`.
5
+ - `bench-node/`: Node.js CLI benchmark. Source in `src/index.ts`.
6
+ - `bench-web/`: Browser benchmark (UI + headless). Source in `src/main.ts` and `src/cli.ts`, HTML in `index.html`.
7
+ - Caching: Node uses `.bench-cache/<name>`; Web clears Cache Storage + IndexedDB between runs.
8
+
9
+ ## Build, Test, and Development Commands
10
+ - Node (CLI):
11
+ - `cd bench-node && npm i`
12
+ - `npm run bench -- <model> <task> --mode <warm|cold> --repeats <n> [--cache-dir <path>]` (runs benchmark)
13
+ - `npm run build` (type-check via `tsc`)
14
+ - Web (UI + CLI):
15
+ - `cd bench-web && npm i && npm run bench:install` (install Playwright browsers)
16
+ - `npm run dev` (start Vite dev server, open http://localhost:5173)
17
+ - `npm run build` (Vite production build)
18
+ - `npm run bench:cli -- <model> <task> --mode <warm|cold> --repeats <n> --device <wasm|webgpu> [--browser <chromium|firefox|webkit>] [--headed true]`
19
+ - Examples:
20
+ - `npm run bench -- Xenova/distilbert-base-uncased feature-extraction --mode warm --repeats 5 --cache-dir .bench-cache/warm`
21
+ - `npm run bench:cli -- Xenova/all-MiniLM-L6-v2 feature-extraction --mode cold --repeats 3 --device wasm`
22
+
23
+ ## Coding Style & Naming Conventions
24
+ - Language: TypeScript, ES modules.
25
+ - Indentation: 2 spaces; use async/await; keep functions small and composable.
26
+ - Filenames: lowercase like `index.ts`, `main.ts`, `cli.ts`; group code under `src/`.
27
+ - Exports: prefer named exports from modules; avoid default exports.
28
+ - Lint/format: no ESLint/Prettier config in repoβ€”match existing style and run `tsc`/Vite builds to type-check.
29
+
30
+ ## Testing Guidelines
31
+ - No unit test framework configured. Validate by running benchmarks and inspecting JSON output for `p50/p90` across `load_ms`, `first_infer_ms`, and `subsequent_infer_ms`.
32
+ - Repro tips:
33
+ - Warm (Node): prefetch once, then measure N runs using a dedicated `.bench-cache/<name>`.
34
+ - Cold (Node/Web): ensure cache directory is emptied or browser caches are cleared per run.
35
+
36
+ ## Commit & Pull Request Guidelines
37
+ - Commits: short, imperative, scoped when helpful (e.g., `bench-web: add cold mode`). Project history follows this style, e.g., β€œAdd batchsize param”, β€œWarm/Cold tests, repeated tests”.
38
+ - PRs: include purpose, sample commands to reproduce, and a result snippet or screenshot. Link related issues and note any flags (e.g., Chromium `--enable-unsafe-webgpu`) or cache paths used.
39
+
40
+ ## Security & Configuration Tips
41
+ - WebGPU: may require flags (`--enable-unsafe-webgpu`) or supported browsers; CLI installs Playwright browsers via `npm run bench:install`.
42
+ - Cache safety: Node cold runs delete the target cache dirβ€”use only paths under `.bench-cache/`.
bench-node/.gitignore DELETED
@@ -1 +0,0 @@
1
- .bench-cache
 
 
bench-node/README.md DELETED
@@ -1,16 +0,0 @@
1
- # bench-node (warm/cold, repeats, p50/p90)
2
-
3
- ## Setup
4
- ```bash
5
- cd bench-node
6
- npm i
7
- ```
8
-
9
- ## Run examples
10
- ```bash
11
- # Warm: prefetch once (not measured) -> measure 5 times
12
- npm run bench -- Xenova/distilbert-base-uncased feature-extraction --mode warm --repeats 5 --cache-dir .bench-cache/warm
13
-
14
- # Cold: delete cache before each run, measure 3 times
15
- npm run bench -- Xenova/distilbert-base-uncased feature-extraction --mode cold --repeats 3 --cache-dir .bench-cache/cold
16
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bench-node/package-lock.json DELETED
@@ -1,1563 +0,0 @@
1
- {
2
- "name": "bench-node",
3
- "version": "0.0.2",
4
- "lockfileVersion": 3,
5
- "requires": true,
6
- "packages": {
7
- "": {
8
- "name": "bench-node",
9
- "version": "0.0.2",
10
- "dependencies": {
11
- "@huggingface/transformers": "^3.7.4"
12
- },
13
- "devDependencies": {
14
- "tsx": "^4.20.6",
15
- "typescript": "^5.9.3"
16
- }
17
- },
18
- "node_modules/@emnapi/runtime": {
19
- "version": "1.5.0",
20
- "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.5.0.tgz",
21
- "integrity": "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==",
22
- "license": "MIT",
23
- "optional": true,
24
- "dependencies": {
25
- "tslib": "^2.4.0"
26
- }
27
- },
28
- "node_modules/@esbuild/aix-ppc64": {
29
- "version": "0.25.10",
30
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.10.tgz",
31
- "integrity": "sha512-0NFWnA+7l41irNuaSVlLfgNT12caWJVLzp5eAVhZ0z1qpxbockccEt3s+149rE64VUI3Ml2zt8Nv5JVc4QXTsw==",
32
- "cpu": [
33
- "ppc64"
34
- ],
35
- "dev": true,
36
- "license": "MIT",
37
- "optional": true,
38
- "os": [
39
- "aix"
40
- ],
41
- "engines": {
42
- "node": ">=18"
43
- }
44
- },
45
- "node_modules/@esbuild/android-arm": {
46
- "version": "0.25.10",
47
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.10.tgz",
48
- "integrity": "sha512-dQAxF1dW1C3zpeCDc5KqIYuZ1tgAdRXNoZP7vkBIRtKZPYe2xVr/d3SkirklCHudW1B45tGiUlz2pUWDfbDD4w==",
49
- "cpu": [
50
- "arm"
51
- ],
52
- "dev": true,
53
- "license": "MIT",
54
- "optional": true,
55
- "os": [
56
- "android"
57
- ],
58
- "engines": {
59
- "node": ">=18"
60
- }
61
- },
62
- "node_modules/@esbuild/android-arm64": {
63
- "version": "0.25.10",
64
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.10.tgz",
65
- "integrity": "sha512-LSQa7eDahypv/VO6WKohZGPSJDq5OVOo3UoFR1E4t4Gj1W7zEQMUhI+lo81H+DtB+kP+tDgBp+M4oNCwp6kffg==",
66
- "cpu": [
67
- "arm64"
68
- ],
69
- "dev": true,
70
- "license": "MIT",
71
- "optional": true,
72
- "os": [
73
- "android"
74
- ],
75
- "engines": {
76
- "node": ">=18"
77
- }
78
- },
79
- "node_modules/@esbuild/android-x64": {
80
- "version": "0.25.10",
81
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.10.tgz",
82
- "integrity": "sha512-MiC9CWdPrfhibcXwr39p9ha1x0lZJ9KaVfvzA0Wxwz9ETX4v5CHfF09bx935nHlhi+MxhA63dKRRQLiVgSUtEg==",
83
- "cpu": [
84
- "x64"
85
- ],
86
- "dev": true,
87
- "license": "MIT",
88
- "optional": true,
89
- "os": [
90
- "android"
91
- ],
92
- "engines": {
93
- "node": ">=18"
94
- }
95
- },
96
- "node_modules/@esbuild/darwin-arm64": {
97
- "version": "0.25.10",
98
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.10.tgz",
99
- "integrity": "sha512-JC74bdXcQEpW9KkV326WpZZjLguSZ3DfS8wrrvPMHgQOIEIG/sPXEN/V8IssoJhbefLRcRqw6RQH2NnpdprtMA==",
100
- "cpu": [
101
- "arm64"
102
- ],
103
- "dev": true,
104
- "license": "MIT",
105
- "optional": true,
106
- "os": [
107
- "darwin"
108
- ],
109
- "engines": {
110
- "node": ">=18"
111
- }
112
- },
113
- "node_modules/@esbuild/darwin-x64": {
114
- "version": "0.25.10",
115
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.10.tgz",
116
- "integrity": "sha512-tguWg1olF6DGqzws97pKZ8G2L7Ig1vjDmGTwcTuYHbuU6TTjJe5FXbgs5C1BBzHbJ2bo1m3WkQDbWO2PvamRcg==",
117
- "cpu": [
118
- "x64"
119
- ],
120
- "dev": true,
121
- "license": "MIT",
122
- "optional": true,
123
- "os": [
124
- "darwin"
125
- ],
126
- "engines": {
127
- "node": ">=18"
128
- }
129
- },
130
- "node_modules/@esbuild/freebsd-arm64": {
131
- "version": "0.25.10",
132
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.10.tgz",
133
- "integrity": "sha512-3ZioSQSg1HT2N05YxeJWYR+Libe3bREVSdWhEEgExWaDtyFbbXWb49QgPvFH8u03vUPX10JhJPcz7s9t9+boWg==",
134
- "cpu": [
135
- "arm64"
136
- ],
137
- "dev": true,
138
- "license": "MIT",
139
- "optional": true,
140
- "os": [
141
- "freebsd"
142
- ],
143
- "engines": {
144
- "node": ">=18"
145
- }
146
- },
147
- "node_modules/@esbuild/freebsd-x64": {
148
- "version": "0.25.10",
149
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.10.tgz",
150
- "integrity": "sha512-LLgJfHJk014Aa4anGDbh8bmI5Lk+QidDmGzuC2D+vP7mv/GeSN+H39zOf7pN5N8p059FcOfs2bVlrRr4SK9WxA==",
151
- "cpu": [
152
- "x64"
153
- ],
154
- "dev": true,
155
- "license": "MIT",
156
- "optional": true,
157
- "os": [
158
- "freebsd"
159
- ],
160
- "engines": {
161
- "node": ">=18"
162
- }
163
- },
164
- "node_modules/@esbuild/linux-arm": {
165
- "version": "0.25.10",
166
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.10.tgz",
167
- "integrity": "sha512-oR31GtBTFYCqEBALI9r6WxoU/ZofZl962pouZRTEYECvNF/dtXKku8YXcJkhgK/beU+zedXfIzHijSRapJY3vg==",
168
- "cpu": [
169
- "arm"
170
- ],
171
- "dev": true,
172
- "license": "MIT",
173
- "optional": true,
174
- "os": [
175
- "linux"
176
- ],
177
- "engines": {
178
- "node": ">=18"
179
- }
180
- },
181
- "node_modules/@esbuild/linux-arm64": {
182
- "version": "0.25.10",
183
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.10.tgz",
184
- "integrity": "sha512-5luJWN6YKBsawd5f9i4+c+geYiVEw20FVW5x0v1kEMWNq8UctFjDiMATBxLvmmHA4bf7F6hTRaJgtghFr9iziQ==",
185
- "cpu": [
186
- "arm64"
187
- ],
188
- "dev": true,
189
- "license": "MIT",
190
- "optional": true,
191
- "os": [
192
- "linux"
193
- ],
194
- "engines": {
195
- "node": ">=18"
196
- }
197
- },
198
- "node_modules/@esbuild/linux-ia32": {
199
- "version": "0.25.10",
200
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.10.tgz",
201
- "integrity": "sha512-NrSCx2Kim3EnnWgS4Txn0QGt0Xipoumb6z6sUtl5bOEZIVKhzfyp/Lyw4C1DIYvzeW/5mWYPBFJU3a/8Yr75DQ==",
202
- "cpu": [
203
- "ia32"
204
- ],
205
- "dev": true,
206
- "license": "MIT",
207
- "optional": true,
208
- "os": [
209
- "linux"
210
- ],
211
- "engines": {
212
- "node": ">=18"
213
- }
214
- },
215
- "node_modules/@esbuild/linux-loong64": {
216
- "version": "0.25.10",
217
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.10.tgz",
218
- "integrity": "sha512-xoSphrd4AZda8+rUDDfD9J6FUMjrkTz8itpTITM4/xgerAZZcFW7Dv+sun7333IfKxGG8gAq+3NbfEMJfiY+Eg==",
219
- "cpu": [
220
- "loong64"
221
- ],
222
- "dev": true,
223
- "license": "MIT",
224
- "optional": true,
225
- "os": [
226
- "linux"
227
- ],
228
- "engines": {
229
- "node": ">=18"
230
- }
231
- },
232
- "node_modules/@esbuild/linux-mips64el": {
233
- "version": "0.25.10",
234
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.10.tgz",
235
- "integrity": "sha512-ab6eiuCwoMmYDyTnyptoKkVS3k8fy/1Uvq7Dj5czXI6DF2GqD2ToInBI0SHOp5/X1BdZ26RKc5+qjQNGRBelRA==",
236
- "cpu": [
237
- "mips64el"
238
- ],
239
- "dev": true,
240
- "license": "MIT",
241
- "optional": true,
242
- "os": [
243
- "linux"
244
- ],
245
- "engines": {
246
- "node": ">=18"
247
- }
248
- },
249
- "node_modules/@esbuild/linux-ppc64": {
250
- "version": "0.25.10",
251
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.10.tgz",
252
- "integrity": "sha512-NLinzzOgZQsGpsTkEbdJTCanwA5/wozN9dSgEl12haXJBzMTpssebuXR42bthOF3z7zXFWH1AmvWunUCkBE4EA==",
253
- "cpu": [
254
- "ppc64"
255
- ],
256
- "dev": true,
257
- "license": "MIT",
258
- "optional": true,
259
- "os": [
260
- "linux"
261
- ],
262
- "engines": {
263
- "node": ">=18"
264
- }
265
- },
266
- "node_modules/@esbuild/linux-riscv64": {
267
- "version": "0.25.10",
268
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.10.tgz",
269
- "integrity": "sha512-FE557XdZDrtX8NMIeA8LBJX3dC2M8VGXwfrQWU7LB5SLOajfJIxmSdyL/gU1m64Zs9CBKvm4UAuBp5aJ8OgnrA==",
270
- "cpu": [
271
- "riscv64"
272
- ],
273
- "dev": true,
274
- "license": "MIT",
275
- "optional": true,
276
- "os": [
277
- "linux"
278
- ],
279
- "engines": {
280
- "node": ">=18"
281
- }
282
- },
283
- "node_modules/@esbuild/linux-s390x": {
284
- "version": "0.25.10",
285
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.10.tgz",
286
- "integrity": "sha512-3BBSbgzuB9ajLoVZk0mGu+EHlBwkusRmeNYdqmznmMc9zGASFjSsxgkNsqmXugpPk00gJ0JNKh/97nxmjctdew==",
287
- "cpu": [
288
- "s390x"
289
- ],
290
- "dev": true,
291
- "license": "MIT",
292
- "optional": true,
293
- "os": [
294
- "linux"
295
- ],
296
- "engines": {
297
- "node": ">=18"
298
- }
299
- },
300
- "node_modules/@esbuild/linux-x64": {
301
- "version": "0.25.10",
302
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.10.tgz",
303
- "integrity": "sha512-QSX81KhFoZGwenVyPoberggdW1nrQZSvfVDAIUXr3WqLRZGZqWk/P4T8p2SP+de2Sr5HPcvjhcJzEiulKgnxtA==",
304
- "cpu": [
305
- "x64"
306
- ],
307
- "dev": true,
308
- "license": "MIT",
309
- "optional": true,
310
- "os": [
311
- "linux"
312
- ],
313
- "engines": {
314
- "node": ">=18"
315
- }
316
- },
317
- "node_modules/@esbuild/netbsd-arm64": {
318
- "version": "0.25.10",
319
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.10.tgz",
320
- "integrity": "sha512-AKQM3gfYfSW8XRk8DdMCzaLUFB15dTrZfnX8WXQoOUpUBQ+NaAFCP1kPS/ykbbGYz7rxn0WS48/81l9hFl3u4A==",
321
- "cpu": [
322
- "arm64"
323
- ],
324
- "dev": true,
325
- "license": "MIT",
326
- "optional": true,
327
- "os": [
328
- "netbsd"
329
- ],
330
- "engines": {
331
- "node": ">=18"
332
- }
333
- },
334
- "node_modules/@esbuild/netbsd-x64": {
335
- "version": "0.25.10",
336
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.10.tgz",
337
- "integrity": "sha512-7RTytDPGU6fek/hWuN9qQpeGPBZFfB4zZgcz2VK2Z5VpdUxEI8JKYsg3JfO0n/Z1E/6l05n0unDCNc4HnhQGig==",
338
- "cpu": [
339
- "x64"
340
- ],
341
- "dev": true,
342
- "license": "MIT",
343
- "optional": true,
344
- "os": [
345
- "netbsd"
346
- ],
347
- "engines": {
348
- "node": ">=18"
349
- }
350
- },
351
- "node_modules/@esbuild/openbsd-arm64": {
352
- "version": "0.25.10",
353
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.10.tgz",
354
- "integrity": "sha512-5Se0VM9Wtq797YFn+dLimf2Zx6McttsH2olUBsDml+lm0GOCRVebRWUvDtkY4BWYv/3NgzS8b/UM3jQNh5hYyw==",
355
- "cpu": [
356
- "arm64"
357
- ],
358
- "dev": true,
359
- "license": "MIT",
360
- "optional": true,
361
- "os": [
362
- "openbsd"
363
- ],
364
- "engines": {
365
- "node": ">=18"
366
- }
367
- },
368
- "node_modules/@esbuild/openbsd-x64": {
369
- "version": "0.25.10",
370
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.10.tgz",
371
- "integrity": "sha512-XkA4frq1TLj4bEMB+2HnI0+4RnjbuGZfet2gs/LNs5Hc7D89ZQBHQ0gL2ND6Lzu1+QVkjp3x1gIcPKzRNP8bXw==",
372
- "cpu": [
373
- "x64"
374
- ],
375
- "dev": true,
376
- "license": "MIT",
377
- "optional": true,
378
- "os": [
379
- "openbsd"
380
- ],
381
- "engines": {
382
- "node": ">=18"
383
- }
384
- },
385
- "node_modules/@esbuild/openharmony-arm64": {
386
- "version": "0.25.10",
387
- "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.10.tgz",
388
- "integrity": "sha512-AVTSBhTX8Y/Fz6OmIVBip9tJzZEUcY8WLh7I59+upa5/GPhh2/aM6bvOMQySspnCCHvFi79kMtdJS1w0DXAeag==",
389
- "cpu": [
390
- "arm64"
391
- ],
392
- "dev": true,
393
- "license": "MIT",
394
- "optional": true,
395
- "os": [
396
- "openharmony"
397
- ],
398
- "engines": {
399
- "node": ">=18"
400
- }
401
- },
402
- "node_modules/@esbuild/sunos-x64": {
403
- "version": "0.25.10",
404
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.10.tgz",
405
- "integrity": "sha512-fswk3XT0Uf2pGJmOpDB7yknqhVkJQkAQOcW/ccVOtfx05LkbWOaRAtn5SaqXypeKQra1QaEa841PgrSL9ubSPQ==",
406
- "cpu": [
407
- "x64"
408
- ],
409
- "dev": true,
410
- "license": "MIT",
411
- "optional": true,
412
- "os": [
413
- "sunos"
414
- ],
415
- "engines": {
416
- "node": ">=18"
417
- }
418
- },
419
- "node_modules/@esbuild/win32-arm64": {
420
- "version": "0.25.10",
421
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.10.tgz",
422
- "integrity": "sha512-ah+9b59KDTSfpaCg6VdJoOQvKjI33nTaQr4UluQwW7aEwZQsbMCfTmfEO4VyewOxx4RaDT/xCy9ra2GPWmO7Kw==",
423
- "cpu": [
424
- "arm64"
425
- ],
426
- "dev": true,
427
- "license": "MIT",
428
- "optional": true,
429
- "os": [
430
- "win32"
431
- ],
432
- "engines": {
433
- "node": ">=18"
434
- }
435
- },
436
- "node_modules/@esbuild/win32-ia32": {
437
- "version": "0.25.10",
438
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.10.tgz",
439
- "integrity": "sha512-QHPDbKkrGO8/cz9LKVnJU22HOi4pxZnZhhA2HYHez5Pz4JeffhDjf85E57Oyco163GnzNCVkZK0b/n4Y0UHcSw==",
440
- "cpu": [
441
- "ia32"
442
- ],
443
- "dev": true,
444
- "license": "MIT",
445
- "optional": true,
446
- "os": [
447
- "win32"
448
- ],
449
- "engines": {
450
- "node": ">=18"
451
- }
452
- },
453
- "node_modules/@esbuild/win32-x64": {
454
- "version": "0.25.10",
455
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.10.tgz",
456
- "integrity": "sha512-9KpxSVFCu0iK1owoez6aC/s/EdUQLDN3adTxGCqxMVhrPDj6bt5dbrHDXUuq+Bs2vATFBBrQS5vdQ/Ed2P+nbw==",
457
- "cpu": [
458
- "x64"
459
- ],
460
- "dev": true,
461
- "license": "MIT",
462
- "optional": true,
463
- "os": [
464
- "win32"
465
- ],
466
- "engines": {
467
- "node": ">=18"
468
- }
469
- },
470
- "node_modules/@huggingface/jinja": {
471
- "version": "0.5.1",
472
- "resolved": "https://registry.npmjs.org/@huggingface/jinja/-/jinja-0.5.1.tgz",
473
- "integrity": "sha512-yUZLld4lrM9iFxHCwFQ7D1HW2MWMwSbeB7WzWqFYDWK+rEb+WldkLdAJxUPOmgICMHZLzZGVcVjFh3w/YGubng==",
474
- "license": "MIT",
475
- "engines": {
476
- "node": ">=18"
477
- }
478
- },
479
- "node_modules/@huggingface/transformers": {
480
- "version": "3.7.4",
481
- "resolved": "https://registry.npmjs.org/@huggingface/transformers/-/transformers-3.7.4.tgz",
482
- "integrity": "sha512-nMnLM26EX6SlGoIvljsLCbAWwltGJZEaTe/7ZtuVQP4S9Zo0swJ5zZAdZw9c8xGeEZ5Rfs23FSflsV64o4X2MQ==",
483
- "license": "Apache-2.0",
484
- "dependencies": {
485
- "@huggingface/jinja": "^0.5.1",
486
- "onnxruntime-node": "1.21.0",
487
- "onnxruntime-web": "1.22.0-dev.20250409-89f8206ba4",
488
- "sharp": "^0.34.1"
489
- }
490
- },
491
- "node_modules/@img/colour": {
492
- "version": "1.0.0",
493
- "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.0.0.tgz",
494
- "integrity": "sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==",
495
- "license": "MIT",
496
- "engines": {
497
- "node": ">=18"
498
- }
499
- },
500
- "node_modules/@img/sharp-darwin-arm64": {
501
- "version": "0.34.4",
502
- "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.4.tgz",
503
- "integrity": "sha512-sitdlPzDVyvmINUdJle3TNHl+AG9QcwiAMsXmccqsCOMZNIdW2/7S26w0LyU8euiLVzFBL3dXPwVCq/ODnf2vA==",
504
- "cpu": [
505
- "arm64"
506
- ],
507
- "license": "Apache-2.0",
508
- "optional": true,
509
- "os": [
510
- "darwin"
511
- ],
512
- "engines": {
513
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
514
- },
515
- "funding": {
516
- "url": "https://opencollective.com/libvips"
517
- },
518
- "optionalDependencies": {
519
- "@img/sharp-libvips-darwin-arm64": "1.2.3"
520
- }
521
- },
522
- "node_modules/@img/sharp-darwin-x64": {
523
- "version": "0.34.4",
524
- "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.4.tgz",
525
- "integrity": "sha512-rZheupWIoa3+SOdF/IcUe1ah4ZDpKBGWcsPX6MT0lYniH9micvIU7HQkYTfrx5Xi8u+YqwLtxC/3vl8TQN6rMg==",
526
- "cpu": [
527
- "x64"
528
- ],
529
- "license": "Apache-2.0",
530
- "optional": true,
531
- "os": [
532
- "darwin"
533
- ],
534
- "engines": {
535
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
536
- },
537
- "funding": {
538
- "url": "https://opencollective.com/libvips"
539
- },
540
- "optionalDependencies": {
541
- "@img/sharp-libvips-darwin-x64": "1.2.3"
542
- }
543
- },
544
- "node_modules/@img/sharp-libvips-darwin-arm64": {
545
- "version": "1.2.3",
546
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.3.tgz",
547
- "integrity": "sha512-QzWAKo7kpHxbuHqUC28DZ9pIKpSi2ts2OJnoIGI26+HMgq92ZZ4vk8iJd4XsxN+tYfNJxzH6W62X5eTcsBymHw==",
548
- "cpu": [
549
- "arm64"
550
- ],
551
- "license": "LGPL-3.0-or-later",
552
- "optional": true,
553
- "os": [
554
- "darwin"
555
- ],
556
- "funding": {
557
- "url": "https://opencollective.com/libvips"
558
- }
559
- },
560
- "node_modules/@img/sharp-libvips-darwin-x64": {
561
- "version": "1.2.3",
562
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.3.tgz",
563
- "integrity": "sha512-Ju+g2xn1E2AKO6YBhxjj+ACcsPQRHT0bhpglxcEf+3uyPY+/gL8veniKoo96335ZaPo03bdDXMv0t+BBFAbmRA==",
564
- "cpu": [
565
- "x64"
566
- ],
567
- "license": "LGPL-3.0-or-later",
568
- "optional": true,
569
- "os": [
570
- "darwin"
571
- ],
572
- "funding": {
573
- "url": "https://opencollective.com/libvips"
574
- }
575
- },
576
- "node_modules/@img/sharp-libvips-linux-arm": {
577
- "version": "1.2.3",
578
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.3.tgz",
579
- "integrity": "sha512-x1uE93lyP6wEwGvgAIV0gP6zmaL/a0tGzJs/BIDDG0zeBhMnuUPm7ptxGhUbcGs4okDJrk4nxgrmxpib9g6HpA==",
580
- "cpu": [
581
- "arm"
582
- ],
583
- "license": "LGPL-3.0-or-later",
584
- "optional": true,
585
- "os": [
586
- "linux"
587
- ],
588
- "funding": {
589
- "url": "https://opencollective.com/libvips"
590
- }
591
- },
592
- "node_modules/@img/sharp-libvips-linux-arm64": {
593
- "version": "1.2.3",
594
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.3.tgz",
595
- "integrity": "sha512-I4RxkXU90cpufazhGPyVujYwfIm9Nk1QDEmiIsaPwdnm013F7RIceaCc87kAH+oUB1ezqEvC6ga4m7MSlqsJvQ==",
596
- "cpu": [
597
- "arm64"
598
- ],
599
- "license": "LGPL-3.0-or-later",
600
- "optional": true,
601
- "os": [
602
- "linux"
603
- ],
604
- "funding": {
605
- "url": "https://opencollective.com/libvips"
606
- }
607
- },
608
- "node_modules/@img/sharp-libvips-linux-ppc64": {
609
- "version": "1.2.3",
610
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.3.tgz",
611
- "integrity": "sha512-Y2T7IsQvJLMCBM+pmPbM3bKT/yYJvVtLJGfCs4Sp95SjvnFIjynbjzsa7dY1fRJX45FTSfDksbTp6AGWudiyCg==",
612
- "cpu": [
613
- "ppc64"
614
- ],
615
- "license": "LGPL-3.0-or-later",
616
- "optional": true,
617
- "os": [
618
- "linux"
619
- ],
620
- "funding": {
621
- "url": "https://opencollective.com/libvips"
622
- }
623
- },
624
- "node_modules/@img/sharp-libvips-linux-s390x": {
625
- "version": "1.2.3",
626
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.3.tgz",
627
- "integrity": "sha512-RgWrs/gVU7f+K7P+KeHFaBAJlNkD1nIZuVXdQv6S+fNA6syCcoboNjsV2Pou7zNlVdNQoQUpQTk8SWDHUA3y/w==",
628
- "cpu": [
629
- "s390x"
630
- ],
631
- "license": "LGPL-3.0-or-later",
632
- "optional": true,
633
- "os": [
634
- "linux"
635
- ],
636
- "funding": {
637
- "url": "https://opencollective.com/libvips"
638
- }
639
- },
640
- "node_modules/@img/sharp-libvips-linux-x64": {
641
- "version": "1.2.3",
642
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.3.tgz",
643
- "integrity": "sha512-3JU7LmR85K6bBiRzSUc/Ff9JBVIFVvq6bomKE0e63UXGeRw2HPVEjoJke1Yx+iU4rL7/7kUjES4dZ/81Qjhyxg==",
644
- "cpu": [
645
- "x64"
646
- ],
647
- "license": "LGPL-3.0-or-later",
648
- "optional": true,
649
- "os": [
650
- "linux"
651
- ],
652
- "funding": {
653
- "url": "https://opencollective.com/libvips"
654
- }
655
- },
656
- "node_modules/@img/sharp-libvips-linuxmusl-arm64": {
657
- "version": "1.2.3",
658
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.3.tgz",
659
- "integrity": "sha512-F9q83RZ8yaCwENw1GieztSfj5msz7GGykG/BA+MOUefvER69K/ubgFHNeSyUu64amHIYKGDs4sRCMzXVj8sEyw==",
660
- "cpu": [
661
- "arm64"
662
- ],
663
- "license": "LGPL-3.0-or-later",
664
- "optional": true,
665
- "os": [
666
- "linux"
667
- ],
668
- "funding": {
669
- "url": "https://opencollective.com/libvips"
670
- }
671
- },
672
- "node_modules/@img/sharp-libvips-linuxmusl-x64": {
673
- "version": "1.2.3",
674
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.3.tgz",
675
- "integrity": "sha512-U5PUY5jbc45ANM6tSJpsgqmBF/VsL6LnxJmIf11kB7J5DctHgqm0SkuXzVWtIY90GnJxKnC/JT251TDnk1fu/g==",
676
- "cpu": [
677
- "x64"
678
- ],
679
- "license": "LGPL-3.0-or-later",
680
- "optional": true,
681
- "os": [
682
- "linux"
683
- ],
684
- "funding": {
685
- "url": "https://opencollective.com/libvips"
686
- }
687
- },
688
- "node_modules/@img/sharp-linux-arm": {
689
- "version": "0.34.4",
690
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.4.tgz",
691
- "integrity": "sha512-Xyam4mlqM0KkTHYVSuc6wXRmM7LGN0P12li03jAnZ3EJWZqj83+hi8Y9UxZUbxsgsK1qOEwg7O0Bc0LjqQVtxA==",
692
- "cpu": [
693
- "arm"
694
- ],
695
- "license": "Apache-2.0",
696
- "optional": true,
697
- "os": [
698
- "linux"
699
- ],
700
- "engines": {
701
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
702
- },
703
- "funding": {
704
- "url": "https://opencollective.com/libvips"
705
- },
706
- "optionalDependencies": {
707
- "@img/sharp-libvips-linux-arm": "1.2.3"
708
- }
709
- },
710
- "node_modules/@img/sharp-linux-arm64": {
711
- "version": "0.34.4",
712
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.4.tgz",
713
- "integrity": "sha512-YXU1F/mN/Wu786tl72CyJjP/Ngl8mGHN1hST4BGl+hiW5jhCnV2uRVTNOcaYPs73NeT/H8Upm3y9582JVuZHrQ==",
714
- "cpu": [
715
- "arm64"
716
- ],
717
- "license": "Apache-2.0",
718
- "optional": true,
719
- "os": [
720
- "linux"
721
- ],
722
- "engines": {
723
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
724
- },
725
- "funding": {
726
- "url": "https://opencollective.com/libvips"
727
- },
728
- "optionalDependencies": {
729
- "@img/sharp-libvips-linux-arm64": "1.2.3"
730
- }
731
- },
732
- "node_modules/@img/sharp-linux-ppc64": {
733
- "version": "0.34.4",
734
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.4.tgz",
735
- "integrity": "sha512-F4PDtF4Cy8L8hXA2p3TO6s4aDt93v+LKmpcYFLAVdkkD3hSxZzee0rh6/+94FpAynsuMpLX5h+LRsSG3rIciUQ==",
736
- "cpu": [
737
- "ppc64"
738
- ],
739
- "license": "Apache-2.0",
740
- "optional": true,
741
- "os": [
742
- "linux"
743
- ],
744
- "engines": {
745
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
746
- },
747
- "funding": {
748
- "url": "https://opencollective.com/libvips"
749
- },
750
- "optionalDependencies": {
751
- "@img/sharp-libvips-linux-ppc64": "1.2.3"
752
- }
753
- },
754
- "node_modules/@img/sharp-linux-s390x": {
755
- "version": "0.34.4",
756
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.4.tgz",
757
- "integrity": "sha512-qVrZKE9Bsnzy+myf7lFKvng6bQzhNUAYcVORq2P7bDlvmF6u2sCmK2KyEQEBdYk+u3T01pVsPrkj943T1aJAsw==",
758
- "cpu": [
759
- "s390x"
760
- ],
761
- "license": "Apache-2.0",
762
- "optional": true,
763
- "os": [
764
- "linux"
765
- ],
766
- "engines": {
767
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
768
- },
769
- "funding": {
770
- "url": "https://opencollective.com/libvips"
771
- },
772
- "optionalDependencies": {
773
- "@img/sharp-libvips-linux-s390x": "1.2.3"
774
- }
775
- },
776
- "node_modules/@img/sharp-linux-x64": {
777
- "version": "0.34.4",
778
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.4.tgz",
779
- "integrity": "sha512-ZfGtcp2xS51iG79c6Vhw9CWqQC8l2Ot8dygxoDoIQPTat/Ov3qAa8qpxSrtAEAJW+UjTXc4yxCjNfxm4h6Xm2A==",
780
- "cpu": [
781
- "x64"
782
- ],
783
- "license": "Apache-2.0",
784
- "optional": true,
785
- "os": [
786
- "linux"
787
- ],
788
- "engines": {
789
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
790
- },
791
- "funding": {
792
- "url": "https://opencollective.com/libvips"
793
- },
794
- "optionalDependencies": {
795
- "@img/sharp-libvips-linux-x64": "1.2.3"
796
- }
797
- },
798
- "node_modules/@img/sharp-linuxmusl-arm64": {
799
- "version": "0.34.4",
800
- "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.4.tgz",
801
- "integrity": "sha512-8hDVvW9eu4yHWnjaOOR8kHVrew1iIX+MUgwxSuH2XyYeNRtLUe4VNioSqbNkB7ZYQJj9rUTT4PyRscyk2PXFKA==",
802
- "cpu": [
803
- "arm64"
804
- ],
805
- "license": "Apache-2.0",
806
- "optional": true,
807
- "os": [
808
- "linux"
809
- ],
810
- "engines": {
811
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
812
- },
813
- "funding": {
814
- "url": "https://opencollective.com/libvips"
815
- },
816
- "optionalDependencies": {
817
- "@img/sharp-libvips-linuxmusl-arm64": "1.2.3"
818
- }
819
- },
820
- "node_modules/@img/sharp-linuxmusl-x64": {
821
- "version": "0.34.4",
822
- "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.4.tgz",
823
- "integrity": "sha512-lU0aA5L8QTlfKjpDCEFOZsTYGn3AEiO6db8W5aQDxj0nQkVrZWmN3ZP9sYKWJdtq3PWPhUNlqehWyXpYDcI9Sg==",
824
- "cpu": [
825
- "x64"
826
- ],
827
- "license": "Apache-2.0",
828
- "optional": true,
829
- "os": [
830
- "linux"
831
- ],
832
- "engines": {
833
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
834
- },
835
- "funding": {
836
- "url": "https://opencollective.com/libvips"
837
- },
838
- "optionalDependencies": {
839
- "@img/sharp-libvips-linuxmusl-x64": "1.2.3"
840
- }
841
- },
842
- "node_modules/@img/sharp-wasm32": {
843
- "version": "0.34.4",
844
- "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.4.tgz",
845
- "integrity": "sha512-33QL6ZO/qpRyG7woB/HUALz28WnTMI2W1jgX3Nu2bypqLIKx/QKMILLJzJjI+SIbvXdG9fUnmrxR7vbi1sTBeA==",
846
- "cpu": [
847
- "wasm32"
848
- ],
849
- "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
850
- "optional": true,
851
- "dependencies": {
852
- "@emnapi/runtime": "^1.5.0"
853
- },
854
- "engines": {
855
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
856
- },
857
- "funding": {
858
- "url": "https://opencollective.com/libvips"
859
- }
860
- },
861
- "node_modules/@img/sharp-win32-arm64": {
862
- "version": "0.34.4",
863
- "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.4.tgz",
864
- "integrity": "sha512-2Q250do/5WXTwxW3zjsEuMSv5sUU4Tq9VThWKlU2EYLm4MB7ZeMwF+SFJutldYODXF6jzc6YEOC+VfX0SZQPqA==",
865
- "cpu": [
866
- "arm64"
867
- ],
868
- "license": "Apache-2.0 AND LGPL-3.0-or-later",
869
- "optional": true,
870
- "os": [
871
- "win32"
872
- ],
873
- "engines": {
874
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
875
- },
876
- "funding": {
877
- "url": "https://opencollective.com/libvips"
878
- }
879
- },
880
- "node_modules/@img/sharp-win32-ia32": {
881
- "version": "0.34.4",
882
- "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.4.tgz",
883
- "integrity": "sha512-3ZeLue5V82dT92CNL6rsal6I2weKw1cYu+rGKm8fOCCtJTR2gYeUfY3FqUnIJsMUPIH68oS5jmZ0NiJ508YpEw==",
884
- "cpu": [
885
- "ia32"
886
- ],
887
- "license": "Apache-2.0 AND LGPL-3.0-or-later",
888
- "optional": true,
889
- "os": [
890
- "win32"
891
- ],
892
- "engines": {
893
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
894
- },
895
- "funding": {
896
- "url": "https://opencollective.com/libvips"
897
- }
898
- },
899
- "node_modules/@img/sharp-win32-x64": {
900
- "version": "0.34.4",
901
- "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.4.tgz",
902
- "integrity": "sha512-xIyj4wpYs8J18sVN3mSQjwrw7fKUqRw+Z5rnHNCy5fYTxigBz81u5mOMPmFumwjcn8+ld1ppptMBCLic1nz6ig==",
903
- "cpu": [
904
- "x64"
905
- ],
906
- "license": "Apache-2.0 AND LGPL-3.0-or-later",
907
- "optional": true,
908
- "os": [
909
- "win32"
910
- ],
911
- "engines": {
912
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
913
- },
914
- "funding": {
915
- "url": "https://opencollective.com/libvips"
916
- }
917
- },
918
- "node_modules/@isaacs/fs-minipass": {
919
- "version": "4.0.1",
920
- "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz",
921
- "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==",
922
- "license": "ISC",
923
- "dependencies": {
924
- "minipass": "^7.0.4"
925
- },
926
- "engines": {
927
- "node": ">=18.0.0"
928
- }
929
- },
930
- "node_modules/@protobufjs/aspromise": {
931
- "version": "1.1.2",
932
- "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
933
- "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==",
934
- "license": "BSD-3-Clause"
935
- },
936
- "node_modules/@protobufjs/base64": {
937
- "version": "1.1.2",
938
- "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
939
- "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==",
940
- "license": "BSD-3-Clause"
941
- },
942
- "node_modules/@protobufjs/codegen": {
943
- "version": "2.0.4",
944
- "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
945
- "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==",
946
- "license": "BSD-3-Clause"
947
- },
948
- "node_modules/@protobufjs/eventemitter": {
949
- "version": "1.1.0",
950
- "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
951
- "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==",
952
- "license": "BSD-3-Clause"
953
- },
954
- "node_modules/@protobufjs/fetch": {
955
- "version": "1.1.0",
956
- "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
957
- "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
958
- "license": "BSD-3-Clause",
959
- "dependencies": {
960
- "@protobufjs/aspromise": "^1.1.1",
961
- "@protobufjs/inquire": "^1.1.0"
962
- }
963
- },
964
- "node_modules/@protobufjs/float": {
965
- "version": "1.0.2",
966
- "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
967
- "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==",
968
- "license": "BSD-3-Clause"
969
- },
970
- "node_modules/@protobufjs/inquire": {
971
- "version": "1.1.0",
972
- "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
973
- "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==",
974
- "license": "BSD-3-Clause"
975
- },
976
- "node_modules/@protobufjs/path": {
977
- "version": "1.1.2",
978
- "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
979
- "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==",
980
- "license": "BSD-3-Clause"
981
- },
982
- "node_modules/@protobufjs/pool": {
983
- "version": "1.1.0",
984
- "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
985
- "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==",
986
- "license": "BSD-3-Clause"
987
- },
988
- "node_modules/@protobufjs/utf8": {
989
- "version": "1.1.0",
990
- "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
991
- "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==",
992
- "license": "BSD-3-Clause"
993
- },
994
- "node_modules/@types/node": {
995
- "version": "24.6.2",
996
- "resolved": "https://registry.npmjs.org/@types/node/-/node-24.6.2.tgz",
997
- "integrity": "sha512-d2L25Y4j+W3ZlNAeMKcy7yDsK425ibcAOO2t7aPTz6gNMH0z2GThtwENCDc0d/Pw9wgyRqE5Px1wkV7naz8ang==",
998
- "license": "MIT",
999
- "dependencies": {
1000
- "undici-types": "~7.13.0"
1001
- }
1002
- },
1003
- "node_modules/boolean": {
1004
- "version": "3.2.0",
1005
- "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz",
1006
- "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==",
1007
- "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
1008
- "license": "MIT"
1009
- },
1010
- "node_modules/chownr": {
1011
- "version": "3.0.0",
1012
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz",
1013
- "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==",
1014
- "license": "BlueOak-1.0.0",
1015
- "engines": {
1016
- "node": ">=18"
1017
- }
1018
- },
1019
- "node_modules/define-data-property": {
1020
- "version": "1.1.4",
1021
- "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
1022
- "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
1023
- "license": "MIT",
1024
- "dependencies": {
1025
- "es-define-property": "^1.0.0",
1026
- "es-errors": "^1.3.0",
1027
- "gopd": "^1.0.1"
1028
- },
1029
- "engines": {
1030
- "node": ">= 0.4"
1031
- },
1032
- "funding": {
1033
- "url": "https://github.com/sponsors/ljharb"
1034
- }
1035
- },
1036
- "node_modules/define-properties": {
1037
- "version": "1.2.1",
1038
- "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
1039
- "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
1040
- "license": "MIT",
1041
- "dependencies": {
1042
- "define-data-property": "^1.0.1",
1043
- "has-property-descriptors": "^1.0.0",
1044
- "object-keys": "^1.1.1"
1045
- },
1046
- "engines": {
1047
- "node": ">= 0.4"
1048
- },
1049
- "funding": {
1050
- "url": "https://github.com/sponsors/ljharb"
1051
- }
1052
- },
1053
- "node_modules/detect-libc": {
1054
- "version": "2.1.1",
1055
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.1.tgz",
1056
- "integrity": "sha512-ecqj/sy1jcK1uWrwpR67UhYrIFQ+5WlGxth34WquCbamhFA6hkkwiu37o6J5xCHdo1oixJRfVRw+ywV+Hq/0Aw==",
1057
- "license": "Apache-2.0",
1058
- "engines": {
1059
- "node": ">=8"
1060
- }
1061
- },
1062
- "node_modules/detect-node": {
1063
- "version": "2.1.0",
1064
- "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",
1065
- "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==",
1066
- "license": "MIT"
1067
- },
1068
- "node_modules/es-define-property": {
1069
- "version": "1.0.1",
1070
- "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
1071
- "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
1072
- "license": "MIT",
1073
- "engines": {
1074
- "node": ">= 0.4"
1075
- }
1076
- },
1077
- "node_modules/es-errors": {
1078
- "version": "1.3.0",
1079
- "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
1080
- "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
1081
- "license": "MIT",
1082
- "engines": {
1083
- "node": ">= 0.4"
1084
- }
1085
- },
1086
- "node_modules/es6-error": {
1087
- "version": "4.1.1",
1088
- "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",
1089
- "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
1090
- "license": "MIT"
1091
- },
1092
- "node_modules/esbuild": {
1093
- "version": "0.25.10",
1094
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.10.tgz",
1095
- "integrity": "sha512-9RiGKvCwaqxO2owP61uQ4BgNborAQskMR6QusfWzQqv7AZOg5oGehdY2pRJMTKuwxd1IDBP4rSbI5lHzU7SMsQ==",
1096
- "dev": true,
1097
- "hasInstallScript": true,
1098
- "license": "MIT",
1099
- "bin": {
1100
- "esbuild": "bin/esbuild"
1101
- },
1102
- "engines": {
1103
- "node": ">=18"
1104
- },
1105
- "optionalDependencies": {
1106
- "@esbuild/aix-ppc64": "0.25.10",
1107
- "@esbuild/android-arm": "0.25.10",
1108
- "@esbuild/android-arm64": "0.25.10",
1109
- "@esbuild/android-x64": "0.25.10",
1110
- "@esbuild/darwin-arm64": "0.25.10",
1111
- "@esbuild/darwin-x64": "0.25.10",
1112
- "@esbuild/freebsd-arm64": "0.25.10",
1113
- "@esbuild/freebsd-x64": "0.25.10",
1114
- "@esbuild/linux-arm": "0.25.10",
1115
- "@esbuild/linux-arm64": "0.25.10",
1116
- "@esbuild/linux-ia32": "0.25.10",
1117
- "@esbuild/linux-loong64": "0.25.10",
1118
- "@esbuild/linux-mips64el": "0.25.10",
1119
- "@esbuild/linux-ppc64": "0.25.10",
1120
- "@esbuild/linux-riscv64": "0.25.10",
1121
- "@esbuild/linux-s390x": "0.25.10",
1122
- "@esbuild/linux-x64": "0.25.10",
1123
- "@esbuild/netbsd-arm64": "0.25.10",
1124
- "@esbuild/netbsd-x64": "0.25.10",
1125
- "@esbuild/openbsd-arm64": "0.25.10",
1126
- "@esbuild/openbsd-x64": "0.25.10",
1127
- "@esbuild/openharmony-arm64": "0.25.10",
1128
- "@esbuild/sunos-x64": "0.25.10",
1129
- "@esbuild/win32-arm64": "0.25.10",
1130
- "@esbuild/win32-ia32": "0.25.10",
1131
- "@esbuild/win32-x64": "0.25.10"
1132
- }
1133
- },
1134
- "node_modules/escape-string-regexp": {
1135
- "version": "4.0.0",
1136
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
1137
- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
1138
- "license": "MIT",
1139
- "engines": {
1140
- "node": ">=10"
1141
- },
1142
- "funding": {
1143
- "url": "https://github.com/sponsors/sindresorhus"
1144
- }
1145
- },
1146
- "node_modules/flatbuffers": {
1147
- "version": "25.9.23",
1148
- "resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-25.9.23.tgz",
1149
- "integrity": "sha512-MI1qs7Lo4Syw0EOzUl0xjs2lsoeqFku44KpngfIduHBYvzm8h2+7K8YMQh1JtVVVrUvhLpNwqVi4DERegUJhPQ==",
1150
- "license": "Apache-2.0"
1151
- },
1152
- "node_modules/fsevents": {
1153
- "version": "2.3.3",
1154
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
1155
- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
1156
- "dev": true,
1157
- "hasInstallScript": true,
1158
- "license": "MIT",
1159
- "optional": true,
1160
- "os": [
1161
- "darwin"
1162
- ],
1163
- "engines": {
1164
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
1165
- }
1166
- },
1167
- "node_modules/get-tsconfig": {
1168
- "version": "4.10.1",
1169
- "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz",
1170
- "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==",
1171
- "dev": true,
1172
- "license": "MIT",
1173
- "dependencies": {
1174
- "resolve-pkg-maps": "^1.0.0"
1175
- },
1176
- "funding": {
1177
- "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
1178
- }
1179
- },
1180
- "node_modules/global-agent": {
1181
- "version": "3.0.0",
1182
- "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz",
1183
- "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==",
1184
- "license": "BSD-3-Clause",
1185
- "dependencies": {
1186
- "boolean": "^3.0.1",
1187
- "es6-error": "^4.1.1",
1188
- "matcher": "^3.0.0",
1189
- "roarr": "^2.15.3",
1190
- "semver": "^7.3.2",
1191
- "serialize-error": "^7.0.1"
1192
- },
1193
- "engines": {
1194
- "node": ">=10.0"
1195
- }
1196
- },
1197
- "node_modules/globalthis": {
1198
- "version": "1.0.4",
1199
- "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",
1200
- "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==",
1201
- "license": "MIT",
1202
- "dependencies": {
1203
- "define-properties": "^1.2.1",
1204
- "gopd": "^1.0.1"
1205
- },
1206
- "engines": {
1207
- "node": ">= 0.4"
1208
- },
1209
- "funding": {
1210
- "url": "https://github.com/sponsors/ljharb"
1211
- }
1212
- },
1213
- "node_modules/gopd": {
1214
- "version": "1.2.0",
1215
- "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
1216
- "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
1217
- "license": "MIT",
1218
- "engines": {
1219
- "node": ">= 0.4"
1220
- },
1221
- "funding": {
1222
- "url": "https://github.com/sponsors/ljharb"
1223
- }
1224
- },
1225
- "node_modules/guid-typescript": {
1226
- "version": "1.0.9",
1227
- "resolved": "https://registry.npmjs.org/guid-typescript/-/guid-typescript-1.0.9.tgz",
1228
- "integrity": "sha512-Y8T4vYhEfwJOTbouREvG+3XDsjr8E3kIr7uf+JZ0BYloFsttiHU0WfvANVsR7TxNUJa/WpCnw/Ino/p+DeBhBQ==",
1229
- "license": "ISC"
1230
- },
1231
- "node_modules/has-property-descriptors": {
1232
- "version": "1.0.2",
1233
- "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
1234
- "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
1235
- "license": "MIT",
1236
- "dependencies": {
1237
- "es-define-property": "^1.0.0"
1238
- },
1239
- "funding": {
1240
- "url": "https://github.com/sponsors/ljharb"
1241
- }
1242
- },
1243
- "node_modules/json-stringify-safe": {
1244
- "version": "5.0.1",
1245
- "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
1246
- "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
1247
- "license": "ISC"
1248
- },
1249
- "node_modules/long": {
1250
- "version": "5.3.2",
1251
- "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz",
1252
- "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==",
1253
- "license": "Apache-2.0"
1254
- },
1255
- "node_modules/matcher": {
1256
- "version": "3.0.0",
1257
- "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
1258
- "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==",
1259
- "license": "MIT",
1260
- "dependencies": {
1261
- "escape-string-regexp": "^4.0.0"
1262
- },
1263
- "engines": {
1264
- "node": ">=10"
1265
- }
1266
- },
1267
- "node_modules/minipass": {
1268
- "version": "7.1.2",
1269
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
1270
- "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
1271
- "license": "ISC",
1272
- "engines": {
1273
- "node": ">=16 || 14 >=14.17"
1274
- }
1275
- },
1276
- "node_modules/minizlib": {
1277
- "version": "3.1.0",
1278
- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz",
1279
- "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==",
1280
- "license": "MIT",
1281
- "dependencies": {
1282
- "minipass": "^7.1.2"
1283
- },
1284
- "engines": {
1285
- "node": ">= 18"
1286
- }
1287
- },
1288
- "node_modules/object-keys": {
1289
- "version": "1.1.1",
1290
- "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
1291
- "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
1292
- "license": "MIT",
1293
- "engines": {
1294
- "node": ">= 0.4"
1295
- }
1296
- },
1297
- "node_modules/onnxruntime-common": {
1298
- "version": "1.21.0",
1299
- "resolved": "https://registry.npmjs.org/onnxruntime-common/-/onnxruntime-common-1.21.0.tgz",
1300
- "integrity": "sha512-Q632iLLrtCAVOTO65dh2+mNbQir/QNTVBG3h/QdZBpns7mZ0RYbLRBgGABPbpU9351AgYy7SJf1WaeVwMrBFPQ==",
1301
- "license": "MIT"
1302
- },
1303
- "node_modules/onnxruntime-node": {
1304
- "version": "1.21.0",
1305
- "resolved": "https://registry.npmjs.org/onnxruntime-node/-/onnxruntime-node-1.21.0.tgz",
1306
- "integrity": "sha512-NeaCX6WW2L8cRCSqy3bInlo5ojjQqu2fD3D+9W5qb5irwxhEyWKXeH2vZ8W9r6VxaMPUan+4/7NDwZMtouZxEw==",
1307
- "hasInstallScript": true,
1308
- "license": "MIT",
1309
- "os": [
1310
- "win32",
1311
- "darwin",
1312
- "linux"
1313
- ],
1314
- "dependencies": {
1315
- "global-agent": "^3.0.0",
1316
- "onnxruntime-common": "1.21.0",
1317
- "tar": "^7.0.1"
1318
- }
1319
- },
1320
- "node_modules/onnxruntime-web": {
1321
- "version": "1.22.0-dev.20250409-89f8206ba4",
1322
- "resolved": "https://registry.npmjs.org/onnxruntime-web/-/onnxruntime-web-1.22.0-dev.20250409-89f8206ba4.tgz",
1323
- "integrity": "sha512-0uS76OPgH0hWCPrFKlL8kYVV7ckM7t/36HfbgoFw6Nd0CZVVbQC4PkrR8mBX8LtNUFZO25IQBqV2Hx2ho3FlbQ==",
1324
- "license": "MIT",
1325
- "dependencies": {
1326
- "flatbuffers": "^25.1.24",
1327
- "guid-typescript": "^1.0.9",
1328
- "long": "^5.2.3",
1329
- "onnxruntime-common": "1.22.0-dev.20250409-89f8206ba4",
1330
- "platform": "^1.3.6",
1331
- "protobufjs": "^7.2.4"
1332
- }
1333
- },
1334
- "node_modules/onnxruntime-web/node_modules/onnxruntime-common": {
1335
- "version": "1.22.0-dev.20250409-89f8206ba4",
1336
- "resolved": "https://registry.npmjs.org/onnxruntime-common/-/onnxruntime-common-1.22.0-dev.20250409-89f8206ba4.tgz",
1337
- "integrity": "sha512-vDJMkfCfb0b1A836rgHj+ORuZf4B4+cc2bASQtpeoJLueuFc5DuYwjIZUBrSvx/fO5IrLjLz+oTrB3pcGlhovQ==",
1338
- "license": "MIT"
1339
- },
1340
- "node_modules/platform": {
1341
- "version": "1.3.6",
1342
- "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
1343
- "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==",
1344
- "license": "MIT"
1345
- },
1346
- "node_modules/protobufjs": {
1347
- "version": "7.5.4",
1348
- "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz",
1349
- "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==",
1350
- "hasInstallScript": true,
1351
- "license": "BSD-3-Clause",
1352
- "dependencies": {
1353
- "@protobufjs/aspromise": "^1.1.2",
1354
- "@protobufjs/base64": "^1.1.2",
1355
- "@protobufjs/codegen": "^2.0.4",
1356
- "@protobufjs/eventemitter": "^1.1.0",
1357
- "@protobufjs/fetch": "^1.1.0",
1358
- "@protobufjs/float": "^1.0.2",
1359
- "@protobufjs/inquire": "^1.1.0",
1360
- "@protobufjs/path": "^1.1.2",
1361
- "@protobufjs/pool": "^1.1.0",
1362
- "@protobufjs/utf8": "^1.1.0",
1363
- "@types/node": ">=13.7.0",
1364
- "long": "^5.0.0"
1365
- },
1366
- "engines": {
1367
- "node": ">=12.0.0"
1368
- }
1369
- },
1370
- "node_modules/resolve-pkg-maps": {
1371
- "version": "1.0.0",
1372
- "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
1373
- "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
1374
- "dev": true,
1375
- "license": "MIT",
1376
- "funding": {
1377
- "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
1378
- }
1379
- },
1380
- "node_modules/roarr": {
1381
- "version": "2.15.4",
1382
- "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz",
1383
- "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==",
1384
- "license": "BSD-3-Clause",
1385
- "dependencies": {
1386
- "boolean": "^3.0.1",
1387
- "detect-node": "^2.0.4",
1388
- "globalthis": "^1.0.1",
1389
- "json-stringify-safe": "^5.0.1",
1390
- "semver-compare": "^1.0.0",
1391
- "sprintf-js": "^1.1.2"
1392
- },
1393
- "engines": {
1394
- "node": ">=8.0"
1395
- }
1396
- },
1397
- "node_modules/semver": {
1398
- "version": "7.7.2",
1399
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
1400
- "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
1401
- "license": "ISC",
1402
- "bin": {
1403
- "semver": "bin/semver.js"
1404
- },
1405
- "engines": {
1406
- "node": ">=10"
1407
- }
1408
- },
1409
- "node_modules/semver-compare": {
1410
- "version": "1.0.0",
1411
- "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
1412
- "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==",
1413
- "license": "MIT"
1414
- },
1415
- "node_modules/serialize-error": {
1416
- "version": "7.0.1",
1417
- "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz",
1418
- "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==",
1419
- "license": "MIT",
1420
- "dependencies": {
1421
- "type-fest": "^0.13.1"
1422
- },
1423
- "engines": {
1424
- "node": ">=10"
1425
- },
1426
- "funding": {
1427
- "url": "https://github.com/sponsors/sindresorhus"
1428
- }
1429
- },
1430
- "node_modules/sharp": {
1431
- "version": "0.34.4",
1432
- "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.4.tgz",
1433
- "integrity": "sha512-FUH39xp3SBPnxWvd5iib1X8XY7J0K0X7d93sie9CJg2PO8/7gmg89Nve6OjItK53/MlAushNNxteBYfM6DEuoA==",
1434
- "hasInstallScript": true,
1435
- "license": "Apache-2.0",
1436
- "dependencies": {
1437
- "@img/colour": "^1.0.0",
1438
- "detect-libc": "^2.1.0",
1439
- "semver": "^7.7.2"
1440
- },
1441
- "engines": {
1442
- "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
1443
- },
1444
- "funding": {
1445
- "url": "https://opencollective.com/libvips"
1446
- },
1447
- "optionalDependencies": {
1448
- "@img/sharp-darwin-arm64": "0.34.4",
1449
- "@img/sharp-darwin-x64": "0.34.4",
1450
- "@img/sharp-libvips-darwin-arm64": "1.2.3",
1451
- "@img/sharp-libvips-darwin-x64": "1.2.3",
1452
- "@img/sharp-libvips-linux-arm": "1.2.3",
1453
- "@img/sharp-libvips-linux-arm64": "1.2.3",
1454
- "@img/sharp-libvips-linux-ppc64": "1.2.3",
1455
- "@img/sharp-libvips-linux-s390x": "1.2.3",
1456
- "@img/sharp-libvips-linux-x64": "1.2.3",
1457
- "@img/sharp-libvips-linuxmusl-arm64": "1.2.3",
1458
- "@img/sharp-libvips-linuxmusl-x64": "1.2.3",
1459
- "@img/sharp-linux-arm": "0.34.4",
1460
- "@img/sharp-linux-arm64": "0.34.4",
1461
- "@img/sharp-linux-ppc64": "0.34.4",
1462
- "@img/sharp-linux-s390x": "0.34.4",
1463
- "@img/sharp-linux-x64": "0.34.4",
1464
- "@img/sharp-linuxmusl-arm64": "0.34.4",
1465
- "@img/sharp-linuxmusl-x64": "0.34.4",
1466
- "@img/sharp-wasm32": "0.34.4",
1467
- "@img/sharp-win32-arm64": "0.34.4",
1468
- "@img/sharp-win32-ia32": "0.34.4",
1469
- "@img/sharp-win32-x64": "0.34.4"
1470
- }
1471
- },
1472
- "node_modules/sprintf-js": {
1473
- "version": "1.1.3",
1474
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",
1475
- "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==",
1476
- "license": "BSD-3-Clause"
1477
- },
1478
- "node_modules/tar": {
1479
- "version": "7.5.1",
1480
- "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.1.tgz",
1481
- "integrity": "sha512-nlGpxf+hv0v7GkWBK2V9spgactGOp0qvfWRxUMjqHyzrt3SgwE48DIv/FhqPHJYLHpgW1opq3nERbz5Anq7n1g==",
1482
- "license": "ISC",
1483
- "dependencies": {
1484
- "@isaacs/fs-minipass": "^4.0.0",
1485
- "chownr": "^3.0.0",
1486
- "minipass": "^7.1.2",
1487
- "minizlib": "^3.1.0",
1488
- "yallist": "^5.0.0"
1489
- },
1490
- "engines": {
1491
- "node": ">=18"
1492
- }
1493
- },
1494
- "node_modules/tslib": {
1495
- "version": "2.8.1",
1496
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
1497
- "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
1498
- "license": "0BSD",
1499
- "optional": true
1500
- },
1501
- "node_modules/tsx": {
1502
- "version": "4.20.6",
1503
- "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.6.tgz",
1504
- "integrity": "sha512-ytQKuwgmrrkDTFP4LjR0ToE2nqgy886GpvRSpU0JAnrdBYppuY5rLkRUYPU1yCryb24SsKBTL/hlDQAEFVwtZg==",
1505
- "dev": true,
1506
- "license": "MIT",
1507
- "dependencies": {
1508
- "esbuild": "~0.25.0",
1509
- "get-tsconfig": "^4.7.5"
1510
- },
1511
- "bin": {
1512
- "tsx": "dist/cli.mjs"
1513
- },
1514
- "engines": {
1515
- "node": ">=18.0.0"
1516
- },
1517
- "optionalDependencies": {
1518
- "fsevents": "~2.3.3"
1519
- }
1520
- },
1521
- "node_modules/type-fest": {
1522
- "version": "0.13.1",
1523
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
1524
- "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
1525
- "license": "(MIT OR CC0-1.0)",
1526
- "engines": {
1527
- "node": ">=10"
1528
- },
1529
- "funding": {
1530
- "url": "https://github.com/sponsors/sindresorhus"
1531
- }
1532
- },
1533
- "node_modules/typescript": {
1534
- "version": "5.9.3",
1535
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
1536
- "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
1537
- "dev": true,
1538
- "license": "Apache-2.0",
1539
- "bin": {
1540
- "tsc": "bin/tsc",
1541
- "tsserver": "bin/tsserver"
1542
- },
1543
- "engines": {
1544
- "node": ">=14.17"
1545
- }
1546
- },
1547
- "node_modules/undici-types": {
1548
- "version": "7.13.0",
1549
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.13.0.tgz",
1550
- "integrity": "sha512-Ov2Rr9Sx+fRgagJ5AX0qvItZG/JKKoBRAVITs1zk7IqZGTJUwgUr7qoYBpWwakpWilTZFM98rG/AFRocu10iIQ==",
1551
- "license": "MIT"
1552
- },
1553
- "node_modules/yallist": {
1554
- "version": "5.0.0",
1555
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz",
1556
- "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==",
1557
- "license": "BlueOak-1.0.0",
1558
- "engines": {
1559
- "node": ">=18"
1560
- }
1561
- }
1562
- }
1563
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bench-node/package.json DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "name": "bench-node",
3
- "private": true,
4
- "type": "module",
5
- "version": "0.0.2",
6
- "scripts": {
7
- "bench": "tsx src/index.ts",
8
- "build": "tsc -p tsconfig.json"
9
- },
10
- "dependencies": {
11
- "@huggingface/transformers": "^3.7.4"
12
- },
13
- "devDependencies": {
14
- "tsx": "^4.20.6",
15
- "typescript": "^5.9.3"
16
- }
17
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bench-web/README.md DELETED
@@ -1,50 +0,0 @@
1
- # bench-web (warm/cold, repeats, p50/p90, CPU/GPU)
2
-
3
- ## Setup
4
- ```bash
5
- cd bench-web
6
- npm i
7
- npm run bench:install # Install Playwright browsers for CLI mode
8
- ```
9
-
10
- ## Run (Interactive UI)
11
- ```bash
12
- npm run dev
13
- # open http://localhost:5173
14
- ```
15
-
16
- ## Run (CLI with Playwright)
17
- ```bash
18
- npm run bench:cli -- <model> <task> --mode <warm|cold> --repeats <n> --device <wasm|webgpu> [--browser <chromium|firefox|webkit>] [--headed true]
19
- ```
20
-
21
- ### Examples
22
- ```bash
23
- # WASM (CPU) benchmark
24
- npm run bench:cli -- Xenova/all-MiniLM-L6-v2 feature-extraction --mode warm --repeats 3 --device wasm
25
-
26
- # WebGPU benchmark
27
- npm run bench:cli -- Xenova/all-MiniLM-L6-v2 feature-extraction --mode warm --repeats 3 --device webgpu
28
-
29
- # Cold mode
30
- npm run bench:cli -- Xenova/all-MiniLM-L6-v2 feature-extraction --mode cold --repeats 3 --device wasm
31
-
32
- # With Firefox
33
- npm run bench:cli -- Xenova/all-MiniLM-L6-v2 feature-extraction --mode warm --repeats 3 --device wasm --browser firefox
34
-
35
- # Headed mode (for debugging)
36
- npm run bench:cli -- Xenova/all-MiniLM-L6-v2 feature-extraction --mode warm --repeats 3 --device wasm --headed true
37
- ```
38
-
39
- ## How it works
40
- ### Interactive UI
41
- - **warm**: prefetch once (non-measured) β†’ auto-reload β†’ measure `repeats` times with disk caches populated.
42
- - **cold**: clear Cache Storage & IndexedDB, then measure in the same tab
43
- - Note: only the 1st iteration is strictly cold within a single page session.
44
-
45
- ### CLI Mode
46
- - Starts a Vite dev server and launches headless browser via Playwright
47
- - **warm**: prefetch once (non-measured) β†’ measure `repeats` times with caches populated (no page reload)
48
- - **cold**: clears all caches before each run
49
- - **device**: `wasm` for CPU, `webgpu` for GPU acceleration
50
- - Supports Chromium, Firefox, and WebKit browsers
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bench-web/src/main.ts DELETED
@@ -1,179 +0,0 @@
1
- import { pipeline } from "@huggingface/transformers";
2
-
3
- const btn = document.getElementById("run") as HTMLButtonElement;
4
- const out = document.getElementById("out") as HTMLPreElement;
5
- const statusEl = document.getElementById("status") as HTMLSpanElement;
6
- const modelEl = document.getElementById("model") as HTMLInputElement;
7
- const taskEl = document.getElementById("task") as HTMLSelectElement;
8
- const modeEl = document.getElementById("mode") as HTMLSelectElement;
9
- const repeatsEl = document.getElementById("repeats") as HTMLInputElement;
10
- const deviceEl = document.getElementById("device") as HTMLSelectElement;
11
-
12
- function now() { return performance.now(); }
13
- function percentile(values: number[], q: number) {
14
- const a = [...values].sort((x, y) => x - y);
15
- const i = (a.length - 1) * q;
16
- const i0 = Math.floor(i), i1 = Math.ceil(i);
17
- return i0 === i1 ? a[i0] : a[i0] + (a[i1] - a[i0]) * (i - i0);
18
- }
19
- async function clearCaches({ clearSession = false }: { clearSession?: boolean } = {}) {
20
- try {
21
- const keys = await caches.keys();
22
- await Promise.all(keys.map((k) => caches.delete(k)));
23
- } catch { }
24
- try {
25
- const anyIDB: any = indexedDB as any;
26
- if (typeof anyIDB.databases === "function") {
27
- const dbs = await anyIDB.databases();
28
- await Promise.all(dbs.map((d: any) => d?.name ? indexedDB.deleteDatabase(d.name) : undefined));
29
- } else {
30
- indexedDB.deleteDatabase("transformers-cache");
31
- indexedDB.deleteDatabase("model-cache");
32
- }
33
- } catch { }
34
- try {
35
- localStorage.clear();
36
- if (clearSession) sessionStorage.clear();
37
- } catch { }
38
- }
39
- async function benchOnce(modelId: string, task: string, device: string, dtype?: string, batchSize: number = 1) {
40
- const t0 = now();
41
- const options: any = { device };
42
- if (dtype) options.dtype = dtype;
43
- const pipe = await pipeline(task, modelId, options);
44
- const t1 = now();
45
-
46
- // Prepare batch input
47
- const inputs = Array(batchSize).fill("The quick brown fox jumps over the lazy dog.");
48
-
49
- const t2 = now();
50
- await pipe(inputs);
51
- const t3 = now();
52
-
53
- // Run additional inferences to measure subsequent performance
54
- const subsequentTimes: number[] = [];
55
- for (let i = 0; i < 3; i++) {
56
- const t4 = now();
57
- await pipe(inputs);
58
- const t5 = now();
59
- subsequentTimes.push(+(t5 - t4).toFixed(1));
60
- }
61
-
62
- return {
63
- load_ms: +(t1 - t0).toFixed(1),
64
- first_infer_ms: +(t3 - t2).toFixed(1),
65
- subsequent_infer_ms: subsequentTimes
66
- };
67
- }
68
- async function runMany(modelId: string, task: string, repeats: number, device: string, dtype?: string, batchSize: number = 1) {
69
- const loads: number[] = [];
70
- const firsts: number[] = [];
71
- const subsequents: number[] = [];
72
- for (let i = 0; i < repeats; i++) {
73
- const r = await benchOnce(modelId, task, device, dtype, batchSize);
74
- loads.push(r.load_ms);
75
- firsts.push(r.first_infer_ms);
76
- subsequents.push(...r.subsequent_infer_ms);
77
- }
78
- return {
79
- load_ms: { p50: +percentile(loads, 0.5).toFixed(1), p90: +percentile(loads, 0.9).toFixed(1), raw: loads },
80
- first_infer_ms: { p50: +percentile(firsts, 0.5).toFixed(1), p90: +percentile(firsts, 0.9).toFixed(1), raw: firsts },
81
- subsequent_infer_ms: { p50: +percentile(subsequents, 0.5).toFixed(1), p90: +percentile(subsequents, 0.9).toFixed(1), raw: subsequents },
82
- };
83
- }
84
- async function runCold(modelId: string, task: string, repeats: number, device: string, dtype?: string, batchSize: number = 1) {
85
- statusEl.textContent = "clearing caches (cold)...";
86
- await clearCaches();
87
- statusEl.textContent = "running (cold)...";
88
- const metrics = await runMany(modelId, task, repeats, device, dtype, batchSize);
89
- const result: any = {
90
- platform: "browser",
91
- runtime: navigator.userAgent,
92
- mode: "cold",
93
- repeats,
94
- batchSize,
95
- model: modelId,
96
- task,
97
- device,
98
- metrics,
99
- notes: "Only the 1st iteration is strictly cold in a single page session."
100
- };
101
- if (dtype) result.dtype = dtype;
102
- return result;
103
- }
104
- async function runWarmDirect(modelId: string, task: string, repeats: number, device: string, dtype?: string, batchSize: number = 1) {
105
- statusEl.textContent = "prefetching (warmup) ...";
106
- const options: any = { device };
107
- if (dtype) options.dtype = dtype;
108
- const p = await pipeline(task, modelId, options);
109
- const warmupInputs = Array(batchSize).fill("warmup");
110
- await p(warmupInputs);
111
- statusEl.textContent = "running (warm)...";
112
- const metrics = await runMany(modelId, task, repeats, device, dtype, batchSize);
113
- const result: any = {
114
- platform: "browser",
115
- runtime: navigator.userAgent,
116
- mode: "warm",
117
- repeats,
118
- batchSize,
119
- model: modelId,
120
- task,
121
- device,
122
- metrics
123
- };
124
- if (dtype) result.dtype = dtype;
125
- return result;
126
- }
127
- async function runWarm(modelId: string, task: string, repeats: number, device: string, dtype?: string, batchSize: number = 1) {
128
- const flag = sessionStorage.getItem("__warm_ready__");
129
- if (!flag) {
130
- statusEl.textContent = "prefetching (warmup) ...";
131
- const options: any = { device };
132
- if (dtype) options.dtype = dtype;
133
- const p = await pipeline(task, modelId, options);
134
- const warmupInputs = Array(batchSize).fill("warmup");
135
- await p(warmupInputs);
136
- sessionStorage.setItem("__warm_ready__", JSON.stringify({ modelId, task, repeats, device, dtype, batchSize }));
137
- location.reload();
138
- return null;
139
- } else {
140
- sessionStorage.removeItem("__warm_ready__");
141
- return await runWarmDirect(modelId, task, repeats, device, dtype, batchSize);
142
- }
143
- }
144
- async function run() {
145
- const modelId = modelEl.value.trim() || "Xenova/distilbert-base-uncased";
146
- const task = taskEl.value;
147
- const mode = modeEl.value as "warm" | "cold";
148
- const repeats = Math.max(1, parseInt(repeatsEl.value || "3", 10));
149
- const device = deviceEl.value;
150
- out.textContent = "{}";
151
- if (mode === "cold") {
152
- const r = await runCold(modelId, task, repeats, device);
153
- if (r) { out.textContent = JSON.stringify(r, null, 2); statusEl.textContent = "done (cold)"; }
154
- } else {
155
- const r = await runWarm(modelId, task, repeats, device);
156
- console.log("warm run result:", r);
157
- if (r) { out.textContent = JSON.stringify(r, null, 2); statusEl.textContent = "done (warm)"; }
158
- }
159
- }
160
- (async () => {
161
- const flag = sessionStorage.getItem("__warm_ready__");
162
- if (flag) {
163
- try { await run(); } catch (e) { console.error(e); }
164
- }
165
- })();
166
- btn.addEventListener("click", () => {
167
- run().catch((e) => { out.textContent = String(e); statusEl.textContent = "error"; console.error(e); });
168
- });
169
-
170
- // Expose for CLI use
171
- (window as any).runBenchmarkCLI = async function (params: { modelId: string, task: string, mode: string, repeats: number, device: string, dtype?: string, batchSize?: number }) {
172
- const batchSize = params.batchSize || 1;
173
- if (params.mode === "cold") {
174
- return await runCold(params.modelId, params.task, params.repeats, params.device, params.dtype, batchSize);
175
- } else {
176
- // For warm, use the direct function that skips reload logic
177
- return await runWarmDirect(params.modelId, params.task, params.repeats, params.device, params.dtype, batchSize);
178
- }
179
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bench-web/tsconfig.json DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "ESNext",
5
- "moduleResolution": "Bundler",
6
- "lib": [
7
- "ES2022",
8
- "DOM"
9
- ],
10
- "strict": true,
11
- "skipLibCheck": true,
12
- "noEmit": true
13
- },
14
- "include": [
15
- "src"
16
- ]
17
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bench/README.md ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Transformers.js Benchmark
2
+
3
+ Unified benchmarking tool for testing Transformers.js performance on both Node.js and browser environments.
4
+
5
+ ## Features
6
+
7
+ - **Unified CLI**: Single entrypoint for both Node and Web benchmarks
8
+ - **Shared Core**: Common benchmarking logic reduces code duplication
9
+ - **Platform Flexibility**: Test on Node.js runtime or browsers (via Playwright)
10
+ - **Comprehensive Metrics**: Measures load time, first inference, and subsequent inferences (p50, p90, raw)
11
+ - **Warm/Cold Modes**: Test with or without caching
12
+ - **Batch Support**: Run inference with configurable batch sizes
13
+ - **Device Options**: Choose between WebGPU, WASM, or default CPU
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install
19
+ npm run bench:install # Install Playwright browsers for web benchmarks
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ ### Node.js Benchmark
25
+
26
+ ```bash
27
+ # Default (Node platform)
28
+ npm run bench -- <model> <task> [options]
29
+
30
+ # Explicit Node platform
31
+ npm run bench -- <model> <task> --platform=node [options]
32
+
33
+ # Direct script
34
+ npm run bench:node -- <model> <task> [options]
35
+ ```
36
+
37
+ **Example:**
38
+ ```bash
39
+ npm run bench -- Xenova/all-MiniLM-L6-v2 feature-extraction --mode=warm --repeats=3 --batch-size=1
40
+ ```
41
+
42
+ ### Web (Browser) Benchmark
43
+
44
+ ```bash
45
+ # Via unified CLI
46
+ npm run bench -- <model> <task> --platform=web [options]
47
+
48
+ # Direct script
49
+ npm run bench:web -- <model> <task> [options]
50
+ ```
51
+
52
+ **Example:**
53
+ ```bash
54
+ npm run bench -- Xenova/distilbert-base-uncased feature-extraction \
55
+ --platform=web \
56
+ --mode=warm \
57
+ --device=webgpu \
58
+ --repeats=3 \
59
+ --batch-size=1
60
+ ```
61
+
62
+ ### Development Server (Browser UI)
63
+
64
+ ```bash
65
+ npm run dev
66
+ ```
67
+
68
+ Then open http://localhost:5173 to use the interactive web interface.
69
+
70
+ ## Options
71
+
72
+ | Option | Description | Default | Values |
73
+ |--------|-------------|---------|--------|
74
+ | `--platform` | Runtime platform | `node` | `node`, `web` |
75
+ | `--mode` | Cache mode | `warm` | `warm`, `cold` |
76
+ | `--repeats` | Number of test iterations | `3` | Any positive integer |
77
+ | `--batch-size` | Batch size for inference | `1` | Any positive integer |
78
+ | `--dtype` | Data type precision | auto | `fp32`, `fp16`, `q8`, `q4`, etc. |
79
+ | `--device` | Device for web (browser only) | `webgpu` | `webgpu`, `wasm` |
80
+ | `--browser` | Browser type (web only) | `chromium` | `chromium`, `firefox`, `webkit` |
81
+ | `--headed` | Run browser in headed mode | `false` | `true`, `false` |
82
+
83
+ ## Architecture
84
+
85
+ ```
86
+ bench/
87
+ β”œβ”€β”€ src/
88
+ β”‚ β”œβ”€β”€ core/ # Shared benchmarking logic
89
+ β”‚ β”‚ β”œβ”€β”€ args.ts # CLI argument parsing
90
+ β”‚ β”‚ β”œβ”€β”€ metrics.ts # Statistics & aggregation
91
+ β”‚ β”‚ └── types.ts # TypeScript interfaces
92
+ β”‚ β”œβ”€β”€ node/ # Node.js implementation
93
+ β”‚ β”‚ β”œβ”€β”€ benchmark.ts # Node benchmark runner
94
+ β”‚ β”‚ β”œβ”€β”€ cache.ts # Filesystem cache management
95
+ β”‚ β”‚ └── index.ts # Node CLI entry
96
+ β”‚ β”œβ”€β”€ web/ # Browser implementation
97
+ β”‚ β”‚ β”œβ”€β”€ benchmark.ts # Browser benchmark runner
98
+ β”‚ β”‚ β”œβ”€β”€ cache.ts # Browser cache management (IndexedDB, etc.)
99
+ β”‚ β”‚ β”œβ”€β”€ cli.ts # Playwright CLI for headless browser
100
+ β”‚ β”‚ └── main.ts # Browser UI
101
+ β”‚ └── index.ts # Unified CLI router
102
+ β”œβ”€β”€ index.html # Browser UI HTML
103
+ β”œβ”€β”€ package.json
104
+ β”œβ”€β”€ tsconfig.json
105
+ └── vite.config.ts
106
+ ```
107
+
108
+ ## Output Format
109
+
110
+ All benchmarks output JSON with the following structure:
111
+
112
+ ```json
113
+ {
114
+ "platform": "node" | "browser",
115
+ "runtime": "<runtime version or user agent>",
116
+ "model": "<model-id>",
117
+ "task": "<task-name>",
118
+ "mode": "warm" | "cold",
119
+ "repeats": 3,
120
+ "batchSize": 1,
121
+ "dtype": "<dtype>",
122
+ "metrics": {
123
+ "load_ms": {
124
+ "p50": 70.5,
125
+ "p90": 75.2,
126
+ "raw": [67.3, 70.5, 75.2]
127
+ },
128
+ "first_infer_ms": {
129
+ "p50": 3.2,
130
+ "p90": 4.1,
131
+ "raw": [3.1, 3.2, 4.1]
132
+ },
133
+ "subsequent_infer_ms": {
134
+ "p50": 2.1,
135
+ "p90": 2.8,
136
+ "raw": [2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8]
137
+ }
138
+ }
139
+ }
140
+ ```
141
+
142
+ ## Examples
143
+
144
+ ### Compare Node vs Browser
145
+
146
+ ```bash
147
+ # Node
148
+ npm run bench -- Xenova/distilbert-base-uncased feature-extraction --repeats=5
149
+
150
+ # Browser (WebGPU)
151
+ npm run bench -- Xenova/distilbert-base-uncased feature-extraction \
152
+ --platform=web --device=webgpu --repeats=5
153
+
154
+ # Browser (WASM)
155
+ npm run bench -- Xenova/distilbert-base-uncased feature-extraction \
156
+ --platform=web --device=wasm --repeats=5
157
+ ```
158
+
159
+ ### Test Different Quantizations
160
+
161
+ ```bash
162
+ npm run bench -- Xenova/distilbert-base-uncased feature-extraction --dtype=fp32
163
+ npm run bench -- Xenova/distilbert-base-uncased feature-extraction --dtype=fp16
164
+ npm run bench -- Xenova/distilbert-base-uncased feature-extraction --dtype=q8
165
+ ```
166
+
167
+ ### Batch Processing
168
+
169
+ ```bash
170
+ npm run bench -- Xenova/distilbert-base-uncased feature-extraction --batch-size=8 --repeats=3
171
+ ```
172
+
173
+ ## Development
174
+
175
+ ```bash
176
+ # Build TypeScript
177
+ npm run build
178
+
179
+ # Run dev server for browser UI
180
+ npm run dev
181
+
182
+ # Preview built browser app
183
+ npm run preview
184
+ ```
{bench-web β†’ bench}/index.html RENAMED
@@ -43,6 +43,6 @@
43
  <span id="status"></span>
44
  </div>
45
  <code><pre id="out">{}</pre></code>
46
- <script type="module" src="/src/main.ts"></script>
47
  </body>
48
  </html>
 
43
  <span id="status"></span>
44
  </div>
45
  <code><pre id="out">{}</pre></code>
46
+ <script type="module" src="/src/web/main.ts"></script>
47
  </body>
48
  </html>
{bench-web β†’ bench}/package-lock.json RENAMED
@@ -1,11 +1,11 @@
1
  {
2
- "name": "bench-web",
3
  "version": "0.0.2",
4
  "lockfileVersion": 3,
5
  "requires": true,
6
  "packages": {
7
  "": {
8
- "name": "bench-web",
9
  "version": "0.0.2",
10
  "dependencies": {
11
  "@huggingface/transformers": "^3.7.4"
@@ -480,9 +480,9 @@
480
  }
481
  },
482
  "node_modules/@huggingface/transformers": {
483
- "version": "3.7.4",
484
- "resolved": "https://registry.npmjs.org/@huggingface/transformers/-/transformers-3.7.4.tgz",
485
- "integrity": "sha512-nMnLM26EX6SlGoIvljsLCbAWwltGJZEaTe/7ZtuVQP4S9Zo0swJ5zZAdZw9c8xGeEZ5Rfs23FSflsV64o4X2MQ==",
486
  "license": "Apache-2.0",
487
  "dependencies": {
488
  "@huggingface/jinja": "^0.5.1",
@@ -1011,9 +1011,9 @@
1011
  "license": "BSD-3-Clause"
1012
  },
1013
  "node_modules/@rollup/rollup-android-arm-eabi": {
1014
- "version": "4.52.3",
1015
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.3.tgz",
1016
- "integrity": "sha512-h6cqHGZ6VdnwliFG1NXvMPTy/9PS3h8oLh7ImwR+kl+oYnQizgjxsONmmPSb2C66RksfkfIxEVtDSEcJiO0tqw==",
1017
  "cpu": [
1018
  "arm"
1019
  ],
@@ -1025,9 +1025,9 @@
1025
  ]
1026
  },
1027
  "node_modules/@rollup/rollup-android-arm64": {
1028
- "version": "4.52.3",
1029
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.3.tgz",
1030
- "integrity": "sha512-wd+u7SLT/u6knklV/ifG7gr5Qy4GUbH2hMWcDauPFJzmCZUAJ8L2bTkVXC2niOIxp8lk3iH/QX8kSrUxVZrOVw==",
1031
  "cpu": [
1032
  "arm64"
1033
  ],
@@ -1039,9 +1039,9 @@
1039
  ]
1040
  },
1041
  "node_modules/@rollup/rollup-darwin-arm64": {
1042
- "version": "4.52.3",
1043
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.3.tgz",
1044
- "integrity": "sha512-lj9ViATR1SsqycwFkJCtYfQTheBdvlWJqzqxwc9f2qrcVrQaF/gCuBRTiTolkRWS6KvNxSk4KHZWG7tDktLgjg==",
1045
  "cpu": [
1046
  "arm64"
1047
  ],
@@ -1053,9 +1053,9 @@
1053
  ]
1054
  },
1055
  "node_modules/@rollup/rollup-darwin-x64": {
1056
- "version": "4.52.3",
1057
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.3.tgz",
1058
- "integrity": "sha512-+Dyo7O1KUmIsbzx1l+4V4tvEVnVQqMOIYtrxK7ncLSknl1xnMHLgn7gddJVrYPNZfEB8CIi3hK8gq8bDhb3h5A==",
1059
  "cpu": [
1060
  "x64"
1061
  ],
@@ -1067,9 +1067,9 @@
1067
  ]
1068
  },
1069
  "node_modules/@rollup/rollup-freebsd-arm64": {
1070
- "version": "4.52.3",
1071
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.3.tgz",
1072
- "integrity": "sha512-u9Xg2FavYbD30g3DSfNhxgNrxhi6xVG4Y6i9Ur1C7xUuGDW3banRbXj+qgnIrwRN4KeJ396jchwy9bCIzbyBEQ==",
1073
  "cpu": [
1074
  "arm64"
1075
  ],
@@ -1081,9 +1081,9 @@
1081
  ]
1082
  },
1083
  "node_modules/@rollup/rollup-freebsd-x64": {
1084
- "version": "4.52.3",
1085
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.3.tgz",
1086
- "integrity": "sha512-5M8kyi/OX96wtD5qJR89a/3x5x8x5inXBZO04JWhkQb2JWavOWfjgkdvUqibGJeNNaz1/Z1PPza5/tAPXICI6A==",
1087
  "cpu": [
1088
  "x64"
1089
  ],
@@ -1095,9 +1095,9 @@
1095
  ]
1096
  },
1097
  "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
1098
- "version": "4.52.3",
1099
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.3.tgz",
1100
- "integrity": "sha512-IoerZJ4l1wRMopEHRKOO16e04iXRDyZFZnNZKrWeNquh5d6bucjezgd+OxG03mOMTnS1x7hilzb3uURPkJ0OfA==",
1101
  "cpu": [
1102
  "arm"
1103
  ],
@@ -1109,9 +1109,9 @@
1109
  ]
1110
  },
1111
  "node_modules/@rollup/rollup-linux-arm-musleabihf": {
1112
- "version": "4.52.3",
1113
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.3.tgz",
1114
- "integrity": "sha512-ZYdtqgHTDfvrJHSh3W22TvjWxwOgc3ThK/XjgcNGP2DIwFIPeAPNsQxrJO5XqleSlgDux2VAoWQ5iJrtaC1TbA==",
1115
  "cpu": [
1116
  "arm"
1117
  ],
@@ -1123,9 +1123,9 @@
1123
  ]
1124
  },
1125
  "node_modules/@rollup/rollup-linux-arm64-gnu": {
1126
- "version": "4.52.3",
1127
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.3.tgz",
1128
- "integrity": "sha512-NcViG7A0YtuFDA6xWSgmFb6iPFzHlf5vcqb2p0lGEbT+gjrEEz8nC/EeDHvx6mnGXnGCC1SeVV+8u+smj0CeGQ==",
1129
  "cpu": [
1130
  "arm64"
1131
  ],
@@ -1137,9 +1137,9 @@
1137
  ]
1138
  },
1139
  "node_modules/@rollup/rollup-linux-arm64-musl": {
1140
- "version": "4.52.3",
1141
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.3.tgz",
1142
- "integrity": "sha512-d3pY7LWno6SYNXRm6Ebsq0DJGoiLXTb83AIPCXl9fmtIQs/rXoS8SJxxUNtFbJ5MiOvs+7y34np77+9l4nfFMw==",
1143
  "cpu": [
1144
  "arm64"
1145
  ],
@@ -1151,9 +1151,9 @@
1151
  ]
1152
  },
1153
  "node_modules/@rollup/rollup-linux-loong64-gnu": {
1154
- "version": "4.52.3",
1155
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.3.tgz",
1156
- "integrity": "sha512-3y5GA0JkBuirLqmjwAKwB0keDlI6JfGYduMlJD/Rl7fvb4Ni8iKdQs1eiunMZJhwDWdCvrcqXRY++VEBbvk6Eg==",
1157
  "cpu": [
1158
  "loong64"
1159
  ],
@@ -1165,9 +1165,9 @@
1165
  ]
1166
  },
1167
  "node_modules/@rollup/rollup-linux-ppc64-gnu": {
1168
- "version": "4.52.3",
1169
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.3.tgz",
1170
- "integrity": "sha512-AUUH65a0p3Q0Yfm5oD2KVgzTKgwPyp9DSXc3UA7DtxhEb/WSPfbG4wqXeSN62OG5gSo18em4xv6dbfcUGXcagw==",
1171
  "cpu": [
1172
  "ppc64"
1173
  ],
@@ -1179,9 +1179,9 @@
1179
  ]
1180
  },
1181
  "node_modules/@rollup/rollup-linux-riscv64-gnu": {
1182
- "version": "4.52.3",
1183
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.3.tgz",
1184
- "integrity": "sha512-1makPhFFVBqZE+XFg3Dkq+IkQ7JvmUrwwqaYBL2CE+ZpxPaqkGaiWFEWVGyvTwZace6WLJHwjVh/+CXbKDGPmg==",
1185
  "cpu": [
1186
  "riscv64"
1187
  ],
@@ -1193,9 +1193,9 @@
1193
  ]
1194
  },
1195
  "node_modules/@rollup/rollup-linux-riscv64-musl": {
1196
- "version": "4.52.3",
1197
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.3.tgz",
1198
- "integrity": "sha512-OOFJa28dxfl8kLOPMUOQBCO6z3X2SAfzIE276fwT52uXDWUS178KWq0pL7d6p1kz7pkzA0yQwtqL0dEPoVcRWg==",
1199
  "cpu": [
1200
  "riscv64"
1201
  ],
@@ -1207,9 +1207,9 @@
1207
  ]
1208
  },
1209
  "node_modules/@rollup/rollup-linux-s390x-gnu": {
1210
- "version": "4.52.3",
1211
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.3.tgz",
1212
- "integrity": "sha512-jMdsML2VI5l+V7cKfZx3ak+SLlJ8fKvLJ0Eoa4b9/vCUrzXKgoKxvHqvJ/mkWhFiyp88nCkM5S2v6nIwRtPcgg==",
1213
  "cpu": [
1214
  "s390x"
1215
  ],
@@ -1221,9 +1221,9 @@
1221
  ]
1222
  },
1223
  "node_modules/@rollup/rollup-linux-x64-gnu": {
1224
- "version": "4.52.3",
1225
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.3.tgz",
1226
- "integrity": "sha512-tPgGd6bY2M2LJTA1uGq8fkSPK8ZLYjDjY+ZLK9WHncCnfIz29LIXIqUgzCR0hIefzy6Hpbe8Th5WOSwTM8E7LA==",
1227
  "cpu": [
1228
  "x64"
1229
  ],
@@ -1235,9 +1235,9 @@
1235
  ]
1236
  },
1237
  "node_modules/@rollup/rollup-linux-x64-musl": {
1238
- "version": "4.52.3",
1239
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.3.tgz",
1240
- "integrity": "sha512-BCFkJjgk+WFzP+tcSMXq77ymAPIxsX9lFJWs+2JzuZTLtksJ2o5hvgTdIcZ5+oKzUDMwI0PfWzRBYAydAHF2Mw==",
1241
  "cpu": [
1242
  "x64"
1243
  ],
@@ -1249,9 +1249,9 @@
1249
  ]
1250
  },
1251
  "node_modules/@rollup/rollup-openharmony-arm64": {
1252
- "version": "4.52.3",
1253
- "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.3.tgz",
1254
- "integrity": "sha512-KTD/EqjZF3yvRaWUJdD1cW+IQBk4fbQaHYJUmP8N4XoKFZilVL8cobFSTDnjTtxWJQ3JYaMgF4nObY/+nYkumA==",
1255
  "cpu": [
1256
  "arm64"
1257
  ],
@@ -1263,9 +1263,9 @@
1263
  ]
1264
  },
1265
  "node_modules/@rollup/rollup-win32-arm64-msvc": {
1266
- "version": "4.52.3",
1267
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.3.tgz",
1268
- "integrity": "sha512-+zteHZdoUYLkyYKObGHieibUFLbttX2r+58l27XZauq0tcWYYuKUwY2wjeCN9oK1Um2YgH2ibd6cnX/wFD7DuA==",
1269
  "cpu": [
1270
  "arm64"
1271
  ],
@@ -1277,9 +1277,9 @@
1277
  ]
1278
  },
1279
  "node_modules/@rollup/rollup-win32-ia32-msvc": {
1280
- "version": "4.52.3",
1281
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.3.tgz",
1282
- "integrity": "sha512-of1iHkTQSo3kr6dTIRX6t81uj/c/b15HXVsPcEElN5sS859qHrOepM5p9G41Hah+CTqSh2r8Bm56dL2z9UQQ7g==",
1283
  "cpu": [
1284
  "ia32"
1285
  ],
@@ -1291,9 +1291,9 @@
1291
  ]
1292
  },
1293
  "node_modules/@rollup/rollup-win32-x64-gnu": {
1294
- "version": "4.52.3",
1295
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.3.tgz",
1296
- "integrity": "sha512-s0hybmlHb56mWVZQj8ra9048/WZTPLILKxcvcq+8awSZmyiSUZjjem1AhU3Tf4ZKpYhK4mg36HtHDOe8QJS5PQ==",
1297
  "cpu": [
1298
  "x64"
1299
  ],
@@ -1305,9 +1305,9 @@
1305
  ]
1306
  },
1307
  "node_modules/@rollup/rollup-win32-x64-msvc": {
1308
- "version": "4.52.3",
1309
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.3.tgz",
1310
- "integrity": "sha512-zGIbEVVXVtauFgl3MRwGWEN36P5ZGenHRMgNw88X5wEhEBpq0XrMEZwOn07+ICrwM17XO5xfMZqh0OldCH5VTA==",
1311
  "cpu": [
1312
  "x64"
1313
  ],
@@ -1326,12 +1326,12 @@
1326
  "license": "MIT"
1327
  },
1328
  "node_modules/@types/node": {
1329
- "version": "24.6.2",
1330
- "resolved": "https://registry.npmjs.org/@types/node/-/node-24.6.2.tgz",
1331
- "integrity": "sha512-d2L25Y4j+W3ZlNAeMKcy7yDsK425ibcAOO2t7aPTz6gNMH0z2GThtwENCDc0d/Pw9wgyRqE5Px1wkV7naz8ang==",
1332
  "license": "MIT",
1333
  "dependencies": {
1334
- "undici-types": "~7.13.0"
1335
  }
1336
  },
1337
  "node_modules/boolean": {
@@ -1385,9 +1385,9 @@
1385
  }
1386
  },
1387
  "node_modules/detect-libc": {
1388
- "version": "2.1.1",
1389
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.1.tgz",
1390
- "integrity": "sha512-ecqj/sy1jcK1uWrwpR67UhYrIFQ+5WlGxth34WquCbamhFA6hkkwiu37o6J5xCHdo1oixJRfVRw+ywV+Hq/0Aw==",
1391
  "license": "Apache-2.0",
1392
  "engines": {
1393
  "node": ">=8"
@@ -1502,9 +1502,9 @@
1502
  "license": "Apache-2.0"
1503
  },
1504
  "node_modules/fsevents": {
1505
- "version": "2.3.3",
1506
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
1507
- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
1508
  "dev": true,
1509
  "hasInstallScript": true,
1510
  "license": "MIT",
@@ -1766,21 +1766,6 @@
1766
  "node": ">=18"
1767
  }
1768
  },
1769
- "node_modules/playwright/node_modules/fsevents": {
1770
- "version": "2.3.2",
1771
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
1772
- "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
1773
- "dev": true,
1774
- "hasInstallScript": true,
1775
- "license": "MIT",
1776
- "optional": true,
1777
- "os": [
1778
- "darwin"
1779
- ],
1780
- "engines": {
1781
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
1782
- }
1783
- },
1784
  "node_modules/postcss": {
1785
  "version": "8.5.6",
1786
  "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
@@ -1862,9 +1847,9 @@
1862
  }
1863
  },
1864
  "node_modules/rollup": {
1865
- "version": "4.52.3",
1866
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.3.tgz",
1867
- "integrity": "sha512-RIDh866U8agLgiIcdpB+COKnlCreHJLfIhWC3LVflku5YHfpnsIKigRZeFfMfCc4dVcqNVfQQ5gO/afOck064A==",
1868
  "dev": true,
1869
  "license": "MIT",
1870
  "dependencies": {
@@ -1878,28 +1863,28 @@
1878
  "npm": ">=8.0.0"
1879
  },
1880
  "optionalDependencies": {
1881
- "@rollup/rollup-android-arm-eabi": "4.52.3",
1882
- "@rollup/rollup-android-arm64": "4.52.3",
1883
- "@rollup/rollup-darwin-arm64": "4.52.3",
1884
- "@rollup/rollup-darwin-x64": "4.52.3",
1885
- "@rollup/rollup-freebsd-arm64": "4.52.3",
1886
- "@rollup/rollup-freebsd-x64": "4.52.3",
1887
- "@rollup/rollup-linux-arm-gnueabihf": "4.52.3",
1888
- "@rollup/rollup-linux-arm-musleabihf": "4.52.3",
1889
- "@rollup/rollup-linux-arm64-gnu": "4.52.3",
1890
- "@rollup/rollup-linux-arm64-musl": "4.52.3",
1891
- "@rollup/rollup-linux-loong64-gnu": "4.52.3",
1892
- "@rollup/rollup-linux-ppc64-gnu": "4.52.3",
1893
- "@rollup/rollup-linux-riscv64-gnu": "4.52.3",
1894
- "@rollup/rollup-linux-riscv64-musl": "4.52.3",
1895
- "@rollup/rollup-linux-s390x-gnu": "4.52.3",
1896
- "@rollup/rollup-linux-x64-gnu": "4.52.3",
1897
- "@rollup/rollup-linux-x64-musl": "4.52.3",
1898
- "@rollup/rollup-openharmony-arm64": "4.52.3",
1899
- "@rollup/rollup-win32-arm64-msvc": "4.52.3",
1900
- "@rollup/rollup-win32-ia32-msvc": "4.52.3",
1901
- "@rollup/rollup-win32-x64-gnu": "4.52.3",
1902
- "@rollup/rollup-win32-x64-msvc": "4.52.3",
1903
  "fsevents": "~2.3.2"
1904
  }
1905
  },
@@ -2054,6 +2039,21 @@
2054
  "fsevents": "~2.3.3"
2055
  }
2056
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2057
  "node_modules/type-fest": {
2058
  "version": "0.13.1",
2059
  "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
@@ -2081,15 +2081,15 @@
2081
  }
2082
  },
2083
  "node_modules/undici-types": {
2084
- "version": "7.13.0",
2085
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.13.0.tgz",
2086
- "integrity": "sha512-Ov2Rr9Sx+fRgagJ5AX0qvItZG/JKKoBRAVITs1zk7IqZGTJUwgUr7qoYBpWwakpWilTZFM98rG/AFRocu10iIQ==",
2087
  "license": "MIT"
2088
  },
2089
  "node_modules/vite": {
2090
- "version": "7.1.7",
2091
- "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.7.tgz",
2092
- "integrity": "sha512-VbA8ScMvAISJNJVbRDTJdCwqQoAareR/wutevKanhR2/1EkoXVZVkkORaYm/tNVCjP/UDTKtcw3bAkwOUdedmA==",
2093
  "dev": true,
2094
  "license": "MIT",
2095
  "dependencies": {
@@ -2161,6 +2161,21 @@
2161
  }
2162
  }
2163
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2164
  "node_modules/yallist": {
2165
  "version": "5.0.0",
2166
  "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz",
 
1
  {
2
+ "name": "bench",
3
  "version": "0.0.2",
4
  "lockfileVersion": 3,
5
  "requires": true,
6
  "packages": {
7
  "": {
8
+ "name": "bench",
9
  "version": "0.0.2",
10
  "dependencies": {
11
  "@huggingface/transformers": "^3.7.4"
 
480
  }
481
  },
482
  "node_modules/@huggingface/transformers": {
483
+ "version": "3.7.5",
484
+ "resolved": "https://registry.npmjs.org/@huggingface/transformers/-/transformers-3.7.5.tgz",
485
+ "integrity": "sha512-5jvrIwHyRXfOKVaGKYvUZM6ZjJKQXWeKzIOdKBE5pdzPSNzTwBNx5NdWcGElf4Ddv7Dl2mWsvJh+G5RnCUxMmA==",
486
  "license": "Apache-2.0",
487
  "dependencies": {
488
  "@huggingface/jinja": "^0.5.1",
 
1011
  "license": "BSD-3-Clause"
1012
  },
1013
  "node_modules/@rollup/rollup-android-arm-eabi": {
1014
+ "version": "4.52.4",
1015
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.4.tgz",
1016
+ "integrity": "sha512-BTm2qKNnWIQ5auf4deoetINJm2JzvihvGb9R6K/ETwKLql/Bb3Eg2H1FBp1gUb4YGbydMA3jcmQTR73q7J+GAA==",
1017
  "cpu": [
1018
  "arm"
1019
  ],
 
1025
  ]
1026
  },
1027
  "node_modules/@rollup/rollup-android-arm64": {
1028
+ "version": "4.52.4",
1029
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.4.tgz",
1030
+ "integrity": "sha512-P9LDQiC5vpgGFgz7GSM6dKPCiqR3XYN1WwJKA4/BUVDjHpYsf3iBEmVz62uyq20NGYbiGPR5cNHI7T1HqxNs2w==",
1031
  "cpu": [
1032
  "arm64"
1033
  ],
 
1039
  ]
1040
  },
1041
  "node_modules/@rollup/rollup-darwin-arm64": {
1042
+ "version": "4.52.4",
1043
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.4.tgz",
1044
+ "integrity": "sha512-QRWSW+bVccAvZF6cbNZBJwAehmvG9NwfWHwMy4GbWi/BQIA/laTIktebT2ipVjNncqE6GLPxOok5hsECgAxGZg==",
1045
  "cpu": [
1046
  "arm64"
1047
  ],
 
1053
  ]
1054
  },
1055
  "node_modules/@rollup/rollup-darwin-x64": {
1056
+ "version": "4.52.4",
1057
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.4.tgz",
1058
+ "integrity": "sha512-hZgP05pResAkRJxL1b+7yxCnXPGsXU0fG9Yfd6dUaoGk+FhdPKCJ5L1Sumyxn8kvw8Qi5PvQ8ulenUbRjzeCTw==",
1059
  "cpu": [
1060
  "x64"
1061
  ],
 
1067
  ]
1068
  },
1069
  "node_modules/@rollup/rollup-freebsd-arm64": {
1070
+ "version": "4.52.4",
1071
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.4.tgz",
1072
+ "integrity": "sha512-xmc30VshuBNUd58Xk4TKAEcRZHaXlV+tCxIXELiE9sQuK3kG8ZFgSPi57UBJt8/ogfhAF5Oz4ZSUBN77weM+mQ==",
1073
  "cpu": [
1074
  "arm64"
1075
  ],
 
1081
  ]
1082
  },
1083
  "node_modules/@rollup/rollup-freebsd-x64": {
1084
+ "version": "4.52.4",
1085
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.4.tgz",
1086
+ "integrity": "sha512-WdSLpZFjOEqNZGmHflxyifolwAiZmDQzuOzIq9L27ButpCVpD7KzTRtEG1I0wMPFyiyUdOO+4t8GvrnBLQSwpw==",
1087
  "cpu": [
1088
  "x64"
1089
  ],
 
1095
  ]
1096
  },
1097
  "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
1098
+ "version": "4.52.4",
1099
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.4.tgz",
1100
+ "integrity": "sha512-xRiOu9Of1FZ4SxVbB0iEDXc4ddIcjCv2aj03dmW8UrZIW7aIQ9jVJdLBIhxBI+MaTnGAKyvMwPwQnoOEvP7FgQ==",
1101
  "cpu": [
1102
  "arm"
1103
  ],
 
1109
  ]
1110
  },
1111
  "node_modules/@rollup/rollup-linux-arm-musleabihf": {
1112
+ "version": "4.52.4",
1113
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.4.tgz",
1114
+ "integrity": "sha512-FbhM2p9TJAmEIEhIgzR4soUcsW49e9veAQCziwbR+XWB2zqJ12b4i/+hel9yLiD8pLncDH4fKIPIbt5238341Q==",
1115
  "cpu": [
1116
  "arm"
1117
  ],
 
1123
  ]
1124
  },
1125
  "node_modules/@rollup/rollup-linux-arm64-gnu": {
1126
+ "version": "4.52.4",
1127
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.4.tgz",
1128
+ "integrity": "sha512-4n4gVwhPHR9q/g8lKCyz0yuaD0MvDf7dV4f9tHt0C73Mp8h38UCtSCSE6R9iBlTbXlmA8CjpsZoujhszefqueg==",
1129
  "cpu": [
1130
  "arm64"
1131
  ],
 
1137
  ]
1138
  },
1139
  "node_modules/@rollup/rollup-linux-arm64-musl": {
1140
+ "version": "4.52.4",
1141
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.4.tgz",
1142
+ "integrity": "sha512-u0n17nGA0nvi/11gcZKsjkLj1QIpAuPFQbR48Subo7SmZJnGxDpspyw2kbpuoQnyK+9pwf3pAoEXerJs/8Mi9g==",
1143
  "cpu": [
1144
  "arm64"
1145
  ],
 
1151
  ]
1152
  },
1153
  "node_modules/@rollup/rollup-linux-loong64-gnu": {
1154
+ "version": "4.52.4",
1155
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.4.tgz",
1156
+ "integrity": "sha512-0G2c2lpYtbTuXo8KEJkDkClE/+/2AFPdPAbmaHoE870foRFs4pBrDehilMcrSScrN/fB/1HTaWO4bqw+ewBzMQ==",
1157
  "cpu": [
1158
  "loong64"
1159
  ],
 
1165
  ]
1166
  },
1167
  "node_modules/@rollup/rollup-linux-ppc64-gnu": {
1168
+ "version": "4.52.4",
1169
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.4.tgz",
1170
+ "integrity": "sha512-teSACug1GyZHmPDv14VNbvZFX779UqWTsd7KtTM9JIZRDI5NUwYSIS30kzI8m06gOPB//jtpqlhmraQ68b5X2g==",
1171
  "cpu": [
1172
  "ppc64"
1173
  ],
 
1179
  ]
1180
  },
1181
  "node_modules/@rollup/rollup-linux-riscv64-gnu": {
1182
+ "version": "4.52.4",
1183
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.4.tgz",
1184
+ "integrity": "sha512-/MOEW3aHjjs1p4Pw1Xk4+3egRevx8Ji9N6HUIA1Ifh8Q+cg9dremvFCUbOX2Zebz80BwJIgCBUemjqhU5XI5Eg==",
1185
  "cpu": [
1186
  "riscv64"
1187
  ],
 
1193
  ]
1194
  },
1195
  "node_modules/@rollup/rollup-linux-riscv64-musl": {
1196
+ "version": "4.52.4",
1197
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.4.tgz",
1198
+ "integrity": "sha512-1HHmsRyh845QDpEWzOFtMCph5Ts+9+yllCrREuBR/vg2RogAQGGBRC8lDPrPOMnrdOJ+mt1WLMOC2Kao/UwcvA==",
1199
  "cpu": [
1200
  "riscv64"
1201
  ],
 
1207
  ]
1208
  },
1209
  "node_modules/@rollup/rollup-linux-s390x-gnu": {
1210
+ "version": "4.52.4",
1211
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.4.tgz",
1212
+ "integrity": "sha512-seoeZp4L/6D1MUyjWkOMRU6/iLmCU2EjbMTyAG4oIOs1/I82Y5lTeaxW0KBfkUdHAWN7j25bpkt0rjnOgAcQcA==",
1213
  "cpu": [
1214
  "s390x"
1215
  ],
 
1221
  ]
1222
  },
1223
  "node_modules/@rollup/rollup-linux-x64-gnu": {
1224
+ "version": "4.52.4",
1225
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.4.tgz",
1226
+ "integrity": "sha512-Wi6AXf0k0L7E2gteNsNHUs7UMwCIhsCTs6+tqQ5GPwVRWMaflqGec4Sd8n6+FNFDw9vGcReqk2KzBDhCa1DLYg==",
1227
  "cpu": [
1228
  "x64"
1229
  ],
 
1235
  ]
1236
  },
1237
  "node_modules/@rollup/rollup-linux-x64-musl": {
1238
+ "version": "4.52.4",
1239
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.4.tgz",
1240
+ "integrity": "sha512-dtBZYjDmCQ9hW+WgEkaffvRRCKm767wWhxsFW3Lw86VXz/uJRuD438/XvbZT//B96Vs8oTA8Q4A0AfHbrxP9zw==",
1241
  "cpu": [
1242
  "x64"
1243
  ],
 
1249
  ]
1250
  },
1251
  "node_modules/@rollup/rollup-openharmony-arm64": {
1252
+ "version": "4.52.4",
1253
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.4.tgz",
1254
+ "integrity": "sha512-1ox+GqgRWqaB1RnyZXL8PD6E5f7YyRUJYnCqKpNzxzP0TkaUh112NDrR9Tt+C8rJ4x5G9Mk8PQR3o7Ku2RKqKA==",
1255
  "cpu": [
1256
  "arm64"
1257
  ],
 
1263
  ]
1264
  },
1265
  "node_modules/@rollup/rollup-win32-arm64-msvc": {
1266
+ "version": "4.52.4",
1267
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.4.tgz",
1268
+ "integrity": "sha512-8GKr640PdFNXwzIE0IrkMWUNUomILLkfeHjXBi/nUvFlpZP+FA8BKGKpacjW6OUUHaNI6sUURxR2U2g78FOHWQ==",
1269
  "cpu": [
1270
  "arm64"
1271
  ],
 
1277
  ]
1278
  },
1279
  "node_modules/@rollup/rollup-win32-ia32-msvc": {
1280
+ "version": "4.52.4",
1281
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.4.tgz",
1282
+ "integrity": "sha512-AIy/jdJ7WtJ/F6EcfOb2GjR9UweO0n43jNObQMb6oGxkYTfLcnN7vYYpG+CN3lLxrQkzWnMOoNSHTW54pgbVxw==",
1283
  "cpu": [
1284
  "ia32"
1285
  ],
 
1291
  ]
1292
  },
1293
  "node_modules/@rollup/rollup-win32-x64-gnu": {
1294
+ "version": "4.52.4",
1295
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.4.tgz",
1296
+ "integrity": "sha512-UF9KfsH9yEam0UjTwAgdK0anlQ7c8/pWPU2yVjyWcF1I1thABt6WXE47cI71pGiZ8wGvxohBoLnxM04L/wj8mQ==",
1297
  "cpu": [
1298
  "x64"
1299
  ],
 
1305
  ]
1306
  },
1307
  "node_modules/@rollup/rollup-win32-x64-msvc": {
1308
+ "version": "4.52.4",
1309
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.4.tgz",
1310
+ "integrity": "sha512-bf9PtUa0u8IXDVxzRToFQKsNCRz9qLYfR/MpECxl4mRoWYjAeFjgxj1XdZr2M/GNVpT05p+LgQOHopYDlUu6/w==",
1311
  "cpu": [
1312
  "x64"
1313
  ],
 
1326
  "license": "MIT"
1327
  },
1328
  "node_modules/@types/node": {
1329
+ "version": "24.7.0",
1330
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.7.0.tgz",
1331
+ "integrity": "sha512-IbKooQVqUBrlzWTi79E8Fw78l8k1RNtlDDNWsFZs7XonuQSJ8oNYfEeclhprUldXISRMLzBpILuKgPlIxm+/Yw==",
1332
  "license": "MIT",
1333
  "dependencies": {
1334
+ "undici-types": "~7.14.0"
1335
  }
1336
  },
1337
  "node_modules/boolean": {
 
1385
  }
1386
  },
1387
  "node_modules/detect-libc": {
1388
+ "version": "2.1.2",
1389
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
1390
+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
1391
  "license": "Apache-2.0",
1392
  "engines": {
1393
  "node": ">=8"
 
1502
  "license": "Apache-2.0"
1503
  },
1504
  "node_modules/fsevents": {
1505
+ "version": "2.3.2",
1506
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
1507
+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
1508
  "dev": true,
1509
  "hasInstallScript": true,
1510
  "license": "MIT",
 
1766
  "node": ">=18"
1767
  }
1768
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1769
  "node_modules/postcss": {
1770
  "version": "8.5.6",
1771
  "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
 
1847
  }
1848
  },
1849
  "node_modules/rollup": {
1850
+ "version": "4.52.4",
1851
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.4.tgz",
1852
+ "integrity": "sha512-CLEVl+MnPAiKh5pl4dEWSyMTpuflgNQiLGhMv8ezD5W/qP8AKvmYpCOKRRNOh7oRKnauBZ4SyeYkMS+1VSyKwQ==",
1853
  "dev": true,
1854
  "license": "MIT",
1855
  "dependencies": {
 
1863
  "npm": ">=8.0.0"
1864
  },
1865
  "optionalDependencies": {
1866
+ "@rollup/rollup-android-arm-eabi": "4.52.4",
1867
+ "@rollup/rollup-android-arm64": "4.52.4",
1868
+ "@rollup/rollup-darwin-arm64": "4.52.4",
1869
+ "@rollup/rollup-darwin-x64": "4.52.4",
1870
+ "@rollup/rollup-freebsd-arm64": "4.52.4",
1871
+ "@rollup/rollup-freebsd-x64": "4.52.4",
1872
+ "@rollup/rollup-linux-arm-gnueabihf": "4.52.4",
1873
+ "@rollup/rollup-linux-arm-musleabihf": "4.52.4",
1874
+ "@rollup/rollup-linux-arm64-gnu": "4.52.4",
1875
+ "@rollup/rollup-linux-arm64-musl": "4.52.4",
1876
+ "@rollup/rollup-linux-loong64-gnu": "4.52.4",
1877
+ "@rollup/rollup-linux-ppc64-gnu": "4.52.4",
1878
+ "@rollup/rollup-linux-riscv64-gnu": "4.52.4",
1879
+ "@rollup/rollup-linux-riscv64-musl": "4.52.4",
1880
+ "@rollup/rollup-linux-s390x-gnu": "4.52.4",
1881
+ "@rollup/rollup-linux-x64-gnu": "4.52.4",
1882
+ "@rollup/rollup-linux-x64-musl": "4.52.4",
1883
+ "@rollup/rollup-openharmony-arm64": "4.52.4",
1884
+ "@rollup/rollup-win32-arm64-msvc": "4.52.4",
1885
+ "@rollup/rollup-win32-ia32-msvc": "4.52.4",
1886
+ "@rollup/rollup-win32-x64-gnu": "4.52.4",
1887
+ "@rollup/rollup-win32-x64-msvc": "4.52.4",
1888
  "fsevents": "~2.3.2"
1889
  }
1890
  },
 
2039
  "fsevents": "~2.3.3"
2040
  }
2041
  },
2042
+ "node_modules/tsx/node_modules/fsevents": {
2043
+ "version": "2.3.3",
2044
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
2045
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
2046
+ "dev": true,
2047
+ "hasInstallScript": true,
2048
+ "license": "MIT",
2049
+ "optional": true,
2050
+ "os": [
2051
+ "darwin"
2052
+ ],
2053
+ "engines": {
2054
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
2055
+ }
2056
+ },
2057
  "node_modules/type-fest": {
2058
  "version": "0.13.1",
2059
  "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
 
2081
  }
2082
  },
2083
  "node_modules/undici-types": {
2084
+ "version": "7.14.0",
2085
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.14.0.tgz",
2086
+ "integrity": "sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA==",
2087
  "license": "MIT"
2088
  },
2089
  "node_modules/vite": {
2090
+ "version": "7.1.9",
2091
+ "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.9.tgz",
2092
+ "integrity": "sha512-4nVGliEpxmhCL8DslSAUdxlB6+SMrhB0a1v5ijlh1xB1nEPuy1mxaHxysVucLHuWryAxLWg6a5ei+U4TLn/rFg==",
2093
  "dev": true,
2094
  "license": "MIT",
2095
  "dependencies": {
 
2161
  }
2162
  }
2163
  },
2164
+ "node_modules/vite/node_modules/fsevents": {
2165
+ "version": "2.3.3",
2166
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
2167
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
2168
+ "dev": true,
2169
+ "hasInstallScript": true,
2170
+ "license": "MIT",
2171
+ "optional": true,
2172
+ "os": [
2173
+ "darwin"
2174
+ ],
2175
+ "engines": {
2176
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
2177
+ }
2178
+ },
2179
  "node_modules/yallist": {
2180
  "version": "5.0.0",
2181
  "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz",
{bench-web β†’ bench}/package.json RENAMED
@@ -1,13 +1,15 @@
1
  {
2
- "name": "bench-web",
3
  "private": true,
4
- "version": "0.0.2",
5
  "type": "module",
 
6
  "scripts": {
 
 
 
7
  "dev": "vite",
8
- "build": "vite build",
9
  "preview": "vite preview",
10
- "bench:cli": "tsx src/cli.ts",
11
  "bench:install": "playwright install"
12
  },
13
  "dependencies": {
 
1
  {
2
+ "name": "bench",
3
  "private": true,
 
4
  "type": "module",
5
+ "version": "0.0.2",
6
  "scripts": {
7
+ "bench": "tsx src/index.ts",
8
+ "bench:node": "tsx src/node/index.ts",
9
+ "bench:web": "tsx src/web/cli.ts",
10
  "dev": "vite",
11
+ "build": "tsc -p tsconfig.json",
12
  "preview": "vite preview",
 
13
  "bench:install": "playwright install"
14
  },
15
  "dependencies": {
bench/src/core/args.ts ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export function getArg(name: string, def?: string): string | undefined {
2
+ // Check for --name=value format
3
+ const equalFormat = process.argv.find(arg => arg.startsWith(`--${name}=`));
4
+ if (equalFormat) {
5
+ return equalFormat.split('=')[1];
6
+ }
7
+
8
+ // Check for --name value format
9
+ const i = process.argv.indexOf(`--${name}`);
10
+ if (i !== -1 && i + 1 < process.argv.length) return process.argv[i + 1];
11
+
12
+ return def;
13
+ }
14
+
15
+ export function parseArgs() {
16
+ const modelId = process.argv[2] || "Xenova/distilbert-base-uncased";
17
+ const task = process.argv[3] || "feature-extraction";
18
+ const mode = (getArg("mode", "warm") as "warm" | "cold");
19
+ const repeats = Math.max(1, parseInt(getArg("repeats", "3") || "3", 10));
20
+ const dtype = getArg("dtype"); // optional: fp32, fp16, q8, q4, etc.
21
+ const batchSize = Math.max(1, parseInt(getArg("batch-size", "1") || "1", 10));
22
+
23
+ return {
24
+ modelId,
25
+ task,
26
+ mode,
27
+ repeats,
28
+ dtype,
29
+ batchSize,
30
+ };
31
+ }
bench/src/core/metrics.ts ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export function percentile(values: number[], q: number): number {
2
+ const a = [...values].sort((x, y) => x - y);
3
+ const i = (a.length - 1) * q;
4
+ const i0 = Math.floor(i), i1 = Math.ceil(i);
5
+ return i0 === i1 ? a[i0] : a[i0] + (a[i1] - a[i0]) * (i - i0);
6
+ }
7
+
8
+ export interface BenchmarkRawResult {
9
+ load_ms: number;
10
+ first_infer_ms: number;
11
+ subsequent_infer_ms: number[];
12
+ }
13
+
14
+ export interface BenchmarkMetrics {
15
+ load_ms: { p50: number; p90: number; raw: number[] };
16
+ first_infer_ms: { p50: number; p90: number; raw: number[] };
17
+ subsequent_infer_ms: { p50: number; p90: number; raw: number[] };
18
+ }
19
+
20
+ export function aggregateMetrics(results: BenchmarkRawResult[]): BenchmarkMetrics {
21
+ const loads: number[] = [];
22
+ const firsts: number[] = [];
23
+ const subsequents: number[] = [];
24
+
25
+ for (const r of results) {
26
+ loads.push(r.load_ms);
27
+ firsts.push(r.first_infer_ms);
28
+ subsequents.push(...r.subsequent_infer_ms);
29
+ }
30
+
31
+ return {
32
+ load_ms: {
33
+ p50: +percentile(loads, 0.5).toFixed(1),
34
+ p90: +percentile(loads, 0.9).toFixed(1),
35
+ raw: loads,
36
+ },
37
+ first_infer_ms: {
38
+ p50: +percentile(firsts, 0.5).toFixed(1),
39
+ p90: +percentile(firsts, 0.9).toFixed(1),
40
+ raw: firsts,
41
+ },
42
+ subsequent_infer_ms: {
43
+ p50: +percentile(subsequents, 0.5).toFixed(1),
44
+ p90: +percentile(subsequents, 0.9).toFixed(1),
45
+ raw: subsequents,
46
+ },
47
+ };
48
+ }
bench/src/core/types.ts ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export interface BenchmarkOptions {
2
+ modelId: string;
3
+ task: string;
4
+ mode: "warm" | "cold";
5
+ repeats: number;
6
+ dtype?: string;
7
+ batchSize: number;
8
+ }
9
+
10
+ export interface BenchmarkResult {
11
+ platform: string;
12
+ runtime: string;
13
+ model: string;
14
+ task: string;
15
+ mode: string;
16
+ repeats: number;
17
+ batchSize: number;
18
+ dtype?: string;
19
+ metrics: {
20
+ load_ms: { p50: number; p90: number; raw: number[] };
21
+ first_infer_ms: { p50: number; p90: number; raw: number[] };
22
+ subsequent_infer_ms: { p50: number; p90: number; raw: number[] };
23
+ };
24
+ [key: string]: any;
25
+ }
bench/src/index.ts ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env node
2
+
3
+ import { getArg } from "./core/args.js";
4
+
5
+ const platform = getArg("platform", "node") as "node" | "web";
6
+
7
+ async function main() {
8
+ if (platform === "web") {
9
+ // Import and run web CLI
10
+ const { main: webMain } = await import("./web/cli.js");
11
+ await webMain();
12
+ } else {
13
+ // Import and run node CLI
14
+ const { main: nodeMain } = await import("./node/index.js");
15
+ await nodeMain();
16
+ }
17
+ }
18
+
19
+ main().catch((e) => {
20
+ console.error(e);
21
+ process.exit(1);
22
+ });
bench-node/src/index.ts β†’ bench/src/node/benchmark.ts RENAMED
@@ -1,41 +1,16 @@
1
  import { pipeline, env } from "@huggingface/transformers";
2
  import { performance } from "node:perf_hooks";
3
- import fs from "node:fs";
4
  import path from "node:path";
5
-
6
- // Node benchmark with warm/cold modes, repeats, p50/p90
7
-
8
- const modelId = process.argv[2] || "Xenova/distilbert-base-uncased";
9
- const task = process.argv[3] || "feature-extraction";
10
-
11
- function getArg(name: string, def?: string) {
12
- const i = process.argv.indexOf(`--${name}`);
13
- if (i !== -1 && i + 1 < process.argv.length) return process.argv[i + 1];
14
- return def;
15
- }
16
-
17
- const mode = (getArg("mode", "warm") as "warm" | "cold");
18
- const repeats = Math.max(1, parseInt(getArg("repeats", "3") || "3", 10));
19
- const cacheDir = getArg("cache-dir", path.resolve(".bench-cache/default"))!;
20
- const dtype = getArg("dtype"); // optional: fp32, fp16, q8, q4, etc.
21
- const batchSize = Math.max(1, parseInt(getArg("batch-size", "1") || "1", 10));
22
-
23
- // Point library cache to a dedicated directory for controllable cold/warm behavior
24
- env.cacheDir = cacheDir;
25
-
26
- function ensureEmptyDir(dir: string) {
27
- if (fs.existsSync(dir)) fs.rmSync(dir, { recursive: true, force: true });
28
- fs.mkdirSync(dir, { recursive: true });
29
- }
30
-
31
- function percentile(values: number[], q: number) {
32
- const a = [...values].sort((x, y) => x - y);
33
- const i = (a.length - 1) * q;
34
- const i0 = Math.floor(i), i1 = Math.ceil(i);
35
- return i0 === i1 ? a[i0] : a[i0] + (a[i1] - a[i0]) * (i - i0);
36
- }
37
-
38
- async function benchOnce() {
39
  const t0 = performance.now();
40
  const options: any = {};
41
  if (dtype) options.dtype = dtype;
@@ -61,11 +36,16 @@ async function benchOnce() {
61
  return {
62
  load_ms: +(t1 - t0).toFixed(1),
63
  first_infer_ms: +(t3 - t2).toFixed(1),
64
- subsequent_infer_ms: subsequentTimes
65
  };
66
  }
67
 
68
- async function main() {
 
 
 
 
 
69
  console.log(`Model : ${modelId}`);
70
  console.log(`Task : ${task}`);
71
  console.log(`Mode : ${mode}`);
@@ -74,9 +54,7 @@ async function main() {
74
  console.log(`Batch Size: ${batchSize}`);
75
  console.log(`Cache : ${cacheDir}`);
76
 
77
- const loads: number[] = [];
78
- const firsts: number[] = [];
79
- const subsequents: number[] = [];
80
 
81
  if (mode === "warm") {
82
  // Fresh cache dir, prefetch once (not measured), then measure N times
@@ -88,23 +66,21 @@ async function main() {
88
  await warm(warmupInputs);
89
 
90
  for (let i = 0; i < repeats; i++) {
91
- const r = await benchOnce();
92
- loads.push(r.load_ms);
93
- firsts.push(r.first_infer_ms);
94
- subsequents.push(...r.subsequent_infer_ms);
95
  }
96
  } else {
97
  // cold: delete cache dir before each measured run
98
  for (let i = 0; i < repeats; i++) {
99
  ensureEmptyDir(cacheDir);
100
- const r = await benchOnce();
101
- loads.push(r.load_ms);
102
- firsts.push(r.first_infer_ms);
103
- subsequents.push(...r.subsequent_infer_ms);
104
  }
105
  }
106
 
107
- const result: any = {
 
 
108
  platform: "node",
109
  runtime: `node-${process.versions.node}`,
110
  model: modelId,
@@ -113,15 +89,10 @@ async function main() {
113
  repeats,
114
  batchSize,
115
  cacheDir,
116
- metrics: {
117
- load_ms: { p50: +percentile(loads, 0.5).toFixed(1), p90: +percentile(loads, 0.9).toFixed(1), raw: loads },
118
- first_infer_ms: { p50: +percentile(firsts, 0.5).toFixed(1), p90: +percentile(firsts, 0.9).toFixed(1), raw: firsts },
119
- subsequent_infer_ms: { p50: +percentile(subsequents, 0.5).toFixed(1), p90: +percentile(subsequents, 0.9).toFixed(1), raw: subsequents }
120
- }
121
  };
 
122
  if (dtype) result.dtype = dtype;
123
 
124
- console.log(JSON.stringify(result, null, 2));
125
  }
126
-
127
- main().catch((e) => { console.error(e); process.exit(1); });
 
1
  import { pipeline, env } from "@huggingface/transformers";
2
  import { performance } from "node:perf_hooks";
 
3
  import path from "node:path";
4
+ import { BenchmarkOptions, BenchmarkResult } from "../core/types.js";
5
+ import { BenchmarkRawResult, aggregateMetrics } from "../core/metrics.js";
6
+ import { ensureEmptyDir } from "./cache.js";
7
+
8
+ async function benchOnce(
9
+ modelId: string,
10
+ task: string,
11
+ dtype: string | undefined,
12
+ batchSize: number
13
+ ): Promise<BenchmarkRawResult> {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  const t0 = performance.now();
15
  const options: any = {};
16
  if (dtype) options.dtype = dtype;
 
36
  return {
37
  load_ms: +(t1 - t0).toFixed(1),
38
  first_infer_ms: +(t3 - t2).toFixed(1),
39
+ subsequent_infer_ms: subsequentTimes,
40
  };
41
  }
42
 
43
+ export async function runNodeBenchmark(options: BenchmarkOptions): Promise<BenchmarkResult> {
44
+ const { modelId, task, mode, repeats, dtype, batchSize } = options;
45
+
46
+ const cacheDir = path.resolve(".bench-cache/default");
47
+ env.cacheDir = cacheDir;
48
+
49
  console.log(`Model : ${modelId}`);
50
  console.log(`Task : ${task}`);
51
  console.log(`Mode : ${mode}`);
 
54
  console.log(`Batch Size: ${batchSize}`);
55
  console.log(`Cache : ${cacheDir}`);
56
 
57
+ const results: BenchmarkRawResult[] = [];
 
 
58
 
59
  if (mode === "warm") {
60
  // Fresh cache dir, prefetch once (not measured), then measure N times
 
66
  await warm(warmupInputs);
67
 
68
  for (let i = 0; i < repeats; i++) {
69
+ const r = await benchOnce(modelId, task, dtype, batchSize);
70
+ results.push(r);
 
 
71
  }
72
  } else {
73
  // cold: delete cache dir before each measured run
74
  for (let i = 0; i < repeats; i++) {
75
  ensureEmptyDir(cacheDir);
76
+ const r = await benchOnce(modelId, task, dtype, batchSize);
77
+ results.push(r);
 
 
78
  }
79
  }
80
 
81
+ const metrics = aggregateMetrics(results);
82
+
83
+ const result: BenchmarkResult = {
84
  platform: "node",
85
  runtime: `node-${process.versions.node}`,
86
  model: modelId,
 
89
  repeats,
90
  batchSize,
91
  cacheDir,
92
+ metrics,
 
 
 
 
93
  };
94
+
95
  if (dtype) result.dtype = dtype;
96
 
97
+ return result;
98
  }
 
 
bench/src/node/cache.ts ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import fs from "node:fs";
2
+
3
+ export function ensureEmptyDir(dir: string) {
4
+ if (fs.existsSync(dir)) fs.rmSync(dir, { recursive: true, force: true });
5
+ fs.mkdirSync(dir, { recursive: true });
6
+ }
bench/src/node/index.ts ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { parseArgs } from "../core/args.js";
2
+ import { runNodeBenchmark } from "./benchmark.js";
3
+
4
+ export async function main() {
5
+ const options = parseArgs();
6
+ const result = await runNodeBenchmark(options);
7
+ console.log(JSON.stringify(result, null, 2));
8
+ }
9
+
10
+ // Check if this module is being run directly (not imported)
11
+ const isMainModule = process.argv[1]?.includes('node/index');
12
+
13
+ if (isMainModule) {
14
+ main().catch((e) => {
15
+ console.error(e);
16
+ process.exit(1);
17
+ });
18
+ }
bench/src/web/benchmark.ts ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { pipeline } from "@huggingface/transformers";
2
+ import { BenchmarkRawResult, aggregateMetrics } from "../core/metrics.js";
3
+ import { BenchmarkResult } from "../core/types.js";
4
+ import { clearCaches } from "./cache.js";
5
+
6
+ function now() {
7
+ return performance.now();
8
+ }
9
+
10
+ async function benchOnce(
11
+ modelId: string,
12
+ task: string,
13
+ device: string,
14
+ dtype: string | undefined,
15
+ batchSize: number
16
+ ): Promise<BenchmarkRawResult> {
17
+ const t0 = now();
18
+ const options: any = { device };
19
+ if (dtype) options.dtype = dtype;
20
+ const pipe = await pipeline(task, modelId, options);
21
+ const t1 = now();
22
+
23
+ // Prepare batch input
24
+ const inputs = Array(batchSize).fill("The quick brown fox jumps over the lazy dog.");
25
+
26
+ const t2 = now();
27
+ await pipe(inputs);
28
+ const t3 = now();
29
+
30
+ // Run additional inferences to measure subsequent performance
31
+ const subsequentTimes: number[] = [];
32
+ for (let i = 0; i < 3; i++) {
33
+ const t4 = now();
34
+ await pipe(inputs);
35
+ const t5 = now();
36
+ subsequentTimes.push(+(t5 - t4).toFixed(1));
37
+ }
38
+
39
+ return {
40
+ load_ms: +(t1 - t0).toFixed(1),
41
+ first_infer_ms: +(t3 - t2).toFixed(1),
42
+ subsequent_infer_ms: subsequentTimes,
43
+ };
44
+ }
45
+
46
+ export async function runWebBenchmarkCold(
47
+ modelId: string,
48
+ task: string,
49
+ repeats: number,
50
+ device: string,
51
+ dtype?: string,
52
+ batchSize: number = 1
53
+ ): Promise<BenchmarkResult> {
54
+ await clearCaches();
55
+
56
+ const results: BenchmarkRawResult[] = [];
57
+ for (let i = 0; i < repeats; i++) {
58
+ const r = await benchOnce(modelId, task, device, dtype, batchSize);
59
+ results.push(r);
60
+ }
61
+
62
+ const metrics = aggregateMetrics(results);
63
+
64
+ const result: BenchmarkResult = {
65
+ platform: "browser",
66
+ runtime: navigator.userAgent,
67
+ mode: "cold",
68
+ repeats,
69
+ batchSize,
70
+ model: modelId,
71
+ task,
72
+ device,
73
+ metrics,
74
+ notes: "Only the 1st iteration is strictly cold in a single page session.",
75
+ };
76
+ if (dtype) result.dtype = dtype;
77
+ return result;
78
+ }
79
+
80
+ export async function runWebBenchmarkWarm(
81
+ modelId: string,
82
+ task: string,
83
+ repeats: number,
84
+ device: string,
85
+ dtype?: string,
86
+ batchSize: number = 1
87
+ ): Promise<BenchmarkResult> {
88
+ // Prefetch/warmup
89
+ const options: any = { device };
90
+ if (dtype) options.dtype = dtype;
91
+ const p = await pipeline(task, modelId, options);
92
+ const warmupInputs = Array(batchSize).fill("warmup");
93
+ await p(warmupInputs);
94
+
95
+ const results: BenchmarkRawResult[] = [];
96
+ for (let i = 0; i < repeats; i++) {
97
+ const r = await benchOnce(modelId, task, device, dtype, batchSize);
98
+ results.push(r);
99
+ }
100
+
101
+ const metrics = aggregateMetrics(results);
102
+
103
+ const result: BenchmarkResult = {
104
+ platform: "browser",
105
+ runtime: navigator.userAgent,
106
+ mode: "warm",
107
+ repeats,
108
+ batchSize,
109
+ model: modelId,
110
+ task,
111
+ device,
112
+ metrics,
113
+ };
114
+ if (dtype) result.dtype = dtype;
115
+ return result;
116
+ }
bench/src/web/cache.ts ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export async function clearCaches({ clearSession = false }: { clearSession?: boolean } = {}) {
2
+ try {
3
+ const keys = await caches.keys();
4
+ await Promise.all(keys.map((k) => caches.delete(k)));
5
+ } catch { }
6
+ try {
7
+ const anyIDB: any = indexedDB as any;
8
+ if (typeof anyIDB.databases === "function") {
9
+ const dbs = await anyIDB.databases();
10
+ await Promise.all(dbs.map((d: any) => d?.name ? indexedDB.deleteDatabase(d.name) : undefined));
11
+ } else {
12
+ indexedDB.deleteDatabase("transformers-cache");
13
+ indexedDB.deleteDatabase("model-cache");
14
+ }
15
+ } catch { }
16
+ try {
17
+ localStorage.clear();
18
+ if (clearSession) sessionStorage.clear();
19
+ } catch { }
20
+ }
{bench-web/src β†’ bench/src/web}/cli.ts RENAMED
@@ -1,17 +1,12 @@
1
- import { chromium, firefox, webkit, Browser, Page } from "playwright";
2
  import { createServer } from "vite";
 
3
 
4
  // CLI for running browser benchmarks headlessly via Playwright
5
 
6
  const modelId = process.argv[2] || "Xenova/distilbert-base-uncased";
7
  const task = process.argv[3] || "feature-extraction";
8
 
9
- function getArg(name: string, def?: string) {
10
- const i = process.argv.indexOf(`--${name}`);
11
- if (i !== -1 && i + 1 < process.argv.length) return process.argv[i + 1];
12
- return def;
13
- }
14
-
15
  const mode = getArg("mode", "warm") as "warm" | "cold";
16
  const repeats = Math.max(1, parseInt(getArg("repeats", "3") || "3", 10));
17
  const device = getArg("device", "webgpu") as "webgpu" | "wasm";
@@ -142,7 +137,14 @@ async function main() {
142
  }
143
  }
144
 
145
- main().catch((e) => {
146
- console.error(e);
147
- process.exit(1);
148
- });
 
 
 
 
 
 
 
 
1
+ import { chromium, firefox, webkit, Browser } from "playwright";
2
  import { createServer } from "vite";
3
+ import { getArg } from "../core/args.js";
4
 
5
  // CLI for running browser benchmarks headlessly via Playwright
6
 
7
  const modelId = process.argv[2] || "Xenova/distilbert-base-uncased";
8
  const task = process.argv[3] || "feature-extraction";
9
 
 
 
 
 
 
 
10
  const mode = getArg("mode", "warm") as "warm" | "cold";
11
  const repeats = Math.max(1, parseInt(getArg("repeats", "3") || "3", 10));
12
  const device = getArg("device", "webgpu") as "webgpu" | "wasm";
 
137
  }
138
  }
139
 
140
+ // Check if this module is being run directly (not imported)
141
+ const isMainModule = process.argv[1]?.includes('web/cli');
142
+
143
+ if (isMainModule) {
144
+ main().catch((e) => {
145
+ console.error(e);
146
+ process.exit(1);
147
+ });
148
+ }
149
+
150
+ export { main };
bench/src/web/main.ts ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { runWebBenchmarkCold, runWebBenchmarkWarm } from "./benchmark.js";
2
+
3
+ const btn = document.getElementById("run") as HTMLButtonElement;
4
+ const out = document.getElementById("out") as HTMLPreElement;
5
+ const statusEl = document.getElementById("status") as HTMLSpanElement;
6
+ const modelEl = document.getElementById("model") as HTMLInputElement;
7
+ const taskEl = document.getElementById("task") as HTMLSelectElement;
8
+ const modeEl = document.getElementById("mode") as HTMLSelectElement;
9
+ const repeatsEl = document.getElementById("repeats") as HTMLInputElement;
10
+ const deviceEl = document.getElementById("device") as HTMLSelectElement;
11
+
12
+ async function runWarmWithReload(modelId: string, task: string, repeats: number, device: string, dtype?: string, batchSize: number = 1) {
13
+ const flag = sessionStorage.getItem("__warm_ready__");
14
+ if (!flag) {
15
+ statusEl.textContent = "prefetching (warmup) ...";
16
+ // Perform warmup and store flag
17
+ const { pipeline } = await import("@huggingface/transformers");
18
+ const options: any = { device };
19
+ if (dtype) options.dtype = dtype;
20
+ const p = await pipeline(task, modelId, options);
21
+ const warmupInputs = Array(batchSize).fill("warmup");
22
+ await p(warmupInputs);
23
+ sessionStorage.setItem("__warm_ready__", JSON.stringify({ modelId, task, repeats, device, dtype, batchSize }));
24
+ location.reload();
25
+ return null;
26
+ } else {
27
+ sessionStorage.removeItem("__warm_ready__");
28
+ statusEl.textContent = "running (warm)...";
29
+ return await runWebBenchmarkWarm(modelId, task, repeats, device, dtype, batchSize);
30
+ }
31
+ }
32
+
33
+ async function run() {
34
+ const modelId = modelEl.value.trim() || "Xenova/distilbert-base-uncased";
35
+ const task = taskEl.value;
36
+ const mode = modeEl.value as "warm" | "cold";
37
+ const repeats = Math.max(1, parseInt(repeatsEl.value || "3", 10));
38
+ const device = deviceEl.value;
39
+ out.textContent = "{}";
40
+
41
+ if (mode === "cold") {
42
+ statusEl.textContent = "clearing caches (cold)...";
43
+ const r = await runWebBenchmarkCold(modelId, task, repeats, device);
44
+ if (r) {
45
+ out.textContent = JSON.stringify(r, null, 2);
46
+ statusEl.textContent = "done (cold)";
47
+ }
48
+ } else {
49
+ const r = await runWarmWithReload(modelId, task, repeats, device);
50
+ if (r) {
51
+ out.textContent = JSON.stringify(r, null, 2);
52
+ statusEl.textContent = "done (warm)";
53
+ }
54
+ }
55
+ }
56
+
57
+ // Auto-run if returning from warm reload
58
+ (async () => {
59
+ const flag = sessionStorage.getItem("__warm_ready__");
60
+ if (flag) {
61
+ try {
62
+ await run();
63
+ } catch (e) {
64
+ console.error(e);
65
+ }
66
+ }
67
+ })();
68
+
69
+ btn.addEventListener("click", () => {
70
+ run().catch((e) => {
71
+ out.textContent = String(e);
72
+ statusEl.textContent = "error";
73
+ console.error(e);
74
+ });
75
+ });
76
+
77
+ // Expose for CLI use
78
+ (window as any).runBenchmarkCLI = async function (params: {
79
+ modelId: string;
80
+ task: string;
81
+ mode: string;
82
+ repeats: number;
83
+ device: string;
84
+ dtype?: string;
85
+ batchSize?: number;
86
+ }) {
87
+ const batchSize = params.batchSize || 1;
88
+ if (params.mode === "cold") {
89
+ return await runWebBenchmarkCold(params.modelId, params.task, params.repeats, params.device, params.dtype, batchSize);
90
+ } else {
91
+ return await runWebBenchmarkWarm(params.modelId, params.task, params.repeats, params.device, params.dtype, batchSize);
92
+ }
93
+ };
{bench-node β†’ bench}/tsconfig.json RENAMED
@@ -4,7 +4,8 @@
4
  "module": "ESNext",
5
  "moduleResolution": "Bundler",
6
  "lib": [
7
- "ES2022"
 
8
  ],
9
  "esModuleInterop": true,
10
  "strict": true,
@@ -14,4 +15,4 @@
14
  "include": [
15
  "src"
16
  ]
17
- }
 
4
  "module": "ESNext",
5
  "moduleResolution": "Bundler",
6
  "lib": [
7
+ "ES2022",
8
+ "DOM"
9
  ],
10
  "esModuleInterop": true,
11
  "strict": true,
 
15
  "include": [
16
  "src"
17
  ]
18
+ }
{bench-web β†’ bench}/vite.config.ts RENAMED
File without changes