Refresh and triage the evidence snapshot
data/localmaxxing-snapshot.js is generated — never hand-edit it. It carries the model catalog
(models) and the calibration corpus (goldCases, ≤240 rows). The engine's peer correction, the
"nearest measured" ladder rung, the evidence workspace, and the landing-page quick start all read it.
The neural.download lab rows live apart in data/lab-evidence.json (hand-edited; npm test
regenerates data/lab-evidence.js and stamps its cache key) — see the calibrate-engine skill.
Commands
npm run refresh:localmaxxing — rebuilds the snapshot from https://www.localmaxxing.com/api
(/models, /leaderboard, paged) and rewrites the ?v= cache key in index.html. It loads
engine.js through the test harness for the prefill plausibility check, so the engine must parse.
Commit the snapshot, index.html, and dist/ (the SDK evidence bundle npm test rebuilds) together;
committing only the data file leaves browsers on a cached snapshot and fails the cache-key integrity
test. The workflow (.github/workflows/refresh-localmaxxing.yml) is manual-only,
with publication off by default. It runs npm test + npm run audit:gold and
uploads a review artifact; committing additionally requires the explicit
publish input. Weekly refreshes were disabled after the September 8 review
found snapshot-dependent numerical pins blocking new evidence. Those pins
now use tests/fixtures/calibration-2026-08-24.json; do not refresh that fixture.
The workflow additionally requires audit:gold -- --strict-physical (zero
unresolved >5% roofline violations), while retaining existing statistical guards.
It also blocks rows carrying decodeMeasurementIssue. The parser now stores
zero for independent llama-bench tg and flags -pg/depth sweeps for original
per-test JSON review; never silently remove these rows or reinterpret combined
rates as isolated decode. Historical published rows await a guarded migration.
npm run audit:gold — distribution, per-runtime/hardware medians, roofline violations, worst rows.
node scripts/fit-decode-constants.mjs --rows — every row with depth, observed, predicted, physical.
What a gold row is
normalizeGoldCase in scripts/refresh-localmaxxing.mjs keeps a run only if it maps to a preset
(MODEL_PRESET_RULES), a device template (HARDWARE_RULES), a runtime (RUNTIME_KEYS), and a
quantization (normalizeQuantization); has a real engine invocation (not a "# Remote endpoint"); is
batch 1 and non-speculative; is not a pruned/abliterated variant mapped onto a base preset; and is not
a wall-clock capacity probe (prompt ≥ 32K, TTFT ≥ 10 s, no prefill rate). Its prefillTokS is dropped
(decode kept) when the prompt-processing rate implies more than the device's dense tensor peak
(plausiblePrefillRate: llama-server prompt-cache hits report 20–60k tok/s). chooseGoldCases then
keeps up to 3 runs per (preset, hardware, devices, runtime, quant) signature and 16 per preset, most
reproducible first; every hardware template keeps its best 4 rows before the rest fills by
reproducibility, capped at 240 — so one new device with a few runs is calibratable immediately.
Fields the engine depends on (keep them when editing the script): contextLength (configured window →
KV allocation), promptTokens/outputTokens (decode depth = prompt + output/2, for llama-bench rows
as well — their tg rates fall as 1/p with -p), kvCacheDtype (from the API flag or -ctk/--kv-cache-dtype in the
command), splitMode (-sm tensor|row → tensor strategy), deviceCount (honours -ts a/b and -tp N),
peakVramGb (proves residency for dense mixed-precision quants), cpuMoeLayers (--n-cpu-moe N /
-ncmoe N, or 'all' for --cpu-moe / -ot exps=CPU), memoryGB (the recorded pool; a smaller SKU
than the template is honored), backend, command, reproducibility.
Adding evidence for a new model or device
- Add the preset / template first (see the
add-model and add-hardware skills).
- Add a
MODEL_PRESET_RULES regex (HF id, base model resolves through baseModel) or a
HARDWARE_RULES regex (hardware label). Specific patterns before general ones.
npm run refresh:localmaxxing, then check the new rows in node scripts/fit-decode-constants.mjs --rows.
Triage checklist when the audit or the CI refresh fails
- Read the failing guard: median drift, within-1.5×/2× share, optimized coverage, physical coverage,
roofline violations (the integrity test prints the offending preset/hardware pairs).
- For each offending row, fetch the raw run (
https://www.localmaxxing.com/api/leaderboard?limit=200&offset=N,
match by id) and read notes, engineFlags.commandSnippet, promptTokens, ttftMs, tokSPrefill,
peakVramGb, hardware.gpuCount.
- Decide which it is — and fix it at the source:
- mislabeled quant/hardware/runtime → tighten
normalizeQuantization / HARDWARE_RULES;
- a different model than the preset (REAP, pruned, distill, "Ridge" quants) → own preset or exclude
via the variant regex;
- a measurement semantics the projection does not understand yet → extend
calculateGoldCaseProjection (that is where prompt depth, KV dtype, split mode, and peak VRAM are
applied) rather than special-casing a row;
- genuine physics gap →
calibrate-engine skill.
- Never fix a guard by widening its threshold or by lowering a physical ceiling. Every violation so far
was a data-semantics issue.
- Re-run
npm test, npm run audit:gold, commit the snapshot + index.html together.
Data hygiene rules
- Speculative/MTP rows are excluded from gold on purpose: the planner models speculation separately and
labels it; mixing them in would inflate every baseline.
isSpeculative checks the structured flags,
--spec-type other than none, draft-model/--speculative-config/DFlash/DSpark/EAGLE/ngram
spellings in the command, method phrases in notes, and "-mtp" checkpoints served by MLX-side
servers (oMLX, mtplx). A decode rate above the physical roofline on a Mac is the usual tell that a
speculative row slipped through.
- Community "best" rates in the catalog (
bestTokS) may be batched or speculative — display only, never
calibration.
- The snapshot must stay loadable without network and the app must degrade gracefully if it is missing
(
LOCALMAXXING_DATA fallback); tests run against the committed snapshot.
1---2name: refresh-evidence3description: Refresh the community benchmark snapshot (data/localmaxxing-snapshot.js) from the public Localmaxxing API, understand how gold cases are selected and what the rows mean, triage a failing weekly refresh, and map new models/hardware so their runs become evidence. Use when the snapshot is stale, the CI refresh workflow fails, a new model/device has community runs, or a gold row looks wrong.4---56# Refresh and triage the evidence snapshot78`data/localmaxxing-snapshot.js` is generated — never hand-edit it. It carries the model catalog9(`models`) and the calibration corpus (`goldCases`, ≤240 rows). The engine's peer correction, the10"nearest measured" ladder rung, the evidence workspace, and the landing-page quick start all read it.11The neural.download lab rows live apart in `data/lab-evidence.json` (hand-edited; `npm test`12regenerates `data/lab-evidence.js` and stamps its cache key) — see the `calibrate-engine` skill.1314## Commands1516- `npm run refresh:localmaxxing` — rebuilds the snapshot from `https://www.localmaxxing.com/api`17 (`/models`, `/leaderboard`, paged) **and rewrites the `?v=` cache key in `index.html`**. It loads18 `engine.js` through the test harness for the prefill plausibility check, so the engine must parse.19 Commit the snapshot, `index.html`, and `dist/` (the SDK evidence bundle `npm test` rebuilds) together;20 committing only the data file leaves browsers on a cached snapshot and fails the cache-key integrity21 test. The workflow (`.github/workflows/refresh-localmaxxing.yml`) is manual-only,22 with publication off by default. It runs `npm test` + `npm run audit:gold` and23 uploads a review artifact; committing additionally requires the explicit24 `publish` input. Weekly refreshes were disabled after the September 8 review25 found snapshot-dependent numerical pins blocking new evidence. Those pins26 now use `tests/fixtures/calibration-2026-08-24.json`; do not refresh that fixture.27 The workflow additionally requires `audit:gold -- --strict-physical` (zero28 unresolved >5% roofline violations), while retaining existing statistical guards.29 It also blocks rows carrying `decodeMeasurementIssue`. The parser now stores30 zero for independent llama-bench tg and flags `-pg`/depth sweeps for original31 per-test JSON review; never silently remove these rows or reinterpret combined32 rates as isolated decode. Historical published rows await a guarded migration.33- `npm run audit:gold` — distribution, per-runtime/hardware medians, roofline violations, worst rows.34- `node scripts/fit-decode-constants.mjs --rows` — every row with depth, observed, predicted, physical.3536## What a gold row is3738`normalizeGoldCase` in `scripts/refresh-localmaxxing.mjs` keeps a run only if it maps to a preset39(`MODEL_PRESET_RULES`), a device template (`HARDWARE_RULES`), a runtime (`RUNTIME_KEYS`), and a40quantization (`normalizeQuantization`); has a real engine invocation (not a "# Remote endpoint"); is41batch 1 and non-speculative; is not a pruned/abliterated variant mapped onto a base preset; and is not42a wall-clock capacity probe (prompt ≥ 32K, TTFT ≥ 10 s, no prefill rate). Its `prefillTokS` is dropped43(decode kept) when the prompt-processing rate implies more than the device's dense tensor peak44(`plausiblePrefillRate`: llama-server prompt-cache hits report 20–60k tok/s). `chooseGoldCases` then45keeps up to 3 runs per (preset, hardware, devices, runtime, quant) signature and 16 per preset, most46reproducible first; every hardware template keeps its best 4 rows before the rest fills by47reproducibility, capped at 240 — so one new device with a few runs is calibratable immediately.4849Fields the engine depends on (keep them when editing the script): `contextLength` (configured window →50KV *allocation*), `promptTokens`/`outputTokens` (decode *depth* = prompt + output/2, for llama-bench rows51as well — their tg rates fall as 1/p with `-p`), `kvCacheDtype` (from the API flag or `-ctk`/`--kv-cache-dtype` in the52command), `splitMode` (`-sm tensor|row` → tensor strategy), `deviceCount` (honours `-ts a/b` and `-tp N`),53`peakVramGb` (proves residency for dense mixed-precision quants), `cpuMoeLayers` (`--n-cpu-moe N` /54`-ncmoe N`, or `'all'` for `--cpu-moe` / `-ot exps=CPU`), `memoryGB` (the recorded pool; a smaller SKU55than the template is honored), `backend`, `command`, `reproducibility`.5657## Adding evidence for a new model or device58591. Add the preset / template first (see the `add-model` and `add-hardware` skills).602. Add a `MODEL_PRESET_RULES` regex (HF id, base model resolves through `baseModel`) or a61 `HARDWARE_RULES` regex (hardware label). Specific patterns before general ones.623. `npm run refresh:localmaxxing`, then check the new rows in `node scripts/fit-decode-constants.mjs --rows`.6364## Triage checklist when the audit or the CI refresh fails65661. Read the failing guard: median drift, within-1.5×/2× share, optimized coverage, physical coverage,67 roofline violations (the integrity test prints the offending preset/hardware pairs).682. For each offending row, fetch the raw run (`https://www.localmaxxing.com/api/leaderboard?limit=200&offset=N`,69 match by `id`) and read `notes`, `engineFlags.commandSnippet`, `promptTokens`, `ttftMs`, `tokSPrefill`,70 `peakVramGb`, `hardware.gpuCount`.713. Decide which it is — and fix it at the source:72 - mislabeled quant/hardware/runtime → tighten `normalizeQuantization` / `HARDWARE_RULES`;73 - a different model than the preset (REAP, pruned, distill, "Ridge" quants) → own preset or exclude74 via the variant regex;75 - a measurement semantics the projection does not understand yet → extend76 `calculateGoldCaseProjection` (that is where prompt depth, KV dtype, split mode, and peak VRAM are77 applied) rather than special-casing a row;78 - genuine physics gap → `calibrate-engine` skill.794. Never fix a guard by widening its threshold or by lowering a physical ceiling. Every violation so far80 was a data-semantics issue.815. Re-run `npm test`, `npm run audit:gold`, commit the snapshot + `index.html` together.8283## Data hygiene rules8485- Speculative/MTP rows are excluded from gold on purpose: the planner models speculation separately and86 labels it; mixing them in would inflate every baseline. `isSpeculative` checks the structured flags,87 `--spec-type` other than `none`, draft-model/`--speculative-config`/DFlash/DSpark/EAGLE/ngram88 spellings in the command, method phrases in `notes`, and "-mtp" checkpoints served by MLX-side89 servers (oMLX, mtplx). A decode rate above the physical roofline on a Mac is the usual tell that a90 speculative row slipped through.91- Community "best" rates in the catalog (`bestTokS`) may be batched or speculative — display only, never92 calibration.93- The snapshot must stay loadable without network and the app must degrade gracefully if it is missing94 (`LOCALMAXXING_DATA` fallback); tests run against the committed snapshot.