KV-Pipe: On the Relation Between KV Sharing and Pipeline Parallel Efficiency in LLMs
Maryam Dialameh, Hossein Rajabzadeh, Harish Krishnamoorthy Murali, Walid Ahmed, Weiwei Zhang, Hyock Ju Kwon
Abstract
Pipeline parallelism (PP) is widely used to scale large language model (LLM) training, but its efficiency is often limited by stage imbalance and pipeline bubbles. Meanwhile, cross-layer KV sharing has primarily been studied as a mechanism for reducing KV-cache costs during inference, without examining how KV reuse reshapes pipeline workloads. We present KV-Pipe, a stage-aware KV-sharing mechanism that turns KV reuse into a pipeline-balancing control knob. KV-Pipe starts from the tail stage, converts selected attention layers to cross-layer KV sharing in a tail-first order, and iteratively retargets the current bottleneck to drive the FLOPs Imbalance Ratio (FIR) toward 1. The procedure is performed offline and requires only a pipeline partition and per-layer FLOPs estimates, introducing negligible runtime overhead and requiring no online tuning. Across multiple pipeline-parallel configurations, KV-Pipe consistently improves utilization and throughput, achieving up to 9.2\% higher training MFU and up to a 9.8\% reduction in iteration time, with larger gains at higher pipeline-parallel degrees where stage imbalance is amplified. Furthermore, the same KV-sharing mechanism provides an inference-side benefit by reducing KV-cache growth and redundant KV projection work, resulting in higher decoding throughput for long-context workloads. These results identify KV layout as a system--architecture degree of freedom for jointly improving pipeline-parallel training efficiency and long-context inference.
Create a lesson
Related papers
Replication-Aware Placement of Functions and Data in the Edge-Cloud Continuum
Dario d'Abate, Matteo Cenzato, Matteo Briscini et al.
Ermes: a Stateful Serverless Platform for the Edge-to-Cloud Continuum
Matteo Cenzato, Dario d'Abate, Arianna Dragoni et al.
Fluid Notarization: Verifiable Evolution of Concurrently Edited Structured Documents
Amos Brocco, Giuliano Gremlich, Roberto Guidi
Ask the Tool, Don't Guess: Agent Tool Calls Hold Their Progress, and the Serving System Should Read It
Yipeng Liu, Yingqiang Zhang, Feifei Li et al.
A Distributed Computing Framework for Satellite Swarms
Ezra Fielding, Clement Demazure, Guthemberg Silvestre et al.
Vigil: Accountable Liveness against Selective Silence
Jiawei Cheng, Huiping Sun, Rui Zhou et al.