- load_weights: run the strict missing-parameter check only for unquantized models; vLLM's loader checks quantized ones and knows the params a checkpoint cannot carry (online-FP8 weight_scale). BF16 output unchanged. - tests: variant launcher, greedy and quality comparisons, BetterBench table + ITL 1% low recompute, Discord notify helper. - NOTES: round 2 (eager vs default vs FULL_DECODE_ONLY, default kept) and round 3 (FP8 W8A16: +49% decode, +35% @8, answers unchanged); llama-swap snippet now FP8. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
511 lines
32 KiB
HTML
511 lines
32 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>BetterBench — lfm3-1.7b</title>
|
|
<style>
|
|
:root {
|
|
color-scheme: light;
|
|
--page:#f9f9f7; --surface:#fcfcfb;
|
|
--ink:#0b0b0b; --ink-2:#52514e; --muted:#898781;
|
|
--grid:#e1e0d9; --axis:#c3c2b7; --border:rgba(11,11,11,0.10);
|
|
--s1:#2a78d6; --s2:#eb6834;
|
|
--s1-mid:#86b6ef; --s1-soft:rgba(42,120,214,0.13);
|
|
--tip-bg:#ffffff;
|
|
--sans:system-ui,-apple-system,"Segoe UI",sans-serif;
|
|
--mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
|
|
}
|
|
@media (prefers-color-scheme: dark) {
|
|
:root:not([data-theme="light"]) {
|
|
color-scheme: dark;
|
|
--page:#0d0d0d; --surface:#1a1a19;
|
|
--ink:#ffffff; --ink-2:#c3c2b7; --muted:#898781;
|
|
--grid:#2c2c2a; --axis:#383835; --border:rgba(255,255,255,0.10);
|
|
--s1:#3987e5; --s2:#d95926;
|
|
--s1-mid:#256abf; --s1-soft:rgba(57,135,229,0.16);
|
|
--tip-bg:#232322;
|
|
}
|
|
}
|
|
:root[data-theme="dark"] {
|
|
color-scheme: dark;
|
|
--page:#0d0d0d; --surface:#1a1a19;
|
|
--ink:#ffffff; --ink-2:#c3c2b7; --muted:#898781;
|
|
--grid:#2c2c2a; --axis:#383835; --border:rgba(255,255,255,0.10);
|
|
--s1:#3987e5; --s2:#d95926;
|
|
--s1-mid:#256abf; --s1-soft:rgba(57,135,229,0.16);
|
|
--tip-bg:#232322;
|
|
}
|
|
|
|
* { box-sizing:border-box; }
|
|
body { background:var(--page); color:var(--ink); font-family:var(--sans);
|
|
line-height:1.55; margin:0; padding:32px 20px 72px; }
|
|
.wrap { max-width:1080px; margin:0 auto; display:flex; flex-direction:column; gap:26px; }
|
|
|
|
header { display:flex; flex-direction:column; gap:13px; }
|
|
.eyebrow { font-family:var(--mono); font-size:11px; letter-spacing:.13em;
|
|
text-transform:uppercase; color:var(--muted); }
|
|
h1 { font-size:clamp(26px,4vw,36px); line-height:1.12; margin:0;
|
|
letter-spacing:-.02em; text-wrap:balance; }
|
|
.runbar { display:flex; flex-wrap:wrap; gap:8px; }
|
|
.chip { font-family:var(--mono); font-size:12px; color:var(--ink-2);
|
|
border:1px solid var(--border); border-radius:6px; padding:4px 9px;
|
|
background:var(--surface); display:inline-flex; align-items:center; gap:7px; }
|
|
.chip code { font-family:var(--mono); font-size:12px; }
|
|
.swatch { width:9px; height:9px; border-radius:2px; flex:none; }
|
|
|
|
.thin { color:var(--muted); cursor:help; font-weight:400; padding-left:1px; }
|
|
.tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:13px; }
|
|
.tile { background:var(--surface); border:1px solid var(--border); border-radius:10px;
|
|
padding:15px 16px; display:flex; flex-direction:column; gap:4px; }
|
|
.tile .label { font-family:var(--mono); font-size:10.5px; letter-spacing:.1em;
|
|
text-transform:uppercase; color:var(--muted); }
|
|
.tile .val { font-size:26px; font-weight:600; letter-spacing:-.02em; line-height:1.15; }
|
|
.tile .val small { font-size:14px; font-weight:400; color:var(--ink-2); letter-spacing:0; }
|
|
.tile .sub { font-family:var(--mono); font-size:11.5px; color:var(--muted); }
|
|
|
|
figure { margin:0; background:var(--surface); border:1px solid var(--border);
|
|
border-radius:10px; padding:18px 18px 14px;
|
|
display:flex; flex-direction:column; gap:2px; }
|
|
figcaption { display:flex; flex-direction:column; gap:3px; margin-bottom:8px; }
|
|
figcaption .t { font-size:15.5px; font-weight:600; letter-spacing:-.01em; }
|
|
figcaption .d { font-size:13px; color:var(--ink-2); max-width:76ch; }
|
|
.legend { display:flex; gap:16px; flex-wrap:wrap; margin:2px 0 10px; }
|
|
.legend span { font-family:var(--mono); font-size:12px; color:var(--ink-2);
|
|
display:inline-flex; align-items:center; gap:6px; }
|
|
.chartbox { position:relative; width:100%; }
|
|
.chartbox svg { display:block; width:100%; height:auto; overflow:visible; }
|
|
.note { font-size:12.5px; color:var(--muted); margin:9px 0 0; }
|
|
|
|
text { font-family:var(--mono); }
|
|
.tick { font-size:10.5px; fill:var(--muted); }
|
|
.axtitle { font-size:10.5px; fill:var(--muted); letter-spacing:.08em; }
|
|
.dlabel { font-size:11px; font-weight:600; }
|
|
.gridline { stroke:var(--grid); stroke-width:1; }
|
|
.baseline { stroke:var(--axis); stroke-width:1; }
|
|
.refline { stroke:var(--muted); stroke-width:1; stroke-dasharray:4 4; }
|
|
.cross { stroke:var(--axis); stroke-width:1; stroke-dasharray:3 3; }
|
|
|
|
.tip { position:absolute; pointer-events:none; opacity:0; transition:opacity .1s ease;
|
|
z-index:5; background:var(--tip-bg); border:1px solid var(--border);
|
|
border-radius:7px; padding:8px 10px; box-shadow:0 3px 14px rgba(0,0,0,.13);
|
|
font-family:var(--mono); font-size:11.5px; color:var(--ink);
|
|
white-space:nowrap; min-width:132px; }
|
|
.tip .th { color:var(--muted); font-size:10px; letter-spacing:.08em;
|
|
text-transform:uppercase; margin-bottom:5px; }
|
|
.tip .row { display:flex; align-items:center; gap:10px; justify-content:space-between; }
|
|
.tip .nm { display:inline-flex; align-items:center; gap:6px; color:var(--ink-2); }
|
|
.tip b { font-weight:600; }
|
|
|
|
details { background:var(--surface); border:1px solid var(--border);
|
|
border-radius:10px; padding:0 18px; }
|
|
summary { cursor:pointer; padding:15px 0; font-size:14.5px; font-weight:600;
|
|
list-style:none; display:flex; align-items:center; gap:9px; }
|
|
summary::-webkit-details-marker { display:none; }
|
|
summary::before { content:"\25B8"; color:var(--muted); font-family:var(--mono); }
|
|
details[open] summary::before { content:"\25BE"; }
|
|
summary:focus-visible { outline:2px solid var(--s1); outline-offset:3px; border-radius:4px; }
|
|
.tscroll { overflow-x:auto; padding-bottom:14px; }
|
|
table { border-collapse:collapse; width:100%; font-size:12.5px; font-family:var(--mono);
|
|
font-variant-numeric:tabular-nums; margin-bottom:10px; }
|
|
caption { text-align:left; font-family:var(--sans); font-size:13px; color:var(--ink-2);
|
|
padding:10px 0 8px; }
|
|
th, td { padding:6px 11px 6px 0; text-align:right; white-space:nowrap; }
|
|
th:first-child, td:first-child { text-align:left; }
|
|
thead th { color:var(--muted); font-weight:500; font-size:10.5px; letter-spacing:.07em;
|
|
text-transform:uppercase; border-bottom:1px solid var(--axis); }
|
|
tbody tr + tr td { border-top:1px solid var(--grid); }
|
|
tbody td:first-child { color:var(--ink-2); }
|
|
|
|
footer { font-size:12.5px; color:var(--muted); border-top:1px solid var(--border);
|
|
padding-top:16px; }
|
|
footer code { font-family:var(--mono); font-size:12px; color:var(--ink-2); }
|
|
noscript p { font-size:13px; color:var(--ink-2); }
|
|
@media (prefers-reduced-motion: reduce) { * { transition:none !important; } }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="wrap">
|
|
<header>
|
|
<div class="eyebrow">BetterBench 0.6.1 · 29 Oct 2026 · 00:08 · llm</div>
|
|
<h1>lfm3-1.7b</h1>
|
|
<div class="runbar"><span class="chip"><span class="swatch" style="background:var(--s1)"></span>lfm3-1.7b</span><span class="chip"><code>http://127.0.0.1:8001/v1</code></span><span class="chip">corpus v1.0</span><span class="chip">5 passes/cat</span><span class="chip">temp 0.7</span><span class="chip">cold prefix cache (nonce)</span><span class="chip">32,768 tok context</span><span class="chip"><span class="swatch" style="background:var(--s2)"></span>variant: eager</span><span class="chip"><span class="swatch" style="background:var(--s2)"></span>flags: --enforce-eager</span></div>
|
|
</header>
|
|
<section class="tiles">
|
|
<div class="tile">
|
|
<span class="label">Combined decode</span>
|
|
<span class="val">29.5 <small>t/s</small></span>
|
|
<span class="sub">weighted across categories</span>
|
|
</div>
|
|
<div class="tile">
|
|
<span class="label">Combined update p99</span>
|
|
<span class="val">38.8 <small>ms</small></span>
|
|
<span class="sub">the stutter between stream updates</span>
|
|
</div>
|
|
<div class="tile">
|
|
<span class="label">Combined TTFT p50</span>
|
|
<span class="val">125 <small>ms</small></span>
|
|
<span class="sub">single-stream, batch = 1</span>
|
|
</div>
|
|
<div class="tile">
|
|
<span class="label">Aggregate @ 8 concurrent</span>
|
|
<span class="val">190.9 <small>t/s</small></span>
|
|
<span class="sub">48/48 ok</span>
|
|
</div>
|
|
<div class="tile">
|
|
<span class="label">Prefill @ 32,000 tok</span>
|
|
<span class="val">16,502 <small>t/s</small></span>
|
|
<span class="sub">median prompt processing</span>
|
|
</div>
|
|
</section>
|
|
<noscript><p>Charts need JavaScript — the full numbers are in the tables below.</p></noscript>
|
|
<figure>
|
|
<figcaption>
|
|
<span class="t">Decode throughput by category</span>
|
|
<span class="d">Median per-pass decode t/s at batch = 1, 5 passes per category. The dashed line is the weighted combined score.</span>
|
|
</figcaption>
|
|
|
|
<div class="chartbox" id="cb-decode"></div>
|
|
<p class="note">Hover a bar for its IQR and coefficient of variation — a high CV means the category's passes disagree, so read small differences there with care.</p>
|
|
</figure>
|
|
<figure>
|
|
<figcaption>
|
|
<span class="t">Stream-update gap by category</span>
|
|
<span class="d">This server packs several tokens into one stream update, so there is no per-token latency to plot. These are the measured wall-clock gaps between updates: p50 is the typical rhythm, p99 the stutter. Lower is better.</span>
|
|
</figcaption>
|
|
<div class="legend"><span><span class="swatch" style="background:var(--s1)"></span>update p50</span><span><span class="swatch" style="background:var(--s2)"></span>update p99</span></div>
|
|
<div class="chartbox" id="cb-itl"></div>
|
|
<p class="note">Hover a bar for the tokens landing per update. p99 is an upper bound on any pause a reader feels; it is not comparable across servers that pack different numbers of tokens into an update.</p>
|
|
</figure>
|
|
<figure>
|
|
<figcaption>
|
|
<span class="t">Aggregate throughput under concurrency</span>
|
|
<span class="d">Total tokens/sec across all in-flight requests as load rises — where this flattens is the throughput knee.</span>
|
|
</figcaption>
|
|
|
|
<div class="chartbox" id="cb-conc"></div>
|
|
|
|
</figure>
|
|
<figure>
|
|
<figcaption>
|
|
<span class="t">Time-to-first-token under concurrency</span>
|
|
<span class="d">Queueing shows up here first: p50 is the typical wait, p99 the tail.</span>
|
|
</figcaption>
|
|
<div class="legend"><span><span class="swatch" style="background:var(--s1)"></span>TTFT p50</span><span><span class="swatch" style="background:var(--s2)"></span>TTFT p99</span></div>
|
|
<div class="chartbox" id="cb-ttft"></div>
|
|
<p class="note">With a modest request count per level, p99 rests on very few observations — treat a spike as a prompt to re-run, not a conclusion.</p>
|
|
</figure>
|
|
<figure>
|
|
<figcaption>
|
|
<span class="t">Prompt processing throughput by depth</span>
|
|
<span class="d">Median prefill t/s (prompt tokens ÷ TTFT) at increasing input depth, cold prefix cache. The band spans the 1% low to the 99% high.</span>
|
|
</figcaption>
|
|
|
|
<div class="chartbox" id="cb-prefill"></div>
|
|
<p class="note">Skipped depth 64,000 — deeper than the model's context window.</p>
|
|
</figure>
|
|
<details open>
|
|
<summary>Full numbers</summary>
|
|
<div class="tscroll">
|
|
<table>
|
|
<caption>Single-stream, batch = 1 · several tokens per stream update</caption>
|
|
<thead><tr><th>category</th><th>passes</th><th>TTFT p50</th><th>TTFT p99</th><th>update p50 (ms)</th><th>update p99 (ms)</th><th>tok/update</th><th>decode med</th><th>±IQR</th><th>CV</th></tr></thead>
|
|
<tbody>
|
|
<tr><td>chat</td><td>5</td><td>128.8</td><td>155.3<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>33.0</td><td>37.9</td><td>1.00</td><td>30.2</td><td>0.5</td><td>2.6%</td></tr>
|
|
<tr><td>code</td><td>5</td><td>136.4</td><td>154.3<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>34.8</td><td>38.2</td><td>1.00</td><td>28.6</td><td>0.5</td><td>2.0%</td></tr>
|
|
<tr><td>file edit</td><td>5</td><td>137.7</td><td>182.9<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>33.5</td><td>37.8</td><td>1.00</td><td>29.7</td><td>0.6</td><td>1.5%</td></tr>
|
|
<tr><td>json</td><td>5</td><td>127.5</td><td>130.8<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>33.4</td><td>40.8</td><td>1.00</td><td>29.9</td><td>0.6</td><td>1.5%</td></tr>
|
|
<tr><td>math</td><td>5</td><td>125.4</td><td>131.3<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>33.4</td><td>39.1</td><td>1.00</td><td>29.7</td><td>0.4</td><td>2.1%</td></tr>
|
|
<tr><td>prose</td><td>5</td><td>87.1</td><td>163.7<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>33.0</td><td>37.8</td><td>1.00</td><td>30.2</td><td>1.1</td><td>2.4%</td></tr>
|
|
<tr><td>reasoning</td><td>5</td><td>124.1</td><td>127.7<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>33.1</td><td>37.6</td><td>1.00</td><td>29.9</td><td>0.5</td><td>1.2%</td></tr>
|
|
<tr><td>summarization</td><td>5</td><td>131.6</td><td>139.1<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>33.8</td><td>42.7</td><td>1.00</td><td>29.3</td><td>1.1</td><td>2.1%</td></tr>
|
|
</tbody>
|
|
</table>
|
|
<table>
|
|
<caption>Concurrency sweep</caption>
|
|
<thead><tr><th>level</th><th>ok/req</th><th>aggregate t/s</th><th>TTFT p50</th><th>TTFT p99</th><th>per-req decode med</th></tr></thead>
|
|
<tbody>
|
|
<tr><td>1</td><td>48/48</td><td>29.8</td><td>126.3</td><td>160.1<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>29.9</td></tr>
|
|
<tr><td>2</td><td>48/48</td><td>57.9</td><td>151.8</td><td>1,138.8<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>29.5</td></tr>
|
|
<tr><td>4</td><td>48/48</td><td>108.5</td><td>150.5</td><td>270.3<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>29.1</td></tr>
|
|
<tr><td>8</td><td>48/48</td><td>190.9</td><td>150.6</td><td>226.3<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>29.1</td></tr>
|
|
</tbody>
|
|
</table>
|
|
<table>
|
|
<caption>Reasoning / answer split · TTFA is time to the first answer token</caption>
|
|
<thead><tr><th>category</th><th>runs w/ split</th><th>reasoning share (est)</th><th>TTFA p50 (ms)</th><th>never reached answer</th></tr></thead>
|
|
<tbody>
|
|
<tr><td>chat</td><td>5/5</td><td>100%</td><td>—</td><td>5/5</td></tr>
|
|
<tr><td>code</td><td>5/5</td><td>100%</td><td>—</td><td>5/5</td></tr>
|
|
<tr><td>file edit</td><td>5/5</td><td>100%</td><td>—</td><td>5/5</td></tr>
|
|
<tr><td>json</td><td>5/5</td><td>100%</td><td>—</td><td>5/5</td></tr>
|
|
<tr><td>math</td><td>5/5</td><td>100%</td><td>—</td><td>5/5</td></tr>
|
|
<tr><td>prose</td><td>5/5</td><td>100%</td><td>—</td><td>5/5</td></tr>
|
|
<tr><td>reasoning</td><td>5/5</td><td>100%</td><td>—</td><td>5/5</td></tr>
|
|
<tr><td>summarization</td><td>5/5</td><td>100%</td><td>—</td><td>5/5</td></tr>
|
|
</tbody>
|
|
</table>
|
|
<table>
|
|
<caption>Prefill sweep · cold prefix cache</caption>
|
|
<thead><tr><th>target depth</th><th>prompt tok med</th><th>TTFT p50</th><th>PP 1% low</th><th>PP median</th><th>PP 99% high</th></tr></thead>
|
|
<tbody>
|
|
<tr><td>2,000</td><td>1,512</td><td>136.7</td><td>10,834.8<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>10,993.0</td><td>11,464.1<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td></tr>
|
|
<tr><td>8,000</td><td>5,936</td><td>345.9</td><td>16,203.3<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>17,150.9</td><td>17,756.9<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td></tr>
|
|
<tr><td>16,000</td><td>11,826</td><td>682.8</td><td>16,979.7<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>17,362.0</td><td>17,557.7<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td></tr>
|
|
<tr><td>32,000</td><td>23,584</td><td>1,426.9</td><td>16,392.8<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td><td>16,501.6</td><td>16,697.8<span class="thin" title="under-sampled percentile — see the note below the tables">†</span></td></tr>
|
|
<tr><td>64,000</td><td>—</td><td>—</td><td>—</td><td><em>skipped</em></td><td>—</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</details>
|
|
<footer>Generated by BetterBench 0.6.1 from a corpus v1.0 run. Corpus hash <code>e332dceff176d033</code>. Combined-score weights — code 0.3, reasoning 0.2, prose 0.15, json 0.15, file_edit 0.1, summarization 0.1. Results are only comparable within a corpus version. Stopped at <code>max_tokens</code>: 40/40 runs (100%) — on a thinking model a truncated run measures the thinking phase, not a complete answer. 16 percentiles are marked † — they rest on fewer samples than <code>n · tail ≥ 5</code> requires (a p99 needs 500 observations), so read them as roughly the worst observed rather than as percentiles. The full list is under <code>sample_gate</code> in the results JSON. See METHODOLOGY.md §sample-size.</footer>
|
|
</div>
|
|
<script>
|
|
"use strict";
|
|
const D = {"cats": ["chat", "code", "file edit", "json", "math", "prose", "reasoning", "summarization"], "runs": [5, 5, 5, 5, 5, 5, 5, 5], "decode": [30.209005986727384, 28.593291483539346, 29.667988058479065, 29.896044198706495, 29.699409386811695, 30.17455331458197, 29.851137754535994, 29.334894892968435], "decodeIqr": [0.5384921095869828, 0.5273712586372099, 0.5665422114217478, 0.6173017686438627, 0.39840654539539955, 1.1284810027546506, 0.4641715712319794, 1.1053881234070566], "cv": [2.580012062451944, 2.0043452630515426, 1.463901686475085, 1.53779352703662, 2.141204665854642, 2.385916330421142, 1.1577015449057322, 2.0693439852887643], "itlLow": [24.413577801704548, 22.449553041794378, 24.54691376296493, 21.271520323542738, 23.542545548226773, 25.142119526190967, null, 20.235361045945528], "itlMed": [30.336845774532687, 28.742999735445764, 29.866172817480145, 29.92251120863404, 29.962026602030477, 30.323837048780582, null, 29.57268236994682], "itlHigh": [31.653306834688205, 31.03075031557954, 31.482153569326826, 31.500527163041173, 31.71846309319834, 31.809650459862805, null, 31.45708082332147], "batched": true, "updP50": [32.96321599918883, 34.79108000010456, 33.48269649904978, 33.41965500021615, 33.37557949998882, 32.97735700107296, 33.145140000669926, 33.81499250008346], "updP99": [37.93912895991521, 38.19826292981816, 37.83955859953494, 40.848691800638335, 39.05262630980358, 37.788034479890484, 37.60937970984742, 42.69993370104203], "tokPerUpd": [1.0017889087656529, 1.0024196335983409, 1.0014306151645207, 1.0018214936247722, 1.0004133939644482, 1.0006949270326615, 1.0018214936247722, 1.0030090270812437], "ttft50": [128.82916100170405, 136.42553099998622, 137.73373500043817, 127.51463700078602, 125.41601799966884, 87.09746299973631, 124.10967399955553, 131.62792299954162], "combined": 29.45909291810702, "conc": {"levels": [1, 2, 4, 8], "agg": [29.805964127658978, 57.85225515834984, 108.47167156588857, 190.88059132874557], "t50": [126.31654500000877, 151.84413100087113, 150.49846599958983, 150.64538099886704], "t99": [160.14029846017365, 1138.802406360246, 270.33479844036265, 226.2841990699053], "per": [29.933184918322034, 29.50403492151975, 29.130063504264502, 29.054581151093515], "ok": [48, 48, 48, 48], "req": [48, 48, 48, 48]}, "pre": {"depths": [2000, 8000, 16000, 32000], "tok": [1511.5, 5936.0, 11825.5, 23584.5], "low": [10834.816726917928, 16203.258283554474, 16979.670134973705, 16392.797928813903], "med": [10992.963147788207, 17150.904877697463, 17361.979138434774, 16501.618643630587], "high": [11464.052881649788, 17756.866786046423, 17557.699591078937, 16697.841373157593], "t50": [136.7047254998397, 345.931906500482, 682.8417554997941, 1426.85833250016]}};
|
|
const NS = "http://www.w3.org/2000/svg";
|
|
const el = (n, a) => { const e = document.createElementNS(NS, n);
|
|
for (const k in a) e.setAttribute(k, a[k]); return e; };
|
|
const fmt = (v, d) => (v === null || v === undefined) ? "—"
|
|
: v.toLocaleString("en-US", { minimumFractionDigits: d, maximumFractionDigits: d });
|
|
const has = v => v !== null && v !== undefined;
|
|
const maxOf = arrs => Math.max(...arrs.flat().filter(has));
|
|
const niceTop = v => { if (!(v > 0)) return 1;
|
|
const p = Math.pow(10, Math.floor(Math.log10(v)) - 1);
|
|
return Math.ceil(v / (2 * p)) * 2 * p; };
|
|
const box = id => document.getElementById(id);
|
|
|
|
function mkTip(b) { const t = document.createElement("div"); t.className = "tip";
|
|
b.appendChild(t); return t; }
|
|
function showTip(tip, b, x, y, html) {
|
|
tip.innerHTML = html; tip.style.opacity = "1";
|
|
let left = x + 14;
|
|
if (left + tip.offsetWidth > b.clientWidth) left = x - tip.offsetWidth - 14;
|
|
tip.style.left = Math.max(0, left) + "px";
|
|
tip.style.top = Math.max(0, y - tip.offsetHeight - 10) + "px";
|
|
}
|
|
const row = (color, name, val) =>
|
|
`<div class="row"><span class="nm">${color
|
|
? `<span class="swatch" style="background:${color}"></span>` : ""}${name}</span><b>${val}</b></div>`;
|
|
|
|
function frame(svg, M, iw, ih, yMin, yMax, yTitle, ticks) {
|
|
for (let k = 0; k <= (ticks || 4); k++) {
|
|
const v = yMin + ((yMax - yMin) * k) / (ticks || 4);
|
|
const y = M.t + ih - (ih * (v - yMin)) / (yMax - yMin);
|
|
svg.appendChild(el("line", { x1: M.l, x2: M.l + iw, y1: y, y2: y, class: "gridline" }));
|
|
const tx = el("text", { x: M.l - 10, y: y + 3.5, class: "tick", "text-anchor": "end" });
|
|
tx.textContent = fmt(v, v < 10 ? 1 : 0); svg.appendChild(tx);
|
|
}
|
|
svg.appendChild(el("line", { x1: M.l, x2: M.l + iw, y1: M.t + ih, y2: M.t + ih, class: "baseline" }));
|
|
const ay = el("text", { x: M.l, y: M.t - 7, class: "axtitle" });
|
|
ay.textContent = yTitle; svg.appendChild(ay);
|
|
}
|
|
function xLabels(svg, labels, X, y) {
|
|
labels.forEach((lab, i) => {
|
|
const t = el("text", { x: X(i), y: y, class: "tick", "text-anchor": "middle" });
|
|
t.textContent = lab; svg.appendChild(t);
|
|
});
|
|
}
|
|
|
|
/* --- grouped / single bars, zero-based --- */
|
|
function bars(id, o) {
|
|
const b = box(id); if (!b) return;
|
|
const W = 900, H = o.height || 340, M = { t: 20, r: 16, b: 50, l: 64 };
|
|
const iw = W - M.l - M.r, ih = H - M.t - M.b;
|
|
const svg = el("svg", { viewBox: `0 0 ${W} ${H}`, role: "img", "aria-label": o.aria });
|
|
const n = o.x.length, yMax = o.yMax;
|
|
const Y = v => M.t + ih - (ih * v) / yMax;
|
|
frame(svg, M, iw, ih, 0, yMax, o.yTitle);
|
|
const band = iw / n, ns = o.series.length, GAP = 2;
|
|
const bw = Math.min(40, (band - 24 - GAP * (ns - 1)) / ns);
|
|
xLabels(svg, o.x, i => M.l + band * i + band / 2, M.t + ih + 20);
|
|
if (has(o.ref)) {
|
|
const y = Y(o.ref);
|
|
svg.appendChild(el("line", { x1: M.l, x2: M.l + iw, y1: y, y2: y, class: "refline" }));
|
|
const t = el("text", { x: M.l + iw, y: y - 6, class: "tick", "text-anchor": "end" });
|
|
t.textContent = o.refLabel; svg.appendChild(t);
|
|
}
|
|
const tip = mkTip(b);
|
|
o.x.forEach((lab, i) => {
|
|
const cx = M.l + band * i + band / 2;
|
|
const start = cx - (ns * bw + (ns - 1) * GAP) / 2;
|
|
o.series.forEach((s, si) => {
|
|
const v = s.v[i]; if (!has(v)) return;
|
|
const x = start + si * (bw + GAP);
|
|
const r = el("rect", { x: x, y: Y(v), width: bw, height: Math.max(2, ih - (Y(v) - M.t)),
|
|
rx: 4, ry: 4, fill: s.color });
|
|
r.style.cursor = "crosshair";
|
|
const html = `<div class="th">${lab}</div>` +
|
|
o.series.map(q => row(ns > 1 ? q.color : null, q.name, o.tipVal(q.v[i]))).join("") +
|
|
(o.extra ? o.extra(i) : "");
|
|
r.addEventListener("pointerenter", () => {
|
|
const rc = svg.getBoundingClientRect();
|
|
showTip(tip, b, ((x + bw / 2) / W) * rc.width, (Y(v) / H) * rc.height, html);
|
|
});
|
|
r.addEventListener("pointerleave", () => { tip.style.opacity = "0"; });
|
|
svg.appendChild(r);
|
|
});
|
|
});
|
|
b.appendChild(svg);
|
|
}
|
|
|
|
/* --- floating range bars with a median tick --- */
|
|
function rangeBars(id, o) {
|
|
const b = box(id); if (!b) return;
|
|
const W = 900, H = 340, M = { t: 20, r: 16, b: 50, l: 64 };
|
|
const iw = W - M.l - M.r, ih = H - M.t - M.b;
|
|
const svg = el("svg", { viewBox: `0 0 ${W} ${H}`, role: "img", "aria-label": o.aria });
|
|
const n = o.x.length, yMax = o.yMax;
|
|
const Y = v => M.t + ih - (ih * v) / yMax;
|
|
frame(svg, M, iw, ih, 0, yMax, o.yTitle);
|
|
const band = iw / n, bw = Math.min(34, band - 26);
|
|
xLabels(svg, o.x, i => M.l + band * i + band / 2, M.t + ih + 20);
|
|
const tip = mkTip(b);
|
|
o.x.forEach((lab, i) => {
|
|
const lo = o.low[i], hi = o.high[i], md = o.med[i];
|
|
if (!has(lo) || !has(hi)) return;
|
|
const cx = M.l + band * i + band / 2, x = cx - bw / 2;
|
|
const r = el("rect", { x: x, y: Y(hi), width: bw, height: Math.max(3, Y(lo) - Y(hi)),
|
|
rx: 4, ry: 4, fill: "var(--s1-mid)" });
|
|
r.style.cursor = "crosshair";
|
|
svg.appendChild(r);
|
|
if (has(md)) svg.appendChild(el("line", { x1: x, x2: x + bw, y1: Y(md), y2: Y(md),
|
|
stroke: "var(--ink)", "stroke-width": 2 }));
|
|
const html = `<div class="th">${lab}</div>` +
|
|
row(null, "99% high", o.tipVal(hi)) + row(null, "median", o.tipVal(md)) +
|
|
row(null, "1% low", o.tipVal(lo)) + (o.extra ? o.extra(i) : "");
|
|
r.addEventListener("pointerenter", () => {
|
|
const rc = svg.getBoundingClientRect();
|
|
showTip(tip, b, (cx / W) * rc.width, (Y(hi) / H) * rc.height, html);
|
|
});
|
|
r.addEventListener("pointerleave", () => { tip.style.opacity = "0"; });
|
|
});
|
|
b.appendChild(svg);
|
|
}
|
|
|
|
/* --- line chart with optional band --- */
|
|
function line(id, o) {
|
|
const b = box(id); if (!b) return;
|
|
const W = 900, H = 320, M = { t: 20, r: 24, b: 52, l: 64 };
|
|
const iw = W - M.l - M.r, ih = H - M.t - M.b;
|
|
const svg = el("svg", { viewBox: `0 0 ${W} ${H}`, role: "img", "aria-label": o.aria });
|
|
const n = o.x.length, yMin = o.yMin, yMax = o.yMax;
|
|
const X = i => M.l + (n === 1 ? iw / 2 : (iw * i) / (n - 1));
|
|
const Y = v => M.t + ih - (ih * (v - yMin)) / (yMax - yMin);
|
|
frame(svg, M, iw, ih, yMin, yMax, o.yTitle);
|
|
xLabels(svg, o.x, X, M.t + ih + 20);
|
|
if (o.xTitle) {
|
|
const t = el("text", { x: M.l, y: H - 8, class: "axtitle" });
|
|
t.textContent = o.xTitle; svg.appendChild(t);
|
|
}
|
|
if (o.band && o.band.low.every(has) && o.band.high.every(has)) {
|
|
const up = o.band.high.map((v, i) => (i ? "L" : "M") + X(i) + " " + Y(v)).join(" ");
|
|
const dn = o.band.low.map((v, i) => "L" + X(n - 1 - i) + " " + Y(o.band.low[n - 1 - i])).join(" ");
|
|
svg.appendChild(el("path", { d: up + " " + dn + " Z", fill: "var(--s1-soft)", stroke: "none" }));
|
|
}
|
|
svg.appendChild(el("path", {
|
|
d: o.v.map((v, i) => (i ? "L" : "M") + X(i) + " " + Y(v)).join(" "),
|
|
fill: "none", stroke: "var(--s1)", "stroke-width": 2,
|
|
"stroke-linejoin": "round", "stroke-linecap": "round" }));
|
|
o.v.forEach((v, i) => svg.appendChild(el("circle", {
|
|
cx: X(i), cy: Y(v), r: 5, fill: "var(--s1)", stroke: "var(--surface)", "stroke-width": 2 })));
|
|
const cross = el("line", { class: "cross", y1: M.t, y2: M.t + ih, opacity: 0 });
|
|
svg.appendChild(cross);
|
|
const hit = el("rect", { x: M.l, y: M.t, width: iw, height: ih, fill: "transparent" });
|
|
svg.appendChild(hit);
|
|
b.appendChild(svg);
|
|
const tip = mkTip(b);
|
|
hit.addEventListener("pointermove", ev => {
|
|
const rc = svg.getBoundingClientRect();
|
|
const px = ((ev.clientX - rc.left) / rc.width) * W;
|
|
let i = 0, best = Infinity;
|
|
for (let k = 0; k < n; k++) { const d = Math.abs(X(k) - px); if (d < best) { best = d; i = k; } }
|
|
cross.setAttribute("x1", X(i)); cross.setAttribute("x2", X(i)); cross.setAttribute("opacity", 1);
|
|
showTip(tip, b, (X(i) / W) * rc.width, (Y(o.v[i]) / H) * rc.height,
|
|
`<div class="th">${o.tipHead(i)}</div>` + o.tipBody(i));
|
|
});
|
|
hit.addEventListener("pointerleave", () => { tip.style.opacity = "0"; cross.setAttribute("opacity", 0); });
|
|
}
|
|
|
|
/* ------------------------------ build ------------------------------ */
|
|
if (D.cats.length) {
|
|
bars("cb-decode", {
|
|
aria: "Median decode throughput per category.",
|
|
x: D.cats, yTitle: "DECODE T/S (MEDIAN)",
|
|
yMax: niceTop(maxOf([D.decode])), height: 350,
|
|
ref: D.combined, refLabel: "combined " + fmt(D.combined, 1),
|
|
series: [{ name: "decode t/s", color: "var(--s1)", v: D.decode }],
|
|
tipVal: v => fmt(v, 1) + " t/s",
|
|
extra: i => row(null, "±IQR", fmt(D.decodeIqr[i], 1)) +
|
|
row(null, "CV", fmt(D.cv[i], 1) + "%") +
|
|
row(null, "passes", D.runs[i])
|
|
});
|
|
if (D.batched) {
|
|
/* Grouped bars, not a floating range bar: p50 and p99 can differ by two
|
|
orders of magnitude (a 17 ms rhythm against a 1.3 s stall), and a bar
|
|
floating between them collapses the p50 end onto the axis. */
|
|
bars("cb-itl", {
|
|
aria: "Stream-update gap p50 and p99 by category.",
|
|
x: D.cats, yTitle: "UPDATE GAP (MS)",
|
|
yMax: niceTop(maxOf([D.updP99, D.updP50])), height: 320,
|
|
series: [{ name: "p50", color: "var(--s1)", v: D.updP50 },
|
|
{ name: "p99", color: "var(--s2)", v: D.updP99 }],
|
|
tipVal: v => fmt(v, 1) + " ms",
|
|
extra: i => row(null, "tok/update", fmt(D.tokPerUpd[i], 2)) +
|
|
row(null, "passes", D.runs[i])
|
|
});
|
|
} else {
|
|
rangeBars("cb-itl", {
|
|
aria: "Inter-token latency range per category, 1% low to 99% high.",
|
|
x: D.cats, yTitle: "INSTANTANEOUS T/S",
|
|
yMax: niceTop(maxOf([D.itlHigh])),
|
|
low: D.itlLow, med: D.itlMed, high: D.itlHigh,
|
|
tipVal: v => fmt(v, 1) + " t/s",
|
|
extra: i => row(null, "spread", has(D.itlHigh[i]) && has(D.itlLow[i])
|
|
? fmt(D.itlHigh[i] - D.itlLow[i], 1) + " t/s" : "—")
|
|
});
|
|
}
|
|
}
|
|
if (D.conc.levels.length > 1) {
|
|
line("cb-conc", {
|
|
aria: "Aggregate throughput as concurrency rises.",
|
|
x: D.conc.levels.map(String), xTitle: "CONCURRENCY LEVEL",
|
|
yTitle: "AGGREGATE T/S", yMin: 0, yMax: niceTop(maxOf([D.conc.agg])),
|
|
v: D.conc.agg,
|
|
tipHead: i => "concurrency " + D.conc.levels[i] + " · " + D.conc.ok[i] + "/" + D.conc.req[i] + " ok",
|
|
tipBody: i => row(null, "aggregate", fmt(D.conc.agg[i], 1) + " t/s") +
|
|
row(null, "per-req", fmt(D.conc.per[i], 1) + " t/s") +
|
|
row(null, "TTFT p50", fmt(D.conc.t50[i], 1) + " ms")
|
|
});
|
|
bars("cb-ttft", {
|
|
aria: "TTFT p50 and p99 by concurrency level.",
|
|
x: D.conc.levels.map(String), yTitle: "TTFT (MS)",
|
|
yMax: niceTop(maxOf([D.conc.t99, D.conc.t50])), height: 300,
|
|
series: [{ name: "p50", color: "var(--s1)", v: D.conc.t50 },
|
|
{ name: "p99", color: "var(--s2)", v: D.conc.t99 }],
|
|
tipVal: v => fmt(v, 1) + " ms",
|
|
extra: i => row(null, "requests", D.conc.ok[i] + "/" + D.conc.req[i])
|
|
});
|
|
}
|
|
if (D.pre.depths.length > 1) {
|
|
const lo = Math.min(...D.pre.low.filter(has).concat(D.pre.med.filter(has)));
|
|
const hi = Math.max(...D.pre.high.filter(has).concat(D.pre.med.filter(has)));
|
|
const pad = (hi - lo) * 0.25 || hi * 0.1;
|
|
line("cb-prefill", {
|
|
aria: "Prefill throughput by input depth.",
|
|
x: D.pre.depths.map(d => d >= 1000 ? (d / 1000) + "k" : String(d)),
|
|
xTitle: "TARGET INPUT DEPTH (TOKENS)", yTitle: "PP T/S (MEDIAN)",
|
|
yMin: Math.max(0, lo - pad), yMax: hi + pad,
|
|
v: D.pre.med, band: { low: D.pre.low, high: D.pre.high },
|
|
tipHead: i => D.pre.depths[i].toLocaleString() + " target · "
|
|
+ fmt(D.pre.tok[i], 0) + " actual tok",
|
|
tipBody: i => row(null, "99% high", fmt(D.pre.high[i], 1)) +
|
|
row(null, "median", fmt(D.pre.med[i], 1)) +
|
|
row(null, "1% low", fmt(D.pre.low[i], 1)) +
|
|
row(null, "TTFT p50", fmt(D.pre.t50[i], 0) + " ms")
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|