local-first model latency & capability bench
Debates over “run inference in the browser vs. call the cloud” usually trade anecdotes instead of numbers on the hardware visitors actually own. Measuring real WebGPU, WebNN, Chrome Built-in AI (Summarizer/LanguageModel), compiled WebAssembly, and round-trip Edge Worker latency on the exact same workload reveals when local execution wins and when network round-trips dominate.
Hypothesis
Running lightweight workloads directly on client WebAssembly, WebGPU, or Chrome Built-in AI (
LanguageModel/Summarizer) beats edge round-trips on tail interactivity once shader warm-up and cold-load bytes are accounted for.
What confirms it: Standardized workloads report warm client latency below /api/edge-baseline round-trip times on capable adapters while exporting reproducible client hardware capability profiles.
What falsifies or bounds it: Cold weight/shader warm-up latency or weak client GPUs erase local wins relative to fast streaming edge models.
What this lab tests
Local-First Model Bench (GitHub) probes WebGPU, WebNN, built-in LanguageModel/Summarizer, and WebAssembly, racing standardized scoring workloads locally against a Cloudflare Worker /api/edge-baseline endpoint.
Open questions
- Where does cold-start + adapter warm-up cross over against streamed edge inference tokens for short vs. long inputs?
- How consistently can feature detection route gracefully from WebGPU/Built-in AI down to compiled Wasm and Edge fallback?
Iteration log
- — Built hardware capability probe (
WebGPU,WebNN,LanguageModel,Summarizer, Wasm) racing local compute against Worker/api/edge-baseline. - — Reordered benchmark harness above setup docs, added Wasm and WebGPU cold setup latency tracking plus accurate edge-faster verdicts, integrated CSP-safe WGSL/JS/JSON DOM syntax highlighting, tightened 700px embed responsiveness, and routed static assets through the Worker with
Cache-Control: no-cache.
Primitives tested: WebGPU, WebNN, Prompt LanguageModel API, Summarizer API, WebAssembly, Performance Timing.
This is an active lab under /labs/ and stays off the main RSS feed until graduated into a full essay.