Using threaded emscripten to speed up the generation and offload the main loop. No SIMD or other optimizations. Might work faster with #enable-experimental-webassembly-features enabled.
Tested in x86 Chrome and Firefox, Apple Silicon Safari
Run it yourself: https://github.com/lxe/ggml/tree/wasm-demo
Thanks, https://github.com/ggerganov/ggml,