AI & Computational Science

Measuring and Reducing WebGPU Dispatch Overhead for LLM Inference

How the science connects

Large language modelGraphics processin…

AI Insight

This study investigates the performance bottlenecks in running Large Language Models through WebGPU, a cross-platform graphics standard used in web browsers. The researchers developed a new measurement method revealing that the overhead from dispatching individual operations, rather than the quality of computational kernels, is the primary performance limitation when processing single requests (batch size 1). They found that reducing the number of dispatch operations is more effective for optimization than improving individual kernel performance in browser-based LLM inference.


These findings provide a clear optimization strategy for developers building AI applications that run directly in web browsers, potentially enabling more efficient deployment of language models on everyday devices without requiring specialized infrastructure. The work suggests that both inference engine developers and the WebGPU specification itself should focus on batching operations together to improve performance.


Understand the Science

Large language model 55 articles Explore Concept → Graphics processing units Concept coming soon

⚠️ Preprint – Noch nicht peer-reviewed

Dieser Artikel wurde noch nicht von unabhängigen Experten begutachtet. Die Ergebnisse sind vorläufig und sollten mit Vorsicht interpretiert werden.

Abstract: Large Language Models are deployed to multiple types of environments, from internet browsers to edge devices, and WebGPU serves as a modern cross-platform standard. The engines for browser-based LLM inference have proliferated, yet the overhead of WebGPU per-operation dispatch remains poorly characterized. In this work, we introduce a sequential-dispatch measurement method and show that naive single-operation measurements overestimate per-dispatch cost by conflating dispatch with synchronization. Using our method, we measure the per-dispatch cost and show that it is independent of data type used. We show that the dispatch overhead, not kernel quality, is the bottleneck at batch size 1, and isolate the dispatch count as the cause. Therefore, we conclude that at batch size 1, the effective approach to LLM inference optimization in WebGPU is reducing dispatch count. Our findings point to dispatch amortization, in the inference engines and in the WebGPU specification, as a path to practical browser-based inference.

Source: Measuring and Reducing WebGPU Dispatch Overhead for LLM Inference