PyTorch models can now run on a browser GPU through ExecuTorch’s new WebGPU backend. Developers export a model with torch.export to a .pte file, which PyTorch says works in WebGPU-enabled browsers without conversion to another framework’s format. Computation happens locally in the browser tab, so inputs and outputs do not leave the device.
The backend supports several model types, the post says, including language models, vision-language tasks, segmentation, depth estimation, object detection, super-resolution, and speech-to-text. It also describes on-device LoRA and DiReFT fine-tuning for several small language models. For developers, deployment on a webpage is intended to use a .pte file served through a CDN.
In a comparison on an Apple M1 Pro using Chrome, WebGPU was 4–7 times faster than ExecuTorch’s WebAssembly CPU path for prefill and 2–10 times faster for decode. The measurements used two quantized language models, Llama 3.2 1B and Qwen3-0.6B, so the results apply to that test setup rather than establishing performance across devices and models.
PyTorch describes the backend as being in early development and says work will continue on stability, speed, and model and operator coverage. The post also explains the technical design and identifies supported models and their export recipes. Original source: PyTorch Blog
🇬🇧 https://pytorch.org/blog/executorch-webgpu-pytorch-models-on-the-gpu-in-the-browser