forked from offlinecv/OfflineCV
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheval-rewrite.html
More file actions
110 lines (110 loc) · 3.56 KB
/
Copy patheval-rewrite.html
File metadata and controls
110 lines (110 loc) · 3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OfflineCV — rewrite eval (dev only)</title>
<meta
name="description"
content="Dev-only eval harness for rewrite quality (issue #65). Not part of the production bundle."
/>
<meta name="color-scheme" content="light dark" />
<!--
Dev-only tool page; not subject to the design-token policy that
governs feature code under src/components/**. CSS keeps to system
colors (Canvas / CanvasText) and a small set of inline rules so
the page renders standalone without loading the app's design system.
-->
<style>
:root {
color-scheme: light dark;
font-family: ui-sans-serif, system-ui, sans-serif;
}
body {
max-width: 880px;
margin: 2rem auto;
padding: 0 1rem;
line-height: 1.5;
color: CanvasText;
background: Canvas;
}
h1 { margin-bottom: 0.25rem; }
.subtitle { color: GrayText; margin-top: 0; }
button {
padding: 0.6rem 1.2rem;
font-size: 1rem;
cursor: pointer;
border-radius: 6px;
}
button[disabled] { opacity: 0.5; cursor: not-allowed; }
#status { font-weight: 600; margin: 1rem 0 0.25rem; }
#progress { font-family: ui-monospace, monospace; color: GrayText; }
#log {
background: color-mix(in srgb, CanvasText 92%, Canvas);
color: Canvas;
padding: 0.75rem;
border-radius: 6px;
font-family: ui-monospace, monospace;
font-size: 0.85rem;
height: 320px;
overflow-y: auto;
white-space: pre-wrap;
margin-top: 1rem;
}
.downloads {
margin-top: 1rem;
display: flex;
gap: 0.75rem;
}
.downloads a[hidden] { display: none; }
.downloads a {
padding: 0.5rem 0.9rem;
border: 1px solid currentColor;
border-radius: 6px;
text-decoration: none;
}
.note {
font-size: 0.9rem;
color: GrayText;
margin-top: 1.5rem;
}
</style>
</head>
<body>
<h1>Rewrite eval harness</h1>
<p class="subtitle">
Issue #65 · dev-only · WebGPU required · not bundled into production.
</p>
<p>
Runs the selected model against every prompt variant against every
fixture under <code>tests/fixtures/rewrite/</code>. Deterministic
rubric only — no judge model is loaded.
</p>
<p>
One model per tab on purpose: cycling multiple multi-GB models in a
single browser tab is fragile on consumer GPUs (eviction-then-reload
can OOM). Run each model in a fresh tab, download its report, then
open a new tab for the next one.
</p>
<p>
<label for="model">Model: </label>
<select id="model"></select>
<button id="run" type="button">Run eval</button>
</p>
<p id="status">Idle. Click “Run eval” to start.</p>
<p id="progress"> </p>
<div class="downloads">
<a id="download-json" hidden>Download JSON report</a>
<a id="download-md" hidden>Download Markdown report</a>
</div>
<pre id="log"></pre>
<p class="note">
The downloaded report goes under
<code>tests/fixtures/rewrite/reports/</code> when you commit a fresh
run. See <code>src/lib/webllm/eval/README.md</code> for the
report-commit workflow.
</p>
<script type="module" src="/src/lib/webllm/eval/run-eval-browser.ts"></script>
</body>
</html>