MOSS-TTS-Nano running on WebGPU: same frames as onnx_tts_runtime, 5× faster in the browser
#9
by KikoCis - opened
Hi OpenMOSS team, thanks for MOSS-TTS-Nano. It is a great fit for in-browser speech.
We ported the global and local transformers to the Elffuss engine, our open-source WebGPU runtime (Apache-2.0): https://github.com/utopia-ia/elffuss-engine (js/moss.js). The audio codec still runs through your ONNX export.
- Same output. With the same request rows and the same uniform numbers, it produces the same frames as
onnx_tts_runtimewith the fixed sampled frame (24/24 in our reference test). Sampling copies the exported graph: repetition penalty 1.2, temperature 0.8, top-k 25, top-p 0.95. - No redistributed weights. The browser reads the weights straight from
MOSS-TTS-Nano-100M-ONNX@f52645cb, using a small offset map. We checked all 194 tensors bit for bit againstpytorch_model.bin. - Speed. On WebGPU: 5.2× faster than onnxruntime-web WASM with one thread, 2× faster than with four. On the CPU, where there is no WebGPU: 1.35× faster than onnxruntime-web WASM with one thread, using bf16 weights in a WebAssembly SIMD kernel. Same frames in both paths.
- Live. It powers the Spanish voice of https://audio.elffuss.com.
Two questions:
- The model card says
license: apache-2.0, but there is no LICENSE file, and the README says the repo is "not yet licensed for redistribution" until one is published. Could you add the root LICENSE file to the three repos (MOSS-TTS-Nano, -100M-ONNX and Audio-Tokenizer-Nano-ONNX)? - The exported
local_fixed_sampled_frameuses audio temperature 0.8 and top-p 0.95, whilemodeling_moss_tts_nano.pydefaults to temperature 1.7 and top-p 0.8. Which settings do you recommend?
Happy to help if you want to point people to a WebGPU path.