Skip to content

Fact · Dictation in your apps

Transformers.js runs a model on the CPU through WebAssembly by default in the browser, and on the GPU through WebGPU only when the page sets the device option.

Checked against its source on October 17, 2026

In the source's own words

“By default, when running in the browser, the model will be run on your CPU (via WASM). If you would like to run the model on your GPU (via WebGPU), you can do this by setting `device: 'webgpu'`”

Transformers.js README (Hugging Face), Hugging Face, GitHub, 2026, Device section.

Open the original
What it measures
The Transformers.js README on GitHub, read on 2026-10-17.
What it does not show
This option applies to any model the library runs, including Whisper speech models. WebGPU needs a browser and graphics driver that support it.

Source

Cited on

Transformers.js runs on the CPU by default | Yap