TECHNOLOGY

webgpu-bench: browser throughput, token agreement and memory budgets need separate readings

In this article
THE QUICK TAKE

The reviewed manifest contains 194 variants; top-token agreement checks a limited prediction property, and allocation budgets are not peak inference memory measurements.

webgpu-bench is a browser harness for llama.cpp compiled to WebAssembly with WebGPU execution. The project README describes performance and consistency comparisons across Chrome and Safari. Reviewing its original source on 5 November 2026 clarifies what those comparisons establish. This review inspected files without running the benchmark or treating its documentation as a new hardware measurement.

Count the selected manifest, not conflicting prose

The README says it tracks 10 models and 194 quantization variants, while another section still describes a full run of 230. The reviewed manifest actually contains 10 model entries with 194 variants in total. That resolves the count for this source snapshot, rather than proving that every variant downloads, executes or passes on every browser.

A compatibility result needs the exact artifact and execution status. Failed allocation, timeout and successful completion are different outcomes. Removing failed rows before calculating speed can silently turn a compatibility comparison into a report only about the subset that already works.

Browser and build are part of the configuration

The automated route uses Playwright for Chrome and WebDriverIO for actual Safari. The project distinguishes this from Playwright’s WebKit engine. It builds a JSPI variant for Chrome and an Asyncify variant for Safari, choosing the asynchronous mechanism according to support.

Consequently, comparing browser labels can also compare different runtime mechanisms. Preserve browser version, operating system, adapter, WebAssembly build and llama.cpp revision. The harness records prefill and decode timing with their corresponding token counts. These processing stages should remain separate from download, model initialization and complete user-visible response time. The benchmark-method guide gives the broader conditions needed for a meaningful comparison.

Agreement is about top-choice tokens

The documented consistency route creates a CPU reference sequence of 128 tokens. The GPU then evaluates the same reference context one position at a time, comparing its highest-scoring token with the CPU token. The original implementation confirms this forced-decoding comparison.

Feeding the reference token onward avoids the cascading effect of one differing generated token changing every later context. However, even perfect top-token agreement does not imply identical logits, hidden states or arithmetic. Different numerical values can still have the same maximum. Conversely, one disagreement can reflect close competing scores and does not by itself prove a broken kernel. Quality on a task remains a further test, as the quantization-quality guide explains.

Capacity probes are not workload peaks

The reviewed device-budget source is more detailed than a simple deviceMemory estimate. On desktops it attempts WebAssembly-heap and WebGPU-buffer allocation probes, with fallback estimates when probing fails. On mobile it skips these allocation pulses and uses fixed device-family budgets, because probing itself can trigger tab termination.

The fit decision combines a GPU budget, model-file size and overhead allowance with a separate heap requirement. These are selection heuristics and capacity observations. They do not continuously measure peak resident memory or peak GPU memory during the actual model run. A successful probe also does not guarantee that all later workload allocations will succeed under changing system pressure.

A useful compatibility instrument with bounded conclusions

The harness can preserve artifact-specific status, stage timings and an interpretable consistency signal. It does not make one passing quantization a guarantee for an entire model family, or make a speed result portable to another browser build. Save the complete configuration and raw outcomes, including failures and consistency coverage. Exact peak-memory claims require an appropriate additional measurement of the running workload.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles