Spaces:
Running
Running
File size: 24,190 Bytes
65cf3d7 d7e55f0 65cf3d7 d7e55f0 65cf3d7 d7e55f0 65cf3d7 d7e55f0 65cf3d7 d7e55f0 65cf3d7 | 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 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PINK Leaderboard</title>
<meta name="description" content="Leaderboard for handwritten math OCR on FERMAT, scored with PINK: VLMs and OCR models ranked by how faithfully they transcribe students' work, with over-corrections penalized.">
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%23c8263c'/%3E%3Cpath d='M8 17l5 5 11-12' stroke='white' stroke-width='3.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&family=Caveat:wght@500;700&display=swap">
<style>
/* Layout: one reading column (~68ch) on a graph-paper ground; the "red pen" accent marks only over-corrections and penalties. */
:root {
--paper: #f6f7f9; /* page ground: cool exam-paper white */
--sheet: #ffffff; /* raised surfaces */
--ink: #18223a; /* text: fountain-pen navy */
--ink-soft: #4a5671; /* secondary text */
--rule: #d9dee8; /* ruled lines, borders */
--grid: rgba(24, 34, 58, 0.045);
--pen: #c8263c; /* the teacher's red pen: over-correction / penalty */
--pen-soft: rgba(200, 38, 60, 0.09);
--keep: #1f7a55; /* faithful / kept */
--keep-soft: rgba(31, 122, 85, 0.1);
--bar: #2c4a8a; /* score bars */
--code-bg: #eef1f6;
--font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
--font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
--font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
--font-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--paper: #0f1422; --sheet: #161d2f; --ink: #e6e9f2; --ink-soft: #a3abc2; --rule: #2a3350;
--grid: rgba(230, 233, 242, 0.04); --pen: #ff6b7d; --pen-soft: rgba(255, 107, 125, 0.13);
--keep: #4fd1a0; --keep-soft: rgba(79, 209, 160, 0.12); --bar: #7f9cff; --code-bg: #1c2438; color-scheme: dark;
}
}
:root[data-theme="dark"] {
--paper: #0f1422; --sheet: #161d2f; --ink: #e6e9f2; --ink-soft: #a3abc2; --rule: #2a3350;
--grid: rgba(230, 233, 242, 0.04); --pen: #ff6b7d; --pen-soft: rgba(255, 107, 125, 0.13);
--keep: #4fd1a0; --keep-soft: rgba(79, 209, 160, 0.12); --bar: #7f9cff; --code-bg: #1c2438; color-scheme: dark;
}
* { box-sizing: border-box; }
body {
margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--font-body);
background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
background-size: 24px 24px;
}
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.col { max-width: 68ch; }
section { padding-block: 56px 8px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(30px, 5.2vw, 52px); font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 700; margin-bottom: 14px; }
h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
p { margin: 0 0 14px; }
a { color: var(--bar); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; border-radius: 4px; }
.eyebrow { font: 600 12px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--pen); margin-bottom: 14px; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }
:not(pre) > code { background: var(--code-bg); padding: 1px 5px; border-radius: 4px; }
/* hero */
.hero { padding-block: 56px 24px; }
.venue { display: inline-flex; gap: 8px; align-items: center; font: 500 13px/1 var(--font-mono); color: var(--ink-soft); margin-bottom: 18px; flex-wrap: wrap; }
.venue b { color: var(--pen); font-weight: 600; }
.authors { margin: 18px 0 4px; font-size: 17px; }
.authors span { white-space: nowrap; }
.affil { color: var(--ink-soft); font-size: 14px; margin-bottom: 22px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.links a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet); color: var(--ink); text-decoration: none; font: 500 14px/1 var(--font-body); }
.links a:hover { border-color: var(--ink-soft); }
.links a .k { font: 600 11px/1 var(--font-mono); color: var(--ink-soft); }
/* the worked example */
.example { margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.slip { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 20px; min-width: 0; position: relative; }
.slip .lab { font: 600 11px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; display: flex; justify-content: space-between; gap: 8px; }
.q { font-size: 14px; color: var(--ink-soft); margin-bottom: 10px; }
.hand { font: 500 26px/1.35 var(--font-hand); }
.hand .err { color: var(--pen); text-decoration: underline wavy var(--pen); text-underline-offset: 6px; }
.typed { font: 15px/1.7 var(--font-mono); overflow-wrap: anywhere; }
.typed .fix { background: var(--pen-soft); color: var(--pen); padding: 0 3px; border-radius: 3px; font-weight: 500; }
.score { font: 600 13px/1 var(--font-mono); padding: 5px 8px; border-radius: 6px; white-space: nowrap; }
.score.ok { background: var(--keep-soft); color: var(--keep); }
.score.bad { background: var(--pen-soft); color: var(--pen); }
.caption { grid-column: 1 / -1; font-size: 14px; color: var(--ink-soft); }
/* rubric table */
.tbl-wrap { overflow-x: auto; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th { font: 600 11px/1.2 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); background: var(--sheet); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
.pen { color: var(--pen); font-weight: 600; }
.keep { color: var(--keep); font-weight: 600; }
.strike { text-decoration: line-through; color: var(--ink-soft); }
/* steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 22px 0 8px; }
.step { border-top: 2px solid var(--ink); padding-top: 12px; }
.step .n { font: 600 12px/1 var(--font-mono); color: var(--pen); margin-bottom: 8px; }
.formula { font: 15px/1.6 var(--font-mono); background: var(--sheet); border: 1px solid var(--rule); border-left: 3px solid var(--pen); border-radius: 6px; padding: 12px 14px; overflow-x: auto; white-space: pre; margin: 14px 0; }
figure { margin: 22px 0 0; }
figure img { width: 100%; border-radius: 10px; border: 1px solid var(--rule); background: #fff; display: block; }
figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
/* facts */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.fact { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; }
.fact .big { font: 700 34px/1 var(--font-display); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.fact .big.pen { color: var(--pen); }
.fact p { margin: 0; font-size: 14px; color: var(--ink-soft); }
/* bars in tables */
.barcell { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.barcell .b { height: 8px; border-radius: 4px; background: var(--bar); flex: none; }
.barcell .v { font-weight: 600; min-width: 3.2em; }
.oc { display: inline-flex; align-items: center; gap: 8px; }
.oc .b { height: 8px; border-radius: 4px; background: var(--pen); opacity: 0.75; }
.tag { font: 600 10px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 6px; border-radius: 4px; border: 1px solid var(--rule); color: var(--ink-soft); margin-left: 6px; vertical-align: 1px; }
.tag.paper { border-color: var(--bar); color: var(--bar); }
.tag.ocr { border-color: var(--keep); color: var(--keep); }
/* judge tabs */
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-bottom: 1px solid var(--rule); margin: 6px 0 12px; }
.tab { text-align: left; background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 12px 9px 0; cursor: pointer; color: var(--ink-soft); display: grid; gap: 2px; min-width: 0; }
.tab b { font: 700 16px/1.2 var(--font-display); color: var(--ink-soft); }
.tab span { font: 12px/1.3 var(--font-body); }
.tab[aria-selected="true"] { border-bottom-color: var(--pen); }
.tab[aria-selected="true"] b { color: var(--ink); }
@media (max-width: 520px) { .tab b { font-size: 14px; } .tab span { font-size: 11px; } }
/* leaderboard controls */
.controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.chip { font: 500 13px/1 var(--font-body); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.status { background: var(--sheet); border: 1px dashed var(--ink-soft); border-radius: 10px; padding: 18px 20px; }
.status .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pen); margin-right: 8px; vertical-align: 1px; }
/* code */
.code { position: relative; background: var(--code-bg); border: 1px solid var(--rule); border-radius: 10px; margin: 12px 0; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: 13.5px/1.65 var(--font-mono); }
.code .c { color: var(--ink-soft); }
.copy { position: absolute; top: 8px; right: 8px; font: 500 12px/1 var(--font-body); padding: 6px 10px; border-radius: 6px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); cursor: pointer; }
.notes { font-size: 14px; color: var(--ink-soft); padding-left: 18px; }
.notes li { margin-bottom: 6px; }
footer { padding-block: 48px 64px; color: var(--ink-soft); font-size: 13px; }
@media (max-width: 760px) {
.example, .steps, .facts { grid-template-columns: 1fr; }
.hand { font-size: 23px; }
}
@media (prefers-reduced-motion: no-preference) {
.typed .fix { animation: pulse 2.6s ease-in-out 1.2s 2; }
@keyframes pulse { 50% { background: rgba(200, 38, 60, 0.28); } }
}
.lede { font-size: 17px; max-width: 68ch; margin: 14px 0 0; color: var(--ink-soft); }
ol.steps { padding-left: 1.2em; max-width: 68ch; }
ol.steps li { margin: 6px 0; }
.updated { font: 12px/1.4 var(--font-mono); color: var(--ink-soft); }
</style>
</head>
<body>
<header class="wrap hero">
<div class="venue"><b>Leaderboard</b> · FERMAT handwritten math · <span class="updated">updated __UPDATED__</span></div>
<h1>Which models transcribe handwritten math without “fixing” the student?</h1>
<p class="lede">When a vision-language model transcribes a student's handwritten solution, it often corrects the student's mistakes, and a grader then sees a right answer that the student never wrote. <b>PINK</b> grades each transcription with a rubric judge and penalizes every rubric component that came out better than the student's own work. Data: <a href="https://huggingface.co/datasets/ai4bharat/FERMAT">FERMAT</a>, 2,244 handwritten solutions with real errors.</p>
<nav class="links" aria-label="Paper and code">
<a href="https://aclanthology.org/2026.emnlp-main.476/"><span class="k">PDF</span> EMNLP 2026</a>
<a href="https://arxiv.org/abs/2604.22774"><span class="k">arXiv</span> 2604.22774</a>
<a href="https://github.com/9115jin/PINK"><span class="k">Code</span> GitHub</a>
<a href="https://pypi.org/project/pink-eval/"><span class="k">pip</span> pink-eval</a>
<a href="https://9115jin.github.io/PINK/"><span class="k">Web</span> Project page</a>
<a href="https://huggingface.co/papers/2604.22774"><span class="k">HF</span> Paper page</a>
</nav>
</header>
<main class="wrap">
<section id="leaderboard">
<div class="eyebrow">Leaderboard</div>
<h2>VLMs and OCR models on FERMAT</h2>
<div class="tabs" role="tablist" aria-label="Judge"></div>
<p class="col muted small" id="lb-desc"></p>
<div id="lb"></div>
</section>
<section id="submit">
<div class="eyebrow">Submit</div>
<h2>Add your model</h2>
<div class="col">
<p>Results come in as pull requests to this Space. Transcribe FERMAT with your model, grade the transcriptions with the <b>Qwen3.8-27B</b> judge, and open a PR with three files. We re-grade a random subset of your transcriptions with the same judge, recompute the tables and merge.</p>
<p class="muted small">FERMAT (<a href="https://aclanthology.org/2025.acl-long.720/">Nath et al., 2025</a>) is gated on Hugging Face: accept its terms, then log in. Use the paper's OCR prompt (the default) for general VLMs, with thinking off; dedicated OCR models may use their model card's prompt (<code>--user-prompt</code>).</p>
</div>
<div class="code"><button class="copy" type="button" data-target="sub-cmd">Copy</button><pre id="sub-cmd"><span class="c"># install (the Qwen3.8-27B oracle grades ship with pink-eval 1.6 and later)</span>
pip install "pink-eval[fermat]"
<span class="c"># 1) FERMAT images + manifest.jsonl</span>
pink fermat --out-dir fermat
<span class="c"># 2) transcribe with your model (any OpenAI-compatible endpoint, e.g. vllm serve)</span>
pink ocr --manifest fermat/manifest.jsonl --model my-vlm \
--base-url http://localhost:8001/v1 --out ocr.jsonl
<span class="c"># 3) grade with the judge (scripts/serve_qwen38_judge.sh in the PINK repo serves it on 2 GPUs, port 8000)</span>
pink grade --judge qwen3.8-27b --input ocr.jsonl --out grades.csv
<span class="c"># 4) check your score</span>
pink score --model grades.csv --oracle fermat:qwen3.8-27b --missing zero</pre></div>
<p class="small muted">The pull request adds these files; <code><model></code> is a short lowercase id such as <code>my-vlm-7b</code>.</p>
<div class="code"><button class="copy" type="button" data-target="sub-files">Copy</button><pre id="sub-files">models/<model>.json <span class="c"># model card, below</span>
results/qwen3.8-27b/<model>.csv <span class="c"># grades.csv from pink grade</span>
transcriptions/<model>.jsonl <span class="c"># ocr.jsonl from pink ocr</span></pre></div>
<div class="code"><button class="copy" type="button" data-target="sub-json">Copy</button><pre id="sub-json">{"name": "My-VLM-7B", "url": "https://huggingface.co/my-org/My-VLM-7B", "type": "VLM",
"params_b": 7.6, "note": "", "ocr_prompt": "paper", "source": "community", "added": "2026-12"}</pre></div>
<p class="small muted"><code>type</code> is <code>VLM</code> or <code>OCR</code>; <code>params_b</code> is the total parameter count in billions (<code>null</code> for API models). Open the pull request on the Space's Community tab, or from Python:</p>
<div class="code"><button class="copy" type="button" data-target="sub-py">Copy</button><pre id="sub-py">from huggingface_hub import HfApi
HfApi().upload_folder(repo_id="CodeWorker/PINK-Leaderboard", repo_type="space",
folder_path="my_submission", create_pr=True, commit_message="Add My-VLM-7B")</pre></div>
<p class="small muted">Grades from the paper's <code>gpt-5</code> judge are also welcome; they go into the GPT-5 tab (<code>results/gpt-5/</code>).</p>
</section>
<section id="how">
<div class="eyebrow">Method</div>
<h2>How PINK scores a transcription</h2>
<ol class="steps">
<li><b>Grade.</b> A judge grades the transcription and, separately, the faithful transcription (the oracle) with the same five-item rubric: core formula, conditions, early and late calculation, final value; 20 points each.</li>
<li><b>Penalize.</b> A component that scores higher than the oracle was “fixed” by the transcription. It goes back to the oracle score when the gap is at most 10 points, and to 0 when it is larger.</li>
<li><b>Score.</b> PINK is the penalized total divided by the oracle total, over all samples. <b>Raw</b> is the same ratio without the penalty: above 1, the transcriptions grade better than what the students wrote.</li>
</ol>
<p class="col">In a 200-item human study, expert judgments preferred PINK's verdict 55.0% of the time, against 39.5% for BLEU. Open judges with thinking agree closely with GPT-5 on the paper's 15 VLMs: Kendall τ = 0.98 for Qwen3.8-27B and Qwen3.5-9B, against 0.90 for the paper's Qwen3-Next-80B. Details are on the <a href="https://9115jin.github.io/PINK/#judges">project page</a>.</p>
</section>
<section id="cite">
<div class="eyebrow">Citation</div>
<h2>BibTeX</h2>
<div class="code"><button class="copy" type="button" data-target="bib">Copy</button><pre id="bib">@inproceedings{seong-etal-2026-vlms,
title = "When {VLM}s `Fix' Students: Identifying and Penalizing Over-Correction in the Evaluation of Multi-line Handwritten Math {OCR}",
author = "Seong, Jin and Liermann, Wencke and Kim, Minho and Shin, Jong-hun and Lim, Soojong",
booktitle = "Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing",
month = oct,
year = "2026",
address = "Budapest, Hungary",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2026.emnlp-main.476/",
doi = "10.18653/2026.emnlp-main.476",
pages = "10932--10953"
}</pre></div>
</section>
</main>
<footer class="wrap">
PINK is released under BSD-3-Clause, © 2026 ETRI. FERMAT is by Nath et al. (2025), CC-BY-4.0. Tables are recomputed from <code>results/</code> by <code>scripts/build_leaderboard.py</code>.
</footer>
<script>
let LB = __LB_DATA__; // {updated, tabs: [{id, label, sub, desc, rows|null, notes}]}, refreshed from the live leaderboard below
const LIVE = "https://codeworker-pink-leaderboard.static.hf.space/leaderboard.json";
const esc = s => String(s).replace(/[&<>"]/g, c => ({ "&": "&", "<": "<", ">": ">", '"': """ }[c]));
const bar = (v, lo, hi, w) => Math.max(4, Math.round((v - lo) / (hi - lo) * w));
function sizeBand(p) { if (p == null) return "API"; return p <= 4 ? "≤ 4B" : p <= 10 ? "4–10B" : p <= 40 ? "10–40B" : "> 40B"; }
const FILTERS = [["All", () => true], ["General VLMs", r => r.type === "VLM"], ["OCR models", r => r.type === "OCR"],
["≤ 4B", r => sizeBand(r.params) === "≤ 4B"], ["4–10B", r => sizeBand(r.params) === "4–10B"],
["10–40B", r => sizeBand(r.params) === "10–40B"], ["> 40B / API", r => ["> 40B", "API"].includes(sizeBand(r.params))]];
let current = 0;
let tab = Math.max(0, LB.tabs.findIndex(t => t.rows)); // the closest-to-GPT-5 tab is first; fall back while it is pending
let touched = false;
function renderTabs() {
const host = document.querySelector(".tabs");
host.innerHTML = LB.tabs.map((t, i) => `<button class="tab" type="button" role="tab" aria-selected="${i === tab}" data-t="${i}">` +
`<b>${esc(t.label)}</b><span>${esc(t.sub)}${t.rows ? "" : " · grading"}</span></button>`).join("");
host.querySelectorAll(".tab").forEach(b => b.addEventListener("click", () => { tab = +b.dataset.t; current = 0; touched = true; renderTabs(); renderLB(); }));
document.getElementById("lb-desc").textContent = LB.tabs[tab].desc;
}
function renderLB() {
const host = document.getElementById("lb"), T = LB.tabs[tab];
if (!T.rows) {
host.innerHTML = `<div class="status"><span class="dot"></span><b>Re-grading every model with Qwen3.8-27B is running.</b>
<p class="small muted" style="margin:8px 0 0">This tab fills in when all models are graded. The other tabs show the same models with the Qwen3-Next-80B judge and the paper's GPT-5 results.</p></div>`;
return;
}
const rows = T.rows.filter(FILTERS[current][1]).sort((a, b) => b.pink - a.pink);
const lo = Math.min(...T.rows.map(r => r.pink)) - 0.02, hi = Math.max(...T.rows.map(r => r.pink));
host.innerHTML = `<div class="controls" role="group" aria-label="Filter models">` +
FILTERS.map((f, i) => `<button class="chip" type="button" aria-pressed="${i === current}" data-i="${i}">${f[0]}</button>`).join("") + `</div>` +
`<div class="tbl-wrap"><table aria-label="Leaderboard"><thead><tr><th>#</th><th>Model</th><th class="num">Params</th><th>PINK ↑</th><th>95% CI</th><th>Over-correction</th><th class="num">Raw</th></tr></thead><tbody>` +
rows.map((r, i) => {
const name = r.url ? `<a href="${esc(r.url)}">${esc(r.name)}</a>` : esc(r.name);
const tag = r.source === "paper" ? `<span class="tag paper">paper</span>` : r.type === "OCR" ? `<span class="tag ocr">OCR</span>` : "";
const p = r.params == null ? "API" : r.params >= 1 ? r.params.toFixed(1) + "B" : Math.round(r.params * 1000) + "M";
return `<tr><td>${i + 1}</td><td>${name}${tag}${r.note ? ` <span class="muted small">${esc(r.note)}</span>` : ""}</td><td class="num">${p}</td>` +
`<td><div class="barcell"><span class="v">${r.pink.toFixed(3)}</span><span class="b" style="width:${bar(r.pink, lo, hi, 120)}px"></span></div></td>` +
`<td class="muted">${r.lo.toFixed(3)}–${r.hi.toFixed(3)}</td>` +
`<td><span class="oc"><span>${(r.oc * 100).toFixed(1)}%</span><span class="b" style="width:${Math.round(r.oc * 100)}px"></span></span></td>` +
`<td class="num">${r.raw.toFixed(3)}</td></tr>`;
}).join("") + (rows.length ? "" : `<tr><td colspan="7" class="muted">No model in this group for this judge.</td></tr>`) +
`</tbody></table></div>` +
`<ul class="notes" style="margin-top:12px">${T.notes.map(n => `<li>${esc(n)}</li>`).join("")}` +
`<li>Over-correction = share of samples with at least one over-corrected rubric component. Raw = score before the penalty, Σ model / Σ oracle. 95% CI: bootstrap over samples.</li></ul>`;
host.querySelectorAll(".chip").forEach(b => b.addEventListener("click", () => { current = +b.dataset.i; renderLB(); }));
}
renderTabs();
renderLB();
document.querySelectorAll("a[data-tab]").forEach(a => a.addEventListener("click", () => {
tab = Math.max(0, LB.tabs.findIndex(t => t.id === a.dataset.tab)); current = 0; touched = true; renderTabs(); renderLB();
}));
// The HF Space holds the living leaderboard: show its newer tables when it can be reached (the inline copy is the fallback).
fetch(LIVE, { cache: "no-cache" }).then(r => r.ok ? r.json() : null).then(d => {
if (!d || !Array.isArray(d.tabs) || (d.updated || "") < (LB.updated || "") || JSON.stringify(d) === JSON.stringify(LB)) return;
const id = LB.tabs[tab].id;
LB = d;
tab = Math.max(0, touched ? LB.tabs.findIndex(t => t.id === id) : LB.tabs.findIndex(t => t.rows));
document.querySelectorAll(".updated").forEach(e => { e.textContent = "updated " + LB.updated; });
renderTabs(); renderLB();
}).catch(() => {});
document.querySelectorAll(".copy").forEach(btn => btn.addEventListener("click", async () => {
const el = document.getElementById(btn.dataset.target);
try { await navigator.clipboard.writeText(el.innerText); btn.textContent = "Copied"; }
catch (e) { const r = document.createRange(); r.selectNodeContents(el); const s = getSelection(); s.removeAllRanges(); s.addRange(r); btn.textContent = "Selected"; }
setTimeout(() => { btn.textContent = "Copy"; }, 1600);
}));
</script>
</body>
</html>
|