TokenWeave: Efficient Compute-Communication Overlap for Distributed LLM Inference
Raja Gond, Nipun Kwatra, Ramachandran Ramjee
TL;DR
TokenWeave tackles persistent compute-communication overheads in distributed LLM inference by splitting the input tokens into two wave-aware halves and overlapping the communication of one half with the computation of the other. It also reorders RMSNorm and introduces a fused AllReduce--RMSNorm kernel that leverages Multimem on Hopper/Blackwell GPUs to minimize SM usage and to overlap memory-bound RMSNorm with other work. Empirical results show up to $1.29\times$ latency reductions and $1.26\times$ throughput gains across multiple models and workloads, with occasional surpassing of an equivalent all-communication-removed model due to the fusion. The contributions are practical and deployable, integrated into vLLM-V1 and available publicly, advancing efficient distributed LLM inference through hardware-aware fusion and coarse-grained overlap.
Abstract
Distributed inference of large language models (LLMs) can introduce overheads of up to 20% even over GPUs connected via high-speed interconnects such as NVLink. Multiple techniques have been proposed to mitigate these overheads by decomposing computations into finer-grained tasks and overlapping communication with sub-tasks as they complete. However, fine-grained decomposition of a large computation into many smaller computations on GPUs results in overheads. Furthermore, the communication itself uses many streaming multiprocessors (SMs), adding to the overhead. We present TokenWeave to address these challenges. TokenWeave proposes a Token-Splitting technique that divides the tokens in the inference batch into two approximately equal subsets in a wave-aware manner. The communication of one subset is then overlapped with the computation of the other. In addition, TokenWeave optimizes the order of the layer normalization computation with respect to communication operations and implements a novel fused AllReduce--RMSNorm kernel that carefully leverages Multimem instruction support available on Hopper and Blackwell NVIDIA GPUs. These optimizations allow TokenWeave to perform communication and RMSNorm using only 2-8 SMs. Moreover, our kernel enables the memory-bound RMSNorm to be overlapped with the other batch's computation, providing additional gains. Our evaluations demonstrate up to 1.29x speedup in latency and 1.26x higher throughput across multiple models and workloads. In several settings, TokenWeave results in better performance compared to an equivalent model with all communication removed.
