ExecuTorch WebGPU: Run PyTorch Models Directly on Browser GPUs

ExecuTorch adds a WebGPU backend, enabling PyTorch models to run on browser GPUs without conversion.
PyTorch's official blog announced that ExecuTorch supports a WebGPU backend, allowing developers to run PyTorch models directly on GPUs in the browser without converting to other framework formats such as ONNX. The workflow starts with torch.export exporting a .pte file, which is loaded by the ExecuTorch runtime in the browser, with the WebGPU backend handling GPU-accelerated execution. This update fills a key gap in Web deployment for the PyTorch ecosystem, bringing privacy protection, low latency, and reduced server-side GPU costs, while strengthening the end-to-end ecosystem loop from training to deployment. However, browser VRAM limits, WebGPU compatibility differences, and operator coverage remain boundaries to verify in practice.
PyTorch's official blog has announced a major update: ExecuTorch now supports a WebGPU backend, allowing developers to run PyTorch models directly on GPUs in the browser without converting models to other framework formats. This progress fills a key gap in Web deployment for the PyTorch ecosystem.

Core mechanism: from torch.export to .pte files
The entire workflow starts with torch.export, which exports PyTorch models to ExecuTorch-specific .pte files. This file format is the standard carrier for the ExecuTorch runtime, containing the model's computation graph and weight information. The exported .pte file is then loaded into the ExecuTorch runtime in the browser environment, with the WebGPU backend responsible for executing computations on the GPU.
Compared with traditional Web deployment approaches (such as converting models to ONNX and running them with ONNX Runtime Web), the biggest difference in this path is "no framework switching." Models stay within the PyTorch ecosystem from training to deployment, avoiding operator compatibility issues and precision loss that can arise from cross-framework conversion.
torch.export is the model export API introduced in PyTorch 2.x, used to convert models into portable computation graph representations. By tracing the model's forward execution, it generates a static ExportedProgram containing the computation graph, parameters, and metadata. Compared with the earlier TorchScript, torch.export provides stricter graph capture mechanisms, better preserves dynamic shape information, and supports subsequent compiler optimizations. ExecuTorch is based precisely on the intermediate representation produced by torch.export, further lowering it and serializing it into .pte files.
.pte files are ExecuTorch's runtime package format, essentially a FlatBuffer serialized file that internally stores the model's computation graph structure, weight tensors, operator kernel binding information, and memory planning scheme. This format is designed to be lightweight and incrementally loadable, suitable for resource-constrained edge devices. The ExecuTorch runtime in the browser can directly parse .pte files without relying on a Python environment or the full PyTorch library, enabling pure frontend model execution.
Why WebGPU is the key piece
WebGPU is a new generation Web graphics and compute API that, compared with WebGL, provides lower-level GPU access and a more modern compute shader model. For deep learning inference, this means more fully utilizing the GPU compute power of the device the browser runs on, without falling back to CPU execution or relying on server-side inference.
ExecuTorch itself is PyTorch's inference runtime for edge and endpoint devices, covering scenarios such as mobile and embedded devices. The addition of the WebGPU backend brings browsers into ExecuTorch's target platform map, giving the same set of exported artifacts a chance to be reused across more endpoints.
WebGPU is a standard developed by the W3C GPU for the Web Working Group, aimed at providing modern GPU acceleration capabilities for the Web. Unlike WebGL, WebGPU maps directly to low-level graphics APIs such as Vulkan, Metal, and Direct3D 12, and supports compute shaders and storage buffers, making general-purpose GPU computing possible in the browser. In deep learning inference, WebGPU allows operators such as matrix multiplication and convolution to be mapped to compute shaders, thereby leveraging the GPU's massive parallelism.
WebGL, although also capable of GPU computing, was originally designed for graphics rendering and lacks native support for general-purpose computing. It usually requires encoding computations as texture rendering tricks, resulting in complex operator implementations and limited efficiency. WebGPU's compute pipeline is closer to CUDA or Metal, providing inference runtimes such as ExecuTorch with a more direct path to hardware access.
Practical significance for developers
The most direct value is privacy and latency. Inference is completed entirely locally in the browser, so user data does not need to be uploaded to a server, while also eliminating latency from network round trips. For AI applications requiring real-time interaction (such as in-browser image processing and text generation assistant tools), local GPU inference can significantly improve response experience.
Second is reduced deployment cost. Server-side inference requires bearing GPU resource overhead, whereas offloading computation to the client transfers this cost to user devices. For applications with large user bases, this is an architectural choice worth considering.
However, browser GPU inference also has its boundaries: available VRAM is limited by user devices, WebGPU support varies across browsers and hardware, and model size and computation volume still need to be adapted for Web scenarios.
A signal at the ecosystem level
PyTorch officially uses "no need to convert to other framework formats" as a core selling point, revealing its strategic orientation in the deployment chain: strengthening an end-to-end self-contained ecosystem loop. For teams that have already built training pipelines on PyTorch, Web deployment no longer requires maintaining an additional format conversion pipeline, reducing engineering complexity.
ExecuTorch WebGPU is still in an early stage of progress. Specific operator coverage, performance, and browser compatibility matrices still need to be verified by developers in real projects. But the direction is clear: running PyTorch models on browser GPUs is moving from concept to a usable engineering path.
ExecuTorch is an on-device inference runtime led by the PyTorch Foundation, aiming to execute PyTorch models on edge devices such as mobile (Android/iOS), embedded systems, and browsers. It adopts a layered architecture: the frontend receives graphs exported by torch.export, undergoes a series of graph optimizations and operator decompositions, and ultimately backends (such as XNNPACK, Core ML, Vulkan, WebGPU) handle kernel execution. The addition of the WebGPU backend enables ExecuTorch's backend matrix to cover multiple hardware types from CPU to GPU, further consolidating PyTorch's unity across the end-to-end deployment chain.
One-line Summary
ExecuTorch adds a WebGPU backend, enabling PyTorch models to run on browser GPUs without conversion.
Paragraph Summary
PyTorch's official blog announced that ExecuTorch supports a WebGPU backend, allowing developers to now run PyTorch models directly on GPUs in the browser without converting to other framework formats such as ONNX. The workflow starts with torch.export exporting a .pte file, which is loaded by the ExecuTorch runtime in the browser, with the WebGPU backend responsible for GPU-accelerated execution. This update fills a key gap in Web deployment for the PyTorch ecosystem, bringing advantages such as privacy protection, low latency, and reduced server-side GPU costs, while strengthening the end-to-end ecosystem loop from training to deployment. However, browser VRAM limits, WebGPU compatibility differences, and operator coverage remain boundaries that need verification in real-world adoption.
Related articles

AI Writes Your Code—Do You Still Need to Learn Git? Five Reasons
AI coding agents handle Git operations automatically—is it still necessary to learn Git? Five reasons: team communication, reviewing agent PRs, monitoring code changes, fallback when AI goes down, and the joy of learning—plus how the focus of learning Git is shifting in the agent era.

Anthropic Reportedly Prices IPO at $83 Per Share, Valuing Company at $1.5 Trillion
Anthropic reportedly prices IPO at $83 per share, above the expected range, with a fully diluted valuation of $1.5 trillion. This article analyzes the signal significance of the pricing and its impact on the AI industry's financing environment.

Open-Source Code Hosting Platform Codeberg Suffers Outage, Sparking Debate in Developer Community
Open-source code hosting platform Codeberg.org suffered an outage, sparking Hacker News debate over nonprofit platform stability and open-source infrastructure dependency risks.