Spaces:
Running
Running
Update index.html
Browse files- index.html +118 -156
index.html
CHANGED
|
@@ -7,24 +7,25 @@
|
|
| 7 |
<script src="https://cdn.jsdelivr.net/npm/chart.js@4"></script>
|
| 8 |
<style>
|
| 9 |
:root {
|
| 10 |
-
--bg: #
|
| 11 |
-
--bg2: #
|
| 12 |
--surface: rgba(255,255,255,0.035);
|
| 13 |
-
--
|
| 14 |
--border: rgba(255,255,255,0.08);
|
| 15 |
-
--
|
| 16 |
-
--text: #
|
| 17 |
-
--muted: #
|
| 18 |
-
--
|
| 19 |
-
--silver: #
|
| 20 |
-
--
|
| 21 |
-
--
|
| 22 |
-
--shadow: 0 24px 70px rgba(0,0,0,0.
|
| 23 |
--radius: 24px;
|
| 24 |
}
|
| 25 |
|
| 26 |
* { box-sizing: border-box; }
|
| 27 |
html { scroll-behavior: smooth; }
|
|
|
|
| 28 |
body {
|
| 29 |
margin: 0;
|
| 30 |
min-height: 100vh;
|
|
@@ -32,24 +33,20 @@
|
|
| 32 |
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
| 33 |
color: var(--text);
|
| 34 |
background:
|
| 35 |
-
radial-gradient(circle at top left, rgba(255,255,255,0.
|
| 36 |
radial-gradient(circle at bottom right, rgba(255,255,255,0.05), transparent 24%),
|
| 37 |
-
linear-gradient(180deg, #
|
| 38 |
}
|
| 39 |
|
| 40 |
.app {
|
| 41 |
-
max-width:
|
| 42 |
margin: 0 auto;
|
| 43 |
display: grid;
|
| 44 |
gap: 18px;
|
| 45 |
}
|
| 46 |
|
| 47 |
-
.hero,
|
| 48 |
-
|
| 49 |
-
.chart-card,
|
| 50 |
-
.list-card,
|
| 51 |
-
.info-card {
|
| 52 |
-
background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
|
| 53 |
border: 1px solid var(--border);
|
| 54 |
box-shadow: var(--shadow);
|
| 55 |
backdrop-filter: blur(12px);
|
|
@@ -58,20 +55,20 @@
|
|
| 58 |
.hero {
|
| 59 |
border-radius: calc(var(--radius) + 6px);
|
| 60 |
padding: 26px;
|
| 61 |
-
position: relative;
|
| 62 |
overflow: hidden;
|
|
|
|
| 63 |
}
|
| 64 |
|
| 65 |
.hero::after {
|
| 66 |
content: "";
|
| 67 |
position: absolute;
|
| 68 |
inset: 0;
|
| 69 |
-
background: linear-gradient(90deg, rgba(255,255,255,0.
|
| 70 |
pointer-events: none;
|
| 71 |
}
|
| 72 |
|
| 73 |
.eyebrow {
|
| 74 |
-
color: var(--
|
| 75 |
text-transform: uppercase;
|
| 76 |
letter-spacing: 0.22em;
|
| 77 |
font-size: 11px;
|
|
@@ -101,7 +98,7 @@
|
|
| 101 |
|
| 102 |
.layout {
|
| 103 |
display: grid;
|
| 104 |
-
grid-template-columns:
|
| 105 |
gap: 18px;
|
| 106 |
align-items: start;
|
| 107 |
}
|
|
@@ -113,10 +110,7 @@
|
|
| 113 |
top: 18px;
|
| 114 |
}
|
| 115 |
|
| 116 |
-
.panel h2,
|
| 117 |
-
.chart-card h2,
|
| 118 |
-
.list-card h2,
|
| 119 |
-
.info-card h2 {
|
| 120 |
margin: 0 0 14px;
|
| 121 |
font-size: 14px;
|
| 122 |
letter-spacing: 0.12em;
|
|
@@ -130,7 +124,7 @@
|
|
| 130 |
.section-label {
|
| 131 |
display: block;
|
| 132 |
margin-bottom: 10px;
|
| 133 |
-
color: var(--
|
| 134 |
font-size: 12px;
|
| 135 |
text-transform: uppercase;
|
| 136 |
letter-spacing: 0.12em;
|
|
@@ -142,8 +136,7 @@
|
|
| 142 |
gap: 8px;
|
| 143 |
}
|
| 144 |
|
| 145 |
-
button,
|
| 146 |
-
.chip {
|
| 147 |
border: 1px solid rgba(255,255,255,0.10);
|
| 148 |
background: rgba(255,255,255,0.03);
|
| 149 |
color: var(--muted);
|
|
@@ -156,21 +149,35 @@
|
|
| 156 |
user-select: none;
|
| 157 |
}
|
| 158 |
|
| 159 |
-
button:hover,
|
| 160 |
-
.chip:hover {
|
| 161 |
border-color: rgba(255,255,255,0.24);
|
| 162 |
color: var(--text);
|
| 163 |
transform: translateY(-1px);
|
| 164 |
}
|
| 165 |
|
| 166 |
-
button.active,
|
| 167 |
-
.chip.active {
|
| 168 |
color: #fafafa;
|
| 169 |
-
border-color: rgba(
|
| 170 |
-
background: linear-gradient(180deg, rgba(
|
| 171 |
box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset;
|
| 172 |
}
|
| 173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
.stat-grid {
|
| 175 |
display: grid;
|
| 176 |
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
@@ -186,7 +193,7 @@
|
|
| 186 |
}
|
| 187 |
|
| 188 |
.stat .k {
|
| 189 |
-
color: var(--
|
| 190 |
font-size: 11px;
|
| 191 |
text-transform: uppercase;
|
| 192 |
letter-spacing: 0.12em;
|
|
@@ -201,7 +208,7 @@
|
|
| 201 |
}
|
| 202 |
|
| 203 |
.small-note {
|
| 204 |
-
color: var(--
|
| 205 |
font-size: 12px;
|
| 206 |
line-height: 1.6;
|
| 207 |
margin-top: 10px;
|
|
@@ -211,8 +218,8 @@
|
|
| 211 |
border-radius: var(--radius);
|
| 212 |
padding: 18px 18px 12px;
|
| 213 |
min-height: 690px;
|
| 214 |
-
position: relative;
|
| 215 |
overflow: hidden;
|
|
|
|
| 216 |
}
|
| 217 |
|
| 218 |
.chart-top {
|
|
@@ -241,8 +248,8 @@
|
|
| 241 |
.badge {
|
| 242 |
padding: 9px 12px;
|
| 243 |
border-radius: 999px;
|
| 244 |
-
background: rgba(
|
| 245 |
-
border: 1px solid rgba(
|
| 246 |
color: var(--silver);
|
| 247 |
font-size: 13px;
|
| 248 |
white-space: nowrap;
|
|
@@ -256,48 +263,21 @@
|
|
| 256 |
gap: 10px;
|
| 257 |
padding: 9px 12px;
|
| 258 |
border-radius: 999px;
|
| 259 |
-
border: 1px solid rgba(
|
| 260 |
-
background: rgba(
|
| 261 |
-
color: #
|
| 262 |
font-size: 12px;
|
| 263 |
-
letter-spacing: 0.01em;
|
| 264 |
}
|
| 265 |
|
| 266 |
.callout .dot {
|
| 267 |
width: 9px;
|
| 268 |
height: 9px;
|
| 269 |
border-radius: 50%;
|
| 270 |
-
background: linear-gradient(180deg, #
|
| 271 |
box-shadow: 0 0 14px rgba(255,255,255,0.22);
|
| 272 |
flex: 0 0 auto;
|
| 273 |
}
|
| 274 |
|
| 275 |
-
.filters {
|
| 276 |
-
display: flex;
|
| 277 |
-
flex-wrap: wrap;
|
| 278 |
-
gap: 8px;
|
| 279 |
-
margin: 10px 0 16px;
|
| 280 |
-
}
|
| 281 |
-
|
| 282 |
-
.search {
|
| 283 |
-
width: min(100%, 420px);
|
| 284 |
-
border: 1px solid rgba(255,255,255,0.10);
|
| 285 |
-
background: rgba(255,255,255,0.03);
|
| 286 |
-
color: var(--text);
|
| 287 |
-
border-radius: 16px;
|
| 288 |
-
padding: 12px 14px;
|
| 289 |
-
outline: none;
|
| 290 |
-
font: inherit;
|
| 291 |
-
transition: border-color 0.15s ease, background 0.15s ease;
|
| 292 |
-
}
|
| 293 |
-
|
| 294 |
-
.search::placeholder { color: var(--muted-2); }
|
| 295 |
-
|
| 296 |
-
.search:focus {
|
| 297 |
-
border-color: rgba(224,226,232,0.28);
|
| 298 |
-
background: rgba(255,255,255,0.05);
|
| 299 |
-
}
|
| 300 |
-
|
| 301 |
canvas {
|
| 302 |
width: 100% !important;
|
| 303 |
height: 560px !important;
|
|
@@ -323,7 +303,7 @@
|
|
| 323 |
}
|
| 324 |
|
| 325 |
.info-card .label {
|
| 326 |
-
color: var(--
|
| 327 |
font-size: 11px;
|
| 328 |
text-transform: uppercase;
|
| 329 |
letter-spacing: 0.12em;
|
|
@@ -344,13 +324,13 @@
|
|
| 344 |
table {
|
| 345 |
width: 100%;
|
| 346 |
border-collapse: collapse;
|
| 347 |
-
min-width:
|
| 348 |
}
|
| 349 |
|
| 350 |
thead th {
|
| 351 |
position: sticky;
|
| 352 |
top: 0;
|
| 353 |
-
background: rgba(
|
| 354 |
backdrop-filter: blur(8px);
|
| 355 |
color: var(--muted);
|
| 356 |
text-align: left;
|
|
@@ -368,13 +348,11 @@
|
|
| 368 |
|
| 369 |
tbody tr {
|
| 370 |
border-bottom: 1px solid rgba(255,255,255,0.06);
|
| 371 |
-
transition: background 0.12s ease
|
| 372 |
cursor: pointer;
|
| 373 |
}
|
| 374 |
|
| 375 |
-
tbody tr:hover {
|
| 376 |
-
background: rgba(224,226,232,0.05);
|
| 377 |
-
}
|
| 378 |
|
| 379 |
tbody td {
|
| 380 |
padding: 13px 14px;
|
|
@@ -383,61 +361,43 @@
|
|
| 383 |
vertical-align: middle;
|
| 384 |
}
|
| 385 |
|
| 386 |
-
tbody td.muted {
|
| 387 |
-
|
| 388 |
-
}
|
| 389 |
-
|
| 390 |
-
.above {
|
| 391 |
-
color: #f2f2f6;
|
| 392 |
-
text-shadow: 0 0 10px rgba(255,255,255,0.08);
|
| 393 |
-
}
|
| 394 |
|
| 395 |
-
.
|
| 396 |
-
color: #8f949d;
|
| 397 |
-
}
|
| 398 |
-
|
| 399 |
-
.pill-up {
|
| 400 |
display: inline-flex;
|
| 401 |
align-items: center;
|
| 402 |
gap: 6px;
|
| 403 |
padding: 5px 10px;
|
| 404 |
border-radius: 999px;
|
| 405 |
-
border: 1px solid rgba(224,226,232,0.18);
|
| 406 |
-
background: rgba(224,226,232,0.08);
|
| 407 |
-
color: var(--silver);
|
| 408 |
font-size: 11px;
|
| 409 |
font-weight: 700;
|
| 410 |
letter-spacing: 0.03em;
|
| 411 |
}
|
| 412 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 413 |
.pill-down {
|
| 414 |
-
display: inline-flex;
|
| 415 |
-
align-items: center;
|
| 416 |
-
gap: 6px;
|
| 417 |
-
padding: 5px 10px;
|
| 418 |
-
border-radius: 999px;
|
| 419 |
border: 1px solid rgba(255,255,255,0.08);
|
| 420 |
background: rgba(255,255,255,0.03);
|
| 421 |
color: var(--muted);
|
| 422 |
-
font-size: 11px;
|
| 423 |
-
font-weight: 700;
|
| 424 |
-
letter-spacing: 0.03em;
|
| 425 |
}
|
| 426 |
|
| 427 |
.footer-note {
|
| 428 |
-
color: var(--
|
| 429 |
font-size: 12px;
|
| 430 |
line-height: 1.6;
|
| 431 |
padding-top: 2px;
|
| 432 |
}
|
| 433 |
|
| 434 |
@media (max-width: 1120px) {
|
| 435 |
-
.layout {
|
| 436 |
-
|
| 437 |
-
}
|
| 438 |
-
.panel {
|
| 439 |
-
position: static;
|
| 440 |
-
}
|
| 441 |
canvas { height: 520px !important; }
|
| 442 |
.info-grid { grid-template-columns: 1fr; }
|
| 443 |
}
|
|
@@ -491,7 +451,7 @@
|
|
| 491 |
<div class="section">
|
| 492 |
<span class="section-label">Legend</span>
|
| 493 |
<div class="small-note">
|
| 494 |
-
Silver points above the line are outperforming the size trend.
|
| 495 |
</div>
|
| 496 |
</div>
|
| 497 |
</aside>
|
|
@@ -553,21 +513,21 @@
|
|
| 553 |
</div>
|
| 554 |
|
| 555 |
<script>
|
|
|
|
|
|
|
| 556 |
const MODELS = [
|
| 557 |
{ name: 'SmolLM2-135M', org: 'HuggingFace', params: 135000000, arc_easy: 0.5858585858585859, arc_challenge: 0.2960750853242321, piqa: 0.6849836779107725, hellaswag: 0.43108942441744674, avg_4: 0.5177858993388165, url: 'https://huggingface.co/HuggingFaceTB/SmolLM2-135M' },
|
| 558 |
{ name: 'GPT-X2-125M', org: 'AxiomicLabs', params: 125081664, arc_easy: 0.5151515151515151, arc_challenge: 0.2764505119453925, piqa: 0.6751904243743199, hellaswag: 0.40529774945230035, avg_4: 0.4898234185711896, url: 'https://huggingface.co/AxiomicLabs/GPT-X2-125M' },
|
| 559 |
{ name: 'GPT-X-125M', org: 'AxiomicLabs', params: 124561728, arc_easy: 0.5075757575757576, arc_challenge: 0.2687713310580205, piqa: 0.6517954298150164, hellaswag: 0.36496713802031466, avg_4: 0.464060299783275, url: 'https://huggingface.co/AxiomicLabs/GPT-X-125M' },
|
| 560 |
-
{ name: 'MobileLLM-R1-140M-base', org: 'Facebook', params: 140000000, arc_easy: 0.4992424242424242, arc_challenge: 0.24744027303754265, piqa: 0.6322089227421109, hellaswag: 0.3384379853648824, avg_4: 0.
|
| 561 |
{ name: 'Supra-50M-Base', org: 'SupraLabs', params: 51786240, arc_easy: 0.460016835016835, arc_challenge: 0.25, piqa: 0.6207834602829162, hellaswag: 0.31776538538139815, avg_4: 0.4252144857313513, url: 'https://huggingface.co/SupraLabs/Supra-50M-Base' },
|
| 562 |
-
{ name: 'Shards-1', org: 'CompactAI', params: 54500000, arc_easy: 0.4112, arc_challenge: 0.2099, piqa: 0.5822, hellaswag: 0.2920, avg_4: 0.3698, url: 'https://huggingface.co/CompactAI-O/Shard-1' },
|
| 563 |
-
|
| 564 |
{ name: 'Supra-50M-Instruct', org: 'SupraLabs', params: 51786240, arc_easy: 0.4440, arc_challenge: 0.2730, piqa: 0.5947, hellaswag: 0.2909, avg_4: 0.4030, url: 'https://huggingface.co/SupraLabs/Supra-50M-Instruct' },
|
| 565 |
{ name: 'Supra-50M-Reasoning', org: 'SupraLabs', params: 51786240, arc_easy: 0.4444, arc_challenge: 0.2739, piqa: 0.5930, hellaswag: 0.2910, avg_4: 0.4006, url: 'https://huggingface.co/SupraLabs/Supra-50M-Reasoning' },
|
| 566 |
{ name: 'SmolLM-135M', org: 'HuggingFace', params: 135000000, arc_easy: 0.5631, arc_challenge: 0.2901, piqa: 0.6828, hellaswag: 0.4270, avg_4: 0.4908, url: 'https://huggingface.co/HuggingFaceTB/SmolLM-135M' },
|
| 567 |
{ name: 'OPT-125M', org: 'Facebook', params: 125000000, arc_easy: 0.4028, arc_challenge: 0.2270, piqa: 0.6224, hellaswag: 0.3131, avg_4: 0.3913, url: 'https://huggingface.co/facebook/opt-125m' },
|
| 568 |
{ name: 'GPT-2', org: 'OpenAI', params: 124000000, arc_easy: 0.3935, arc_challenge: 0.2235, piqa: 0.6208, hellaswag: 0.3126, avg_4: 0.3892, url: 'https://huggingface.co/openai-community/gpt2' },
|
| 569 |
-
{ name: 'Spark-5M-Base-v4', org: 'LH-Tech-AI', params: 5000000, arc_easy: 0.3316, arc_challenge: 0.2150, piqa: 0.5332, hellaswag: 0.2703, avg_4: 0.3250, url: 'https://huggingface.co/LH-Tech-AI/Spark-5M-Base-v4' },
|
| 570 |
|
|
|
|
| 571 |
{ name: 'Supra-Mini-v5-8M', org: 'SupraLabs', params: 7870000, arc_easy: 0.3321, arc_challenge: 0.2116, piqa: 0.5403, hellaswag: 0.2637, avg_4: 0.3219, url: 'https://huggingface.co/SupraLabs/Supra-Mini-v5-8M' },
|
| 572 |
{ name: 'Pythia-70M', org: 'EleutherAI', params: 70000000, arc_easy: 0.3165, arc_challenge: 0.2363, piqa: 0.5348, hellaswag: 0.2749, avg_4: 0.3657, url: 'https://huggingface.co/EleutherAI/pythia-70m' },
|
| 573 |
{ name: 'Supra-Mini-v4-2M', org: 'SupraLabs', params: 2620000, arc_easy: 0.3098, arc_challenge: 0.2150, piqa: 0.5190, hellaswag: 0.2552, avg_4: 0.3188, url: 'https://huggingface.co/SupraLabs/Supra-Mini-v4-2M' },
|
|
@@ -640,9 +600,9 @@
|
|
| 640 |
return String(n);
|
| 641 |
};
|
| 642 |
|
| 643 |
-
const toPct = (v) =>
|
| 644 |
|
| 645 |
-
|
| 646 |
const n = points.length;
|
| 647 |
let sumX = 0, sumY = 0, sumXY = 0, sumXX = 0;
|
| 648 |
for (const p of points) {
|
|
@@ -655,44 +615,39 @@
|
|
| 655 |
const slope = Math.abs(denom) < 1e-12 ? 0 : (n * sumXY - sumX * sumY) / denom;
|
| 656 |
const intercept = n ? (sumY - slope * sumX) / n : 0;
|
| 657 |
return { slope, intercept };
|
| 658 |
-
}
|
| 659 |
-
|
| 660 |
-
const getScore = (m, key) => (m[key] ?? null);
|
| 661 |
|
| 662 |
-
|
| 663 |
const q = activeSearch.trim().toLowerCase();
|
| 664 |
return MODELS.filter(m => {
|
| 665 |
-
const s =
|
| 666 |
-
if (s === null || !Number.isFinite(m.params)) return false;
|
| 667 |
if (!q) return true;
|
| 668 |
-
return (
|
| 669 |
-
m.name.toLowerCase().includes(q) ||
|
| 670 |
-
m.org.toLowerCase().includes(q)
|
| 671 |
-
);
|
| 672 |
});
|
| 673 |
-
}
|
| 674 |
|
| 675 |
-
|
| 676 |
const residuals = data.map(d => d.y - (slope * d.x + intercept));
|
| 677 |
const mse = residuals.reduce((a, b) => a + b * b, 0) / residuals.length;
|
| 678 |
const rmse = Math.sqrt(mse);
|
| 679 |
return { mse, rmse, residuals };
|
| 680 |
-
}
|
| 681 |
|
| 682 |
-
|
| 683 |
const box = document.getElementById('benchmarkButtons');
|
| 684 |
-
box.innerHTML = BENCHMARKS.map(b =>
|
| 685 |
-
|
| 686 |
-
).join('');
|
| 687 |
box.querySelectorAll('button').forEach(btn => {
|
| 688 |
btn.addEventListener('click', () => {
|
| 689 |
activeBenchmark = btn.dataset.key;
|
| 690 |
render();
|
| 691 |
});
|
| 692 |
});
|
| 693 |
-
}
|
| 694 |
|
| 695 |
-
|
| 696 |
const tbody = document.getElementById('modelTable');
|
| 697 |
const rows = [...data].sort((a, b) => {
|
| 698 |
if (sortKey === 'name') return a.name.localeCompare(b.name);
|
|
@@ -724,9 +679,9 @@
|
|
| 724 |
if (url) window.open(url, '_blank', 'noopener,noreferrer');
|
| 725 |
});
|
| 726 |
});
|
| 727 |
-
}
|
| 728 |
|
| 729 |
-
|
| 730 |
document.getElementById('statSlope').textContent = slope.toFixed(4);
|
| 731 |
document.getElementById('statIntercept').textContent = intercept.toFixed(2);
|
| 732 |
document.getElementById('statMSE').textContent = mse.toFixed(4);
|
|
@@ -735,18 +690,22 @@
|
|
| 735 |
document.getElementById('infoBenchmark').textContent = BENCHMARK_NAMES[activeBenchmark] || activeBenchmark;
|
| 736 |
document.getElementById('infoCount').textContent = String(count);
|
| 737 |
document.getElementById('infoLoss').textContent = `MSE ${mse.toFixed(4)} · RMSE ${rmse.toFixed(2)}`;
|
| 738 |
-
}
|
| 739 |
|
| 740 |
function render() {
|
| 741 |
renderBenchmarkButtons();
|
| 742 |
|
| 743 |
-
const
|
|
|
|
|
|
|
|
|
|
| 744 |
name: m.name,
|
| 745 |
org: m.org,
|
| 746 |
params: m.params,
|
| 747 |
score: toPct(m[activeBenchmark]),
|
| 748 |
url: m.url,
|
| 749 |
-
x: Math.log10(m.params)
|
|
|
|
| 750 |
}));
|
| 751 |
|
| 752 |
if (data.length < 2) {
|
|
@@ -754,17 +713,18 @@
|
|
| 754 |
document.getElementById('chartSub').textContent = 'Add more models or clear the search filter.';
|
| 755 |
document.getElementById('fitNote').textContent = 'Need at least 2 visible models to fit a line.';
|
| 756 |
document.getElementById('modelTable').innerHTML = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
| 757 |
if (chart) chart.destroy();
|
| 758 |
return;
|
| 759 |
}
|
| 760 |
|
| 761 |
-
const points = data.map(d => ({ x: d.x, y: d.
|
| 762 |
const { slope, intercept } = linearRegression(points);
|
| 763 |
const { mse, rmse, residuals } = computeLoss(data, slope, intercept);
|
| 764 |
-
|
| 765 |
-
data.forEach((d, i) => {
|
| 766 |
-
d.residual = residuals[i];
|
| 767 |
-
});
|
| 768 |
|
| 769 |
updateStats(slope, intercept, mse, rmse, data.length);
|
| 770 |
|
|
@@ -776,8 +736,8 @@
|
|
| 776 |
const yLow = slope * xLow + intercept;
|
| 777 |
const yHigh = slope * xHigh + intercept;
|
| 778 |
|
| 779 |
-
const yMin = Math.min(...data.map(d => d.
|
| 780 |
-
const yMax = Math.max(...data.map(d => d.
|
| 781 |
|
| 782 |
const titleMap = {
|
| 783 |
avg_4: 'Average score vs log parameters',
|
|
@@ -788,8 +748,10 @@
|
|
| 788 |
};
|
| 789 |
|
| 790 |
document.getElementById('chartTitle').textContent = titleMap[activeBenchmark] || 'Regression vs log parameters';
|
| 791 |
-
document.getElementById('chartSub').textContent =
|
| 792 |
-
|
|
|
|
|
|
|
| 793 |
|
| 794 |
renderTable(data);
|
| 795 |
|
|
@@ -818,18 +780,18 @@
|
|
| 818 |
},
|
| 819 |
{
|
| 820 |
label: 'Models',
|
| 821 |
-
data: data
|
| 822 |
parsing: false,
|
| 823 |
pointRadius: 7,
|
| 824 |
pointHoverRadius: 10,
|
| 825 |
-
pointHitRadius:
|
| 826 |
borderWidth: 1.5,
|
| 827 |
backgroundColor: (ctx) => {
|
| 828 |
const raw = ctx.raw;
|
| 829 |
if (!raw) return 'rgba(225, 226, 232, 0.86)';
|
| 830 |
return raw.residual >= 0
|
| 831 |
-
? 'rgba(
|
| 832 |
-
: 'rgba(
|
| 833 |
},
|
| 834 |
borderColor: (ctx) => {
|
| 835 |
const raw = ctx.raw;
|
|
@@ -862,7 +824,7 @@
|
|
| 862 |
plugins: {
|
| 863 |
legend: { display: false },
|
| 864 |
tooltip: {
|
| 865 |
-
backgroundColor: 'rgba(12,12,15,0.
|
| 866 |
borderColor: 'rgba(236,236,241,0.24)',
|
| 867 |
borderWidth: 1,
|
| 868 |
titleColor: '#ffffff',
|
|
|
|
| 7 |
<script src="https://cdn.jsdelivr.net/npm/chart.js@4"></script>
|
| 8 |
<style>
|
| 9 |
:root {
|
| 10 |
+
--bg: #050506;
|
| 11 |
+
--bg2: #0b0b0d;
|
| 12 |
--surface: rgba(255,255,255,0.035);
|
| 13 |
+
--surface2: rgba(255,255,255,0.06);
|
| 14 |
--border: rgba(255,255,255,0.08);
|
| 15 |
+
--border2: rgba(255,255,255,0.13);
|
| 16 |
+
--text: #f4f4f6;
|
| 17 |
+
--muted: #a3a3ad;
|
| 18 |
+
--muted2: #7d7d88;
|
| 19 |
+
--silver: #e5e7eb;
|
| 20 |
+
--silver2: #c8ccd5;
|
| 21 |
+
--silver3: #9ca3af;
|
| 22 |
+
--shadow: 0 24px 70px rgba(0,0,0,0.52);
|
| 23 |
--radius: 24px;
|
| 24 |
}
|
| 25 |
|
| 26 |
* { box-sizing: border-box; }
|
| 27 |
html { scroll-behavior: smooth; }
|
| 28 |
+
|
| 29 |
body {
|
| 30 |
margin: 0;
|
| 31 |
min-height: 100vh;
|
|
|
|
| 33 |
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
| 34 |
color: var(--text);
|
| 35 |
background:
|
| 36 |
+
radial-gradient(circle at top left, rgba(255,255,255,0.07), transparent 28%),
|
| 37 |
radial-gradient(circle at bottom right, rgba(255,255,255,0.05), transparent 24%),
|
| 38 |
+
linear-gradient(180deg, #070708 0%, #040405 100%);
|
| 39 |
}
|
| 40 |
|
| 41 |
.app {
|
| 42 |
+
max-width: 1460px;
|
| 43 |
margin: 0 auto;
|
| 44 |
display: grid;
|
| 45 |
gap: 18px;
|
| 46 |
}
|
| 47 |
|
| 48 |
+
.hero, .panel, .chart-card, .list-card, .info-card {
|
| 49 |
+
background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
border: 1px solid var(--border);
|
| 51 |
box-shadow: var(--shadow);
|
| 52 |
backdrop-filter: blur(12px);
|
|
|
|
| 55 |
.hero {
|
| 56 |
border-radius: calc(var(--radius) + 6px);
|
| 57 |
padding: 26px;
|
|
|
|
| 58 |
overflow: hidden;
|
| 59 |
+
position: relative;
|
| 60 |
}
|
| 61 |
|
| 62 |
.hero::after {
|
| 63 |
content: "";
|
| 64 |
position: absolute;
|
| 65 |
inset: 0;
|
| 66 |
+
background: linear-gradient(90deg, rgba(255,255,255,0.035), transparent 36%, rgba(255,255,255,0.02));
|
| 67 |
pointer-events: none;
|
| 68 |
}
|
| 69 |
|
| 70 |
.eyebrow {
|
| 71 |
+
color: var(--silver2);
|
| 72 |
text-transform: uppercase;
|
| 73 |
letter-spacing: 0.22em;
|
| 74 |
font-size: 11px;
|
|
|
|
| 98 |
|
| 99 |
.layout {
|
| 100 |
display: grid;
|
| 101 |
+
grid-template-columns: 334px minmax(0, 1fr);
|
| 102 |
gap: 18px;
|
| 103 |
align-items: start;
|
| 104 |
}
|
|
|
|
| 110 |
top: 18px;
|
| 111 |
}
|
| 112 |
|
| 113 |
+
.panel h2, .chart-card h2, .list-card h2, .info-card h2 {
|
|
|
|
|
|
|
|
|
|
| 114 |
margin: 0 0 14px;
|
| 115 |
font-size: 14px;
|
| 116 |
letter-spacing: 0.12em;
|
|
|
|
| 124 |
.section-label {
|
| 125 |
display: block;
|
| 126 |
margin-bottom: 10px;
|
| 127 |
+
color: var(--silver2);
|
| 128 |
font-size: 12px;
|
| 129 |
text-transform: uppercase;
|
| 130 |
letter-spacing: 0.12em;
|
|
|
|
| 136 |
gap: 8px;
|
| 137 |
}
|
| 138 |
|
| 139 |
+
button, .chip {
|
|
|
|
| 140 |
border: 1px solid rgba(255,255,255,0.10);
|
| 141 |
background: rgba(255,255,255,0.03);
|
| 142 |
color: var(--muted);
|
|
|
|
| 149 |
user-select: none;
|
| 150 |
}
|
| 151 |
|
| 152 |
+
button:hover, .chip:hover {
|
|
|
|
| 153 |
border-color: rgba(255,255,255,0.24);
|
| 154 |
color: var(--text);
|
| 155 |
transform: translateY(-1px);
|
| 156 |
}
|
| 157 |
|
| 158 |
+
button.active, .chip.active {
|
|
|
|
| 159 |
color: #fafafa;
|
| 160 |
+
border-color: rgba(229,231,235,0.48);
|
| 161 |
+
background: linear-gradient(180deg, rgba(229,231,235,0.18), rgba(229,231,235,0.08));
|
| 162 |
box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset;
|
| 163 |
}
|
| 164 |
|
| 165 |
+
.search {
|
| 166 |
+
width: 100%;
|
| 167 |
+
border: 1px solid rgba(255,255,255,0.10);
|
| 168 |
+
background: rgba(255,255,255,0.03);
|
| 169 |
+
color: var(--text);
|
| 170 |
+
border-radius: 16px;
|
| 171 |
+
padding: 12px 14px;
|
| 172 |
+
outline: none;
|
| 173 |
+
font: inherit;
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
.search:focus {
|
| 177 |
+
border-color: rgba(229,231,235,0.26);
|
| 178 |
+
background: rgba(255,255,255,0.05);
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
.stat-grid {
|
| 182 |
display: grid;
|
| 183 |
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
|
|
| 193 |
}
|
| 194 |
|
| 195 |
.stat .k {
|
| 196 |
+
color: var(--muted2);
|
| 197 |
font-size: 11px;
|
| 198 |
text-transform: uppercase;
|
| 199 |
letter-spacing: 0.12em;
|
|
|
|
| 208 |
}
|
| 209 |
|
| 210 |
.small-note {
|
| 211 |
+
color: var(--muted2);
|
| 212 |
font-size: 12px;
|
| 213 |
line-height: 1.6;
|
| 214 |
margin-top: 10px;
|
|
|
|
| 218 |
border-radius: var(--radius);
|
| 219 |
padding: 18px 18px 12px;
|
| 220 |
min-height: 690px;
|
|
|
|
| 221 |
overflow: hidden;
|
| 222 |
+
position: relative;
|
| 223 |
}
|
| 224 |
|
| 225 |
.chart-top {
|
|
|
|
| 248 |
.badge {
|
| 249 |
padding: 9px 12px;
|
| 250 |
border-radius: 999px;
|
| 251 |
+
background: rgba(229,231,235,0.08);
|
| 252 |
+
border: 1px solid rgba(229,231,235,0.16);
|
| 253 |
color: var(--silver);
|
| 254 |
font-size: 13px;
|
| 255 |
white-space: nowrap;
|
|
|
|
| 263 |
gap: 10px;
|
| 264 |
padding: 9px 12px;
|
| 265 |
border-radius: 999px;
|
| 266 |
+
border: 1px solid rgba(229,231,235,0.16);
|
| 267 |
+
background: rgba(229,231,235,0.06);
|
| 268 |
+
color: #f2f2f6;
|
| 269 |
font-size: 12px;
|
|
|
|
| 270 |
}
|
| 271 |
|
| 272 |
.callout .dot {
|
| 273 |
width: 9px;
|
| 274 |
height: 9px;
|
| 275 |
border-radius: 50%;
|
| 276 |
+
background: linear-gradient(180deg, #fafafa, #bcc2cc);
|
| 277 |
box-shadow: 0 0 14px rgba(255,255,255,0.22);
|
| 278 |
flex: 0 0 auto;
|
| 279 |
}
|
| 280 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 281 |
canvas {
|
| 282 |
width: 100% !important;
|
| 283 |
height: 560px !important;
|
|
|
|
| 303 |
}
|
| 304 |
|
| 305 |
.info-card .label {
|
| 306 |
+
color: var(--muted2);
|
| 307 |
font-size: 11px;
|
| 308 |
text-transform: uppercase;
|
| 309 |
letter-spacing: 0.12em;
|
|
|
|
| 324 |
table {
|
| 325 |
width: 100%;
|
| 326 |
border-collapse: collapse;
|
| 327 |
+
min-width: 980px;
|
| 328 |
}
|
| 329 |
|
| 330 |
thead th {
|
| 331 |
position: sticky;
|
| 332 |
top: 0;
|
| 333 |
+
background: rgba(8,8,10,0.96);
|
| 334 |
backdrop-filter: blur(8px);
|
| 335 |
color: var(--muted);
|
| 336 |
text-align: left;
|
|
|
|
| 348 |
|
| 349 |
tbody tr {
|
| 350 |
border-bottom: 1px solid rgba(255,255,255,0.06);
|
| 351 |
+
transition: background 0.12s ease;
|
| 352 |
cursor: pointer;
|
| 353 |
}
|
| 354 |
|
| 355 |
+
tbody tr:hover { background: rgba(229,231,235,0.05); }
|
|
|
|
|
|
|
| 356 |
|
| 357 |
tbody td {
|
| 358 |
padding: 13px 14px;
|
|
|
|
| 361 |
vertical-align: middle;
|
| 362 |
}
|
| 363 |
|
| 364 |
+
tbody td.muted { color: var(--muted); }
|
| 365 |
+
.above { color: #f2f2f7; }
|
| 366 |
+
.below { color: #8f949d; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 367 |
|
| 368 |
+
.pill-up, .pill-down {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 369 |
display: inline-flex;
|
| 370 |
align-items: center;
|
| 371 |
gap: 6px;
|
| 372 |
padding: 5px 10px;
|
| 373 |
border-radius: 999px;
|
|
|
|
|
|
|
|
|
|
| 374 |
font-size: 11px;
|
| 375 |
font-weight: 700;
|
| 376 |
letter-spacing: 0.03em;
|
| 377 |
}
|
| 378 |
|
| 379 |
+
.pill-up {
|
| 380 |
+
border: 1px solid rgba(229,231,235,0.18);
|
| 381 |
+
background: rgba(229,231,235,0.08);
|
| 382 |
+
color: var(--silver);
|
| 383 |
+
}
|
| 384 |
+
|
| 385 |
.pill-down {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 386 |
border: 1px solid rgba(255,255,255,0.08);
|
| 387 |
background: rgba(255,255,255,0.03);
|
| 388 |
color: var(--muted);
|
|
|
|
|
|
|
|
|
|
| 389 |
}
|
| 390 |
|
| 391 |
.footer-note {
|
| 392 |
+
color: var(--muted2);
|
| 393 |
font-size: 12px;
|
| 394 |
line-height: 1.6;
|
| 395 |
padding-top: 2px;
|
| 396 |
}
|
| 397 |
|
| 398 |
@media (max-width: 1120px) {
|
| 399 |
+
.layout { grid-template-columns: 1fr; }
|
| 400 |
+
.panel { position: static; }
|
|
|
|
|
|
|
|
|
|
|
|
|
| 401 |
canvas { height: 520px !important; }
|
| 402 |
.info-grid { grid-template-columns: 1fr; }
|
| 403 |
}
|
|
|
|
| 451 |
<div class="section">
|
| 452 |
<span class="section-label">Legend</span>
|
| 453 |
<div class="small-note">
|
| 454 |
+
Silver points above the line are outperforming the size trend. Darker gray points are below it.
|
| 455 |
</div>
|
| 456 |
</div>
|
| 457 |
</aside>
|
|
|
|
| 513 |
</div>
|
| 514 |
|
| 515 |
<script>
|
| 516 |
+
// Use x/y for scatter points. That is the important fix.
|
| 517 |
+
// Add more models by copying one object and changing the fields.
|
| 518 |
const MODELS = [
|
| 519 |
{ name: 'SmolLM2-135M', org: 'HuggingFace', params: 135000000, arc_easy: 0.5858585858585859, arc_challenge: 0.2960750853242321, piqa: 0.6849836779107725, hellaswag: 0.43108942441744674, avg_4: 0.5177858993388165, url: 'https://huggingface.co/HuggingFaceTB/SmolLM2-135M' },
|
| 520 |
{ name: 'GPT-X2-125M', org: 'AxiomicLabs', params: 125081664, arc_easy: 0.5151515151515151, arc_challenge: 0.2764505119453925, piqa: 0.6751904243743199, hellaswag: 0.40529774945230035, avg_4: 0.4898234185711896, url: 'https://huggingface.co/AxiomicLabs/GPT-X2-125M' },
|
| 521 |
{ name: 'GPT-X-125M', org: 'AxiomicLabs', params: 124561728, arc_easy: 0.5075757575757576, arc_challenge: 0.2687713310580205, piqa: 0.6517954298150164, hellaswag: 0.36496713802031466, avg_4: 0.464060299783275, url: 'https://huggingface.co/AxiomicLabs/GPT-X-125M' },
|
| 522 |
+
{ name: 'MobileLLM-R1-140M-base', org: 'Facebook', params: 140000000, arc_easy: 0.4992424242424242, arc_challenge: 0.24744027303754265, piqa: 0.6322089227421109, hellaswag: 0.3384379853648824, avg_4: 0.44383, url: 'https://huggingface.co/facebook/MobileLLM-R1-140M-base' },
|
| 523 |
{ name: 'Supra-50M-Base', org: 'SupraLabs', params: 51786240, arc_easy: 0.460016835016835, arc_challenge: 0.25, piqa: 0.6207834602829162, hellaswag: 0.31776538538139815, avg_4: 0.4252144857313513, url: 'https://huggingface.co/SupraLabs/Supra-50M-Base' },
|
|
|
|
|
|
|
| 524 |
{ name: 'Supra-50M-Instruct', org: 'SupraLabs', params: 51786240, arc_easy: 0.4440, arc_challenge: 0.2730, piqa: 0.5947, hellaswag: 0.2909, avg_4: 0.4030, url: 'https://huggingface.co/SupraLabs/Supra-50M-Instruct' },
|
| 525 |
{ name: 'Supra-50M-Reasoning', org: 'SupraLabs', params: 51786240, arc_easy: 0.4444, arc_challenge: 0.2739, piqa: 0.5930, hellaswag: 0.2910, avg_4: 0.4006, url: 'https://huggingface.co/SupraLabs/Supra-50M-Reasoning' },
|
| 526 |
{ name: 'SmolLM-135M', org: 'HuggingFace', params: 135000000, arc_easy: 0.5631, arc_challenge: 0.2901, piqa: 0.6828, hellaswag: 0.4270, avg_4: 0.4908, url: 'https://huggingface.co/HuggingFaceTB/SmolLM-135M' },
|
| 527 |
{ name: 'OPT-125M', org: 'Facebook', params: 125000000, arc_easy: 0.4028, arc_challenge: 0.2270, piqa: 0.6224, hellaswag: 0.3131, avg_4: 0.3913, url: 'https://huggingface.co/facebook/opt-125m' },
|
| 528 |
{ name: 'GPT-2', org: 'OpenAI', params: 124000000, arc_easy: 0.3935, arc_challenge: 0.2235, piqa: 0.6208, hellaswag: 0.3126, avg_4: 0.3892, url: 'https://huggingface.co/openai-community/gpt2' },
|
|
|
|
| 529 |
|
| 530 |
+
{ name: 'Spark-5M-Base-v4', org: 'LH-Tech-AI', params: 5000000, arc_easy: 0.3316, arc_challenge: 0.2150, piqa: 0.5332, hellaswag: 0.2703, avg_4: 0.3250, url: 'https://huggingface.co/LH-Tech-AI/Spark-5M-Base-v4' },
|
| 531 |
{ name: 'Supra-Mini-v5-8M', org: 'SupraLabs', params: 7870000, arc_easy: 0.3321, arc_challenge: 0.2116, piqa: 0.5403, hellaswag: 0.2637, avg_4: 0.3219, url: 'https://huggingface.co/SupraLabs/Supra-Mini-v5-8M' },
|
| 532 |
{ name: 'Pythia-70M', org: 'EleutherAI', params: 70000000, arc_easy: 0.3165, arc_challenge: 0.2363, piqa: 0.5348, hellaswag: 0.2749, avg_4: 0.3657, url: 'https://huggingface.co/EleutherAI/pythia-70m' },
|
| 533 |
{ name: 'Supra-Mini-v4-2M', org: 'SupraLabs', params: 2620000, arc_easy: 0.3098, arc_challenge: 0.2150, piqa: 0.5190, hellaswag: 0.2552, avg_4: 0.3188, url: 'https://huggingface.co/SupraLabs/Supra-Mini-v4-2M' },
|
|
|
|
| 600 |
return String(n);
|
| 601 |
};
|
| 602 |
|
| 603 |
+
const toPct = (v) => v * 100;
|
| 604 |
|
| 605 |
+
function linearRegression(points) {
|
| 606 |
const n = points.length;
|
| 607 |
let sumX = 0, sumY = 0, sumXY = 0, sumXX = 0;
|
| 608 |
for (const p of points) {
|
|
|
|
| 615 |
const slope = Math.abs(denom) < 1e-12 ? 0 : (n * sumXY - sumX * sumY) / denom;
|
| 616 |
const intercept = n ? (sumY - slope * sumX) / n : 0;
|
| 617 |
return { slope, intercept };
|
| 618 |
+
}
|
|
|
|
|
|
|
| 619 |
|
| 620 |
+
function getVisibleModels() {
|
| 621 |
const q = activeSearch.trim().toLowerCase();
|
| 622 |
return MODELS.filter(m => {
|
| 623 |
+
const s = m[activeBenchmark];
|
| 624 |
+
if (s === null || s === undefined || !Number.isFinite(m.params)) return false;
|
| 625 |
if (!q) return true;
|
| 626 |
+
return m.name.toLowerCase().includes(q) || m.org.toLowerCase().includes(q);
|
|
|
|
|
|
|
|
|
|
| 627 |
});
|
| 628 |
+
}
|
| 629 |
|
| 630 |
+
function computeLoss(data, slope, intercept) {
|
| 631 |
const residuals = data.map(d => d.y - (slope * d.x + intercept));
|
| 632 |
const mse = residuals.reduce((a, b) => a + b * b, 0) / residuals.length;
|
| 633 |
const rmse = Math.sqrt(mse);
|
| 634 |
return { mse, rmse, residuals };
|
| 635 |
+
}
|
| 636 |
|
| 637 |
+
function renderBenchmarkButtons() {
|
| 638 |
const box = document.getElementById('benchmarkButtons');
|
| 639 |
+
box.innerHTML = BENCHMARKS.map(b => `
|
| 640 |
+
<button class="${b.key === activeBenchmark ? 'active' : ''}" data-key="${b.key}">${b.label}</button>
|
| 641 |
+
`).join('');
|
| 642 |
box.querySelectorAll('button').forEach(btn => {
|
| 643 |
btn.addEventListener('click', () => {
|
| 644 |
activeBenchmark = btn.dataset.key;
|
| 645 |
render();
|
| 646 |
});
|
| 647 |
});
|
| 648 |
+
}
|
| 649 |
|
| 650 |
+
function renderTable(data) {
|
| 651 |
const tbody = document.getElementById('modelTable');
|
| 652 |
const rows = [...data].sort((a, b) => {
|
| 653 |
if (sortKey === 'name') return a.name.localeCompare(b.name);
|
|
|
|
| 679 |
if (url) window.open(url, '_blank', 'noopener,noreferrer');
|
| 680 |
});
|
| 681 |
});
|
| 682 |
+
}
|
| 683 |
|
| 684 |
+
function updateStats(slope, intercept, mse, rmse, count) {
|
| 685 |
document.getElementById('statSlope').textContent = slope.toFixed(4);
|
| 686 |
document.getElementById('statIntercept').textContent = intercept.toFixed(2);
|
| 687 |
document.getElementById('statMSE').textContent = mse.toFixed(4);
|
|
|
|
| 690 |
document.getElementById('infoBenchmark').textContent = BENCHMARK_NAMES[activeBenchmark] || activeBenchmark;
|
| 691 |
document.getElementById('infoCount').textContent = String(count);
|
| 692 |
document.getElementById('infoLoss').textContent = `MSE ${mse.toFixed(4)} · RMSE ${rmse.toFixed(2)}`;
|
| 693 |
+
}
|
| 694 |
|
| 695 |
function render() {
|
| 696 |
renderBenchmarkButtons();
|
| 697 |
|
| 698 |
+
const models = getVisibleModels();
|
| 699 |
+
|
| 700 |
+
// IMPORTANT: scatter data must use x/y, not x/score.
|
| 701 |
+
const data = models.map(m => ({
|
| 702 |
name: m.name,
|
| 703 |
org: m.org,
|
| 704 |
params: m.params,
|
| 705 |
score: toPct(m[activeBenchmark]),
|
| 706 |
url: m.url,
|
| 707 |
+
x: Math.log10(m.params),
|
| 708 |
+
y: toPct(m[activeBenchmark])
|
| 709 |
}));
|
| 710 |
|
| 711 |
if (data.length < 2) {
|
|
|
|
| 713 |
document.getElementById('chartSub').textContent = 'Add more models or clear the search filter.';
|
| 714 |
document.getElementById('fitNote').textContent = 'Need at least 2 visible models to fit a line.';
|
| 715 |
document.getElementById('modelTable').innerHTML = '';
|
| 716 |
+
document.getElementById('countBadge').textContent = `${data.length} models`;
|
| 717 |
+
document.getElementById('infoBenchmark').textContent = BENCHMARK_NAMES[activeBenchmark] || activeBenchmark;
|
| 718 |
+
document.getElementById('infoCount').textContent = String(data.length);
|
| 719 |
+
document.getElementById('infoLoss').textContent = '—';
|
| 720 |
if (chart) chart.destroy();
|
| 721 |
return;
|
| 722 |
}
|
| 723 |
|
| 724 |
+
const points = data.map(d => ({ x: d.x, y: d.y }));
|
| 725 |
const { slope, intercept } = linearRegression(points);
|
| 726 |
const { mse, rmse, residuals } = computeLoss(data, slope, intercept);
|
| 727 |
+
data.forEach((d, i) => { d.residual = residuals[i]; });
|
|
|
|
|
|
|
|
|
|
| 728 |
|
| 729 |
updateStats(slope, intercept, mse, rmse, data.length);
|
| 730 |
|
|
|
|
| 736 |
const yLow = slope * xLow + intercept;
|
| 737 |
const yHigh = slope * xHigh + intercept;
|
| 738 |
|
| 739 |
+
const yMin = Math.min(...data.map(d => d.y), yLow) - 1.8;
|
| 740 |
+
const yMax = Math.max(...data.map(d => d.y), yHigh) + 1.8;
|
| 741 |
|
| 742 |
const titleMap = {
|
| 743 |
avg_4: 'Average score vs log parameters',
|
|
|
|
| 748 |
};
|
| 749 |
|
| 750 |
document.getElementById('chartTitle').textContent = titleMap[activeBenchmark] || 'Regression vs log parameters';
|
| 751 |
+
document.getElementById('chartSub').textContent =
|
| 752 |
+
`Silver dotted regression line on ${BENCHMARK_NAMES[activeBenchmark] || activeBenchmark}. Hover for model names, click to open model pages.`;
|
| 753 |
+
document.getElementById('fitNote').textContent =
|
| 754 |
+
`Regression loss for ${BENCHMARK_NAMES[activeBenchmark] || activeBenchmark}: MSE ${mse.toFixed(4)} · RMSE ${rmse.toFixed(2)}.`;
|
| 755 |
|
| 756 |
renderTable(data);
|
| 757 |
|
|
|
|
| 780 |
},
|
| 781 |
{
|
| 782 |
label: 'Models',
|
| 783 |
+
data: data,
|
| 784 |
parsing: false,
|
| 785 |
pointRadius: 7,
|
| 786 |
pointHoverRadius: 10,
|
| 787 |
+
pointHitRadius: 14,
|
| 788 |
borderWidth: 1.5,
|
| 789 |
backgroundColor: (ctx) => {
|
| 790 |
const raw = ctx.raw;
|
| 791 |
if (!raw) return 'rgba(225, 226, 232, 0.86)';
|
| 792 |
return raw.residual >= 0
|
| 793 |
+
? 'rgba(244, 245, 248, 0.98)'
|
| 794 |
+
: 'rgba(144, 148, 156, 0.95)';
|
| 795 |
},
|
| 796 |
borderColor: (ctx) => {
|
| 797 |
const raw = ctx.raw;
|
|
|
|
| 824 |
plugins: {
|
| 825 |
legend: { display: false },
|
| 826 |
tooltip: {
|
| 827 |
+
backgroundColor: 'rgba(12,12,15,0.98)',
|
| 828 |
borderColor: 'rgba(236,236,241,0.24)',
|
| 829 |
borderWidth: 1,
|
| 830 |
titleColor: '#ffffff',
|