﻿# How to benchmark llama.cpp Relaxed SIMD by GGUF quantization

The llama.cpp prerelease adds Relaxed SIMD dot products for WebAssembly. Report performance by quantization, phase and browser.

Author: Retrivium editorial team
Updated: 2026-11-20
Canonical URL: https://retrivium.ai/journal/daily-20261120-compute-llamacpp-wasm-relaxed-simd-quantization/
Language: en

The llama.cpp b12530 prerelease published on November 19, 2026 brings a merged Relaxed SIMD enhancement to WebAssembly dot products. The contributor's earlier browser measurements illustrate why a single speedup is an awkward summary. In the reported short prompt-processing test on an M2 MacBook Air, the measured rate ratio was 1.82 for Q4_K_M and 1.01 for Q8_0. These are contributor measurements under particular conditions. They are not a GPU performance result.

## Control the build and the checkpoint

Prepare comparable browser builds that differ only in the optimization being checked. Keep the GGUF, thread settings and browser version fixed within each comparison. Run each quantization separately because the weight format changes which kernels the runtime executes. If you also change the GGUF during the test, you cannot tell how much of the measured difference belongs to the new instructions.

## Split startup, prefill and generation

Record the time to load and initialize the model, prompt-processing throughput and generation throughput. Include a stable prompt with representative length and a bounded generation budget. Cache state, browser scheduling and device temperature can affect the measurements. Interleave trials on a quiet device and report a spread as well as a typical result. Treat the first run separately so download and compilation do not obscure kernel behavior.

## Check the served module

Use a capability check in the browser that will actually run the artifact, then exercise a normal fallback build as well. A browser upgrade, device change or deployment packaging error may alter which module is selected. Record that selection in the benchmark output so a fallback cannot silently be credited to the optimized build.

## Retain a correctness check

Evaluate fixed prompts and an application-level acceptance criterion alongside timing. A measured gain matters when representative tasks still return acceptable results. Report each quantization and browser combination independently. That makes the results reusable by someone deploying a different model or working with a device where the observed benefit is smaller.

## Sources

- [llama.cpp prerelease](https://github.com/ggml-org/llama.cpp/releases/tag/b12530)
- [Merged patch and measurements](https://github.com/ggml-org/llama.cpp/pull/19590)

## Related reading

- [WebAssembly feature checks](/journal/edge-wasm-feature-probe-module-instantiation/)
- [WebAssembly memory behavior](/journal/edge-wasm-memory-growth-fixed-buffer-view/)
