TECHNOLOGY

LlamaWeb: browser memory figures and prefill trade-offs

In this article
THE QUICK TAKE

Keep browser-process memory distinct from VRAM and preserve the paper’s percentage inconsistency and slower prefill alongside decode gains.

LlamaWeb extends llama.cpp with a WebGPU backend and a browser path through wllama. The interesting result is the combination of model loading, memory planning and cross-device kernels. Its paper supports a qualified account of browser inference, including a percentage inconsistency that should remain visible.

What the backend changes

The May 20, 2026 preprint describes static memory planning, reduced loading copies and quantization-aware kernels. The overall study spans 10 models and 16 devices from 8 vendors. That coverage does not mean every model ran on every device.

The current wllama documentation exposes WebGPU alongside its WebAssembly path, worker execution and model loading controls. The maintainer’s attribution issue, opened May 23, 2026, connects the paper’s author with the integration. This is evidence of a development relationship, not a production-adoption count or independent benchmark replication.

Preserve the memory denominator

The full paper measures browser processes: Safari’s unified tab process, and Chrome’s tab plus GPU renderer processes. These values must not be relabeled physical VRAM usage.

Its abstract says 29–33% less memory. Table 1 instead shows competing frameworks at +49% and +41% relative to the LlamaWeb baseline. Section 5 calls LlamaWeb 49% and 41% lower. These formulations are inconsistent: 49% more than a baseline is approximately 33% less when the comparison direction reverses; 41% more corresponds to approximately 29% less. This arithmetic explains why the denominator matters, but does not independently resolve the authors’ aggregate calculation.

For deployment decisions, retain the platform-specific observations and measurement trace rather than selecting the largest percentage. A process peak can include loading copies, allocations and leaks; it is not simply the model’s resident weight size.

Faster decoding does not settle prefill

The framework comparison reports improved decode throughput but browser prefill at only 49% of WebLLM’s throughput and 79% of Transformers.js’s. Native runs using additional matrix features are a separate execution environment. Their performance cannot be assigned to the browser merely because both use WebGPU-related code.

This matters for user-visible behavior: a long prompt followed by a short answer can favor different engineering choices from a short prompt followed by sustained generation. Preserve both phases when estimating the experience of a document-analysis application.

Read the evaluation exclusions

The protocol uses 512-token prefill, 128 generated tokens, some evaluations at KV depths 0 and 2048, and 5 repetitions summarized by averages. Chrome/Dawn is preferred; Safari serves the iOS path. Firefox is omitted after slower pilot results. Device coverage is therefore not a browser-neutral performance guarantee.

For a reproduction, preserve cache state, model representation, browser version and backend settings. Use repeated timing analysis to inspect spread, rather than reporting only a favorable average.

Test the whole loading path

Observe fresh-load memory separately from a cached second session. Then extend the prompt and generation length within the configured context budget, recording failed loads and tab termination as outcomes. Static planning makes the allocation plan inspectable; it does not remove memory limits.

Save the artifact and browser environment using the stack reproducibility record. Recheck throughput after implementation updates. The paper’s portability evidence is useful precisely when tied to its tested configurations, rather than turned into a promise that every GGUF model will fit or run equally well in every browser.

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