inference/research
verifiedmedium · 0.80updated 2026-10-04

WebAssembly (WASM) inference

wasm-simd, wasm-threads

Fields

id
engines/local-wasm
Repo
WebAssembly/spec
Languages
C++RustAssemblyScript
License
Apache-2.0
First release
2017
Design goal
ubiquitous-hardwareminimal-depslocal/edge
Scheduling
none
Backends
wasm-simdwasm-threads
Formats
ggufonnxwasm
Notable features
WebAssembly enables near-native performance in browsers and standalone runtimesWASM SIMD (128-bit SIMD) is critical for LLM inference - shipped in all major browsersWASM threads enable multi-threaded inference via SharedArrayBufferllama.cpp WASM build runs GGUF models in the browserONNX Runtime Web runs ONNX models with WASM backendStandalone WASM runtimes (Wasmtime, WasmEdge) enable server-side WASM inference
Hardware caveats
Performance is 2-10x slower than native CPU inference without SIMDWASM SIMD is 128-bit vs 256-bit AVX2 - half the SIMD throughputWASM threads require SharedArrayBuffer and cross-origin isolationMemory is limited by WASM linear memory (4GB max in most runtimes)No direct GPU access - WASM is CPU-only (WebGPU is the GPU path)Smaller ecosystem than native inference - fewer optimized kernels
Best for
Cross-platform inference in browsers and standalone runtimesServer-side inference with WASM sandboxing (Wasmtime, WasmEdge)Applications requiring near-native performance without native compilationSmall to medium models (1-13B) with WASM SIMD
Avoid for
Maximum performance - native CPU/GPU inference is 2-10x fasterLarge models (70B+) - WASM memory constraints are too tightGPU-accelerated inference - WASM is CPU-onlyProduction serving - no batching, scheduling, or multi-tenant support
notes
WebAssembly enables near-native CPU inference in browsers and standalone runtimes. WASM SIMD (128-bit) is critical for LLM inference performance. The primary use cases are llama.cpp WASM build (GGUF models in browser) and ONNX Runtime Web (ONNX models). WASM is CPU-only - WebGPU is the GPU path. Performance is 2-10x slower than native CPU inference. WASM is the right choice for cross-platform deployment and sandboxed inference, but not for maximum performance. ||| MAINTENANCE (dated fact, GitHub API, 2026-10-04): last commit 2026-10-03 (0.0 months before this record), NO GitHub release or tag found, 251 contributors (distinct committers including anonymous), open_issues_count 100 (issues PLUS pull requests - see [[ev-github-open-issues-count-includes-pull-requests]]), not archived, 3459 stars. See [[ev-maintenance-status-is-four-dated-facts]] for how to read this fact set.

Notes

WebAssembly enables near-native CPU inference in browsers and standalone runtimes. WASM SIMD (128-bit) is critical for LLM inference performance. The primary use cases are llama.cpp WASM build (GGUF models in browser) and ONNX Runtime Web (ONNX models). WASM is CPU-only - WebGPU is the GPU path. Performance is 2-10x slower than native CPU inference. WASM is the right choice for cross-platform deployment and sandboxed inference, but not for maximum performance. ||| MAINTENANCE (dated fact, GitHub API, 2026-10-04): last commit 2026-10-03 (0.0 months before this record), NO GitHub release or tag found, 251 contributors (distinct committers including anonymous), open_issues_count 100 (issues PLUS pull requests - see [[ev-github-open-issues-count-includes-pull-requests]]), not archived, 3459 stars. See [[ev-maintenance-status-is-four-dated-facts]] for how to read this fact set.

Cross-references

This record references no other records — it is a leaf. It is cited by 1.