whitphx's picture
whitphx HF Staff
Merge bench-node and bench-web into bench
f8d016c
raw
history blame
1.91 kB
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Transformers.js Bench (Web)</title>
<style>
body { font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; margin: 2rem; }
button { padding: 0.6rem 1rem; font-size: 1rem; }
pre { background: #f6f8fa; padding: 1rem; border-radius: 8px; overflow: auto; }
.row { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; flex-wrap: wrap; }
label { font-weight: 600; }
input, select { padding: 0.4rem 0.6rem; }
</style>
</head>
<body>
<h1>Transformers.js Bench (Web)</h1>
<div class="row">
<label for="model">Model</label>
<input id="model" value="Xenova/distilbert-base-uncased" size="34" />
<label for="task">Task</label>
<select id="task">
<option value="feature-extraction" selected>feature-extraction</option>
<option value="text-classification">text-classification</option>
</select>
</div>
<div class="row">
<label for="mode">Mode</label>
<select id="mode">
<option value="warm" selected>warm (prefetch + reload)</option>
<option value="cold">cold (clear caches once)</option>
</select>
<label for="repeats">Repeats</label>
<input id="repeats" type="number" value="3" min="1" style="width: 5rem;" />
<label for="device">Device</label>
<select id="device">
<option value="webgpu" selected>webgpu</option>
<option value="wasm">wasm (CPU)</option>
</select>
</div>
<div class="row">
<button id="run">Run benchmark</button>
<span id="status"></span>
</div>
<code><pre id="out">{}</pre></code>
<script type="module" src="/src/web/main.ts"></script>
</body>
</html>