<!-- agent-source-envelope -->
# posttrainllm — verified WebGPU speed on one Mac

> A paired Apple M5 Pro WebGPU-versus-WASM receipt verifies 10.67x on the Large preset; the older multi-preset curve remains historical.

Canonical: https://posttrainllm.com/speedup
<!-- /agent-source-envelope -->

[← posttrainllm](https://posttrainllm.com/) · [roadmap](https://posttrainllm.com/roadmap) · [devlog](https://posttrainllm.com/devlog) · [docs](https://posttrainllm.com/docs)

# A verified Large-preset win — and the historical curve around it

A frozen ABBA run on an Apple M5 Pro measured **10.67×**
WebGPU-over-WASM speedup on Large, with 4.72% maximum paired final-loss
drift and zero runtime errors. That point is verified for this machine and
configuration. The older Small, Medium, and XL values remain historical.

Small · d=96WASM SIMD (mt)

2.6×historical

Medium · d=128WASM SIMD (mt)

6.8×historical

Large · d=192WASM SIMD (mt)

10.67×measured · M5 Pro

XL · d=256WASM SIMD (mt)

12.1×historical

10.67×
measured at Large: 1462.5 ms/step WASM versus 137.1 ms/step WebGPU medians.

Current source: `evals/verified-wins/webgpu-paired-result-v1.json`.
Chrome 151 identified `apple · metal-3`, rejected software and
fallback adapters, and ran WASM → WebGPU → WebGPU → WASM on identical inputs.
The retained 2.6×–12.1× multi-preset curve is still historical evidence only.

## The hypothesis encoded by the curve

Every training step costs `fixed_overhead + math(model_size)`. Larger matmuls should amortize GPU dispatch overhead better. The historical curve is consistent with that mechanism, but the mechanism does not verify the retained numbers.

scalar WASM baseline

1.0×

measured

+ WASM SIMD

1.6×

measured

+ multi-thread (4 workers)

3.2×

measured

+ WebGPU full stack — Small (d=96)

~8.3×

historical · unqualified

+ WebGPU full stack — Medium (d=128)

~22×

historical · unqualified

+ WebGPU full stack — Large (d=192)

~30×

historical · unqualified

+ WebGPU full stack — XL (d=256)

~39×

historical · unqualified

Mega / Behemoth (projected)

≥ 15×

projected · blocked by Memory64 ABI bug

The shipped default WebGPU path uses blocked4 matmul, vec4 loads,
subgroup-cooperative reductions, and Flash Attention 2 forward and
backward. Use the playground's live benchmark for exploration; use a
paired JSON receipt before publishing a performance result.

Full benchmark log + the three things that didn't work →
[/devlog](https://posttrainllm.com/devlog) · [/roadmap](https://posttrainllm.com/roadmap)
