LiquidCP: Decoupling Attention Tasks from Communication and Kernel Boundaries in Context Parallelism
Hongyu Chen, Yikang Ruan, Yuhai Long, Ziyu Huang, Yiyu Luo, Liukun Yu, Yangjie Zhou, Zihan Liu, Weihao Cui, Zijun Li, Anbang Wu, Yu Feng, Jing Yang, Jingwen Leng, Bingsheng He, Minyi Guo, Shixuan Sun
Abstract
Context parallelism (CP) partitions long sequences across GPUs for LLM training and inference. For variable-length training and full prefill, attention-balanced placement can leave token loads uneven, while ring execution repeats overhead at each computation and communication step. In stage-serialized decode CP (DCP), long-running tasks delay dependent work and leave substantial GPU hardware idle. We propose LiquidCP, which unifies training and inference through a common model of Transfer, Compute, and Reduction tasks with tile-level dependencies, decoupling attention tasks from communication and kernel boundaries. For training and full prefill, MegaRing incorporates BuddyRing placement to balance attention and token loads, and coalesces ready KV regions during forward attention to amortize overhead. For decoding and mixed batches, MegaDCP selects history-KV splits by jointly modeling the completion of attention and its dependent reductions. A shared persistent GPU-resident engine executes both designs. Compared with the fastest baseline per configuration on eight H100 GPUs, MegaRing achieves geometric-mean core-attention speedups of 1.23× forward and 1.18× backward, and accelerates a Transformer layer by 1.08--1.16×. MegaDCP achieves geometric-mean core-attention speedups of 1.20× for decode-only and 1.35× for mixed batches. In vLLM serving with KV prefix cache, it achieves an average time-to-first-token speedup of 1.22×.
Create a lesson
Related papers
Twindex: Index Cache Offloading with Coarse-to-Fine Selection for Long-Context Sparse-Attention Serving
Shared title terminology · Yuxuan Xia, Jiakun Fan, Han Meng et al.
Can Agentic LLMs Write Task-Based Parallel Code? A Study of OpenMP Tasking, HPX, StarPU and TTG
Shared title terminology · Linus Bantel, Anna-Lena Roth, Tim Thüring et al.
SS-HSDP: Efficient and Flexible Sharded Data Parallelism via Runtime-Update Decoupling
Shared title terminology · Chendong Xiang, Pengle Zhang, Jinliang Li et al.
Decode Token Parallelism: Memory-Efficient Distributed Attention Parallelism for Scalable LLM Decoding
Shared title terminology · Susav Shrestha, Brad Settlemyer, Narasimha Reddy
KOSMOS: Self-scheduling Persistent Kernels for Communication-Compute Overlap
Shared title terminology · Alexander Magro, Aristotle Martin, Ye Wang et al.
DMuon-2: Scaling Matrix Optimizers in Data Parallelism with Topology-Aware Matrix Ownership and Communication
Shared title terminology · Starrick Liu, Ruizhi Chengze, Lufang Chen et al.