ExecuTorch WebGPU Runs PyTorch Models in Browsers
PyTorch Blog introduced the ExecuTorch WebGPU backend, which lets exported PyTorch models run locally in WebGPU-enabled browsers without converting them to formats such as GGUF, ONNX or TFLite. The same .pte artifact can run across Chrome and Safari, with support reported for language, vision-language, vision, speech and on-device training workloads, while prompts and other data remain on the device. PyTorch reports that WebGPU was 4–7× faster than its WebAssembly CPU path on prefill and 2–10× faster on decode in tests using quantized Llama 3.2 1B and Qwen3-0.6B on Chrome and an Apple M1 Pro.
The backend gives PyTorch developers a direct path for deploying models in browsers with local GPU inference and the same model artifact across browsers and platforms, though the reported performance results are vendor benchmarks on a limited setup.
TL;DR
- PyTorch models now run in the web browser on the GPU through ExecuTorch, with no conversion to another framework’s format. You export with torch.export to an ExecuTorch .pte file, and the same file runs in any WebGPU browser via ExecuTorch’s new WebGPU backend.
- It works across a broad range of models: LLMs (e.g. Llama 3.2, Qwen3, Gemma 3), vision-language (e.g. SmolVLM), segmentation, depth, object detection, super-resolution and speech-to-text (e.g. Whisper). Everything runs locally in the tab, and no data leaves the device. Try it in the ExecuTorch WebGPU Playground.
- On the same machine, WebGPU is 4–7× faster than ExecuTorch’s CPU path (Webassembly + XNNPACK) on prefill and 2–10× faster on decode.
Why the Browser?
The web is the largest deployment surface with billions of users on Chrome, Firefox and Safari. Browser inference ensures privacy by keeping users’ prompts, model inputs, and outputs on the user’s device rather than the server. This reduces network latency, enables offline use-cases, and lowers server-side inference costs. With the ExecuTorch WebGPU backend, PyTorch models get a native path to GPU-accelerated inference in WebGPU-enabled browsers on desktop, laptop and mobile.
#PyTorch#ExecuTorch WebGPU backend#WebGPU#Llama 3.2 1B#Qwen3-0.6B#Qwen2.5-0.5B#Gemma 3 1B#SmolVLM#Whisper#Depth Anything V2#SAM 2#D-FINE