DynaPipe: Dynamic Layer Redistribution for Efficient Serving of LLMs with Pipeline Parallelism

Hongxin Xu, Tianyu Guo, Xian-Wei Zhang
1/1/2025

No confident code implementation found for this paper.

Abstract

To accelerate large language model (LLM) inference, pipeline parallelism partitions model layers into sequential stages, each assigned to a different device for concurrent execution. However, this method often suffers from pipeline bubbles caused by imbalanced computation in the tail stage.

Show full abstract

While upstream stages focus solely on layer-forward operations, the final stage must also handle additional post-processing tasks like sampling, which introduces significant latency. This discrepancy in workload leads to pipeline misalignment, forcing upstream stages to idle and degrading overall performance. Existing frameworks typically distribute layers evenly across stages without accounting for computational load differences. To address this, we propose DynaPipe , a dynamic layer redistribution scheme that adaptively balances computation by predicting execution latency in real time. Moreover, we introduce an asynchronous key-value (KV) cache migration coordinator to enable non-blocking layer redistribution during inference. Experiments on representative LLMs demonstrate that DynaPipe reduces average end-to-end request latency by 8% to 41% across diverse workloads, outperforming state-of-the-art pipeline parallelism systems. Our implementation is publicly available at https://github.com/xhx1022/DynaPipe .

DOISemantic Scholar

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{xu2025dynapipe,
  title  = {DynaPipe: Dynamic Layer Redistribution for Efficient Serving of LLMs with Pipeline Parallelism},
  author = {Hongxin Xu and Tianyu Guo and Xian-Wei Zhang},
  year   = {2025},
  doi    = {10.52202/085713-4569},
  url    = {https://doi.org/10.52202/085713-4569},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/32e899b049daefca933022e82fdd95b0ee74623c.svg)](https://codeofpaper.com/paper/32e899b049daefca933022e82fdd95b0ee74623c)

Discussion