Seesaw: High-throughput LLM Inference via Model Re-sharding

Qidong Su, Wei Zhao, Xin Li, Muralidhar Andoorveedu, Chenhao Jiang, Zhanda Zhu, Kevin Song, Christina Giannoula, Gennady Pekhimenko

Abstract

Large Language Model (LLM) inference is characterized by two distinct phases: a compute-intensive prefill stage and a memory-bound decode stage. Current inference engines typically employ a static parallelization strategy across both phases, leading to significant inefficiencies. This paper introduces Seesaw, an inference engine that utilizes dynamic model re-sharding to adapt parallelization strategies to the specific requirements of each phase. By combining dynamic re-sharding with tiered CPU-GPU caching and transition-aware scheduling, Seesaw achieves up to a 1.78x throughput increase over state-of-the-art engines like vLLM, particularly in resource-constrained PCIe-based environments.

Introduction

The deployment of Large Language Models (LLMs) at scale faces a fundamental challenge: the "one-size-fits-all" nature of current parallelization strategies. LLM inference consists of a prefill phase, where the entire input prompt is processed to generate the initial Key-Value (KV) cache, and a decode phase, where tokens are generated one by one.

While the prefill phase is computationally heavy and benefits from strategies that minimize communication, the decode phase is primarily limited by memory bandwidth—specifically, how quickly model weights can be loaded. Existing systems typically commit to a single strategy, such as Tensor Parallelism (TP) or Pipeline Parallelism (PP), for the duration of a request. However, as this research demonstrates, the optimal strategy for prefilling is often the worst for decoding, and vice versa. Seesaw addresses this by dynamically "re-sharding" the model as it transitions between these two phases.

The Limitations of Static Parallelism

The inefficiency of static strategies stems from the inherent trade-offs between different parallelization modes:

  1. Tensor Parallelism (TP): TP splits model layers across multiple GPUs. While excellent for the decode phase because it parallelizes weight loading, it incurs massive communication overhead (all-reduce operations) during the prefill phase, especially as the number of tokens increases.
  2. Pipeline Parallelism (PP): PP divides the model's layers across GPUs in a sequence. This is efficient for prefilling because it minimizes inter-GPU communication. However, during decoding, PP requires "micro-batching" to maintain efficiency, which leads to redundant weight loading and idle hardware time.

Previous attempts to solve this via "disaggregation"—placing prefill and decode tasks on separate physical GPU clusters—often result in a throughput mismatch. In many real-world scenarios, such as an 8-GPU node, one set of GPUs may sit idle while the other becomes a bottleneck, leading to suboptimal resource utilization.

The Seesaw Architecture

Seesaw introduces a dynamic approach to resource management, treating inference like a balance that shifts based on workload demands. Its architecture is built on four pillars:

1. Dynamic Model Re-sharding

Instead of a fixed configuration, Seesaw re-partitions model weights and KV caches on the fly. It typically employs Pipeline Parallelism for the prefill stage to maximize throughput and minimize communication, then re-shards the model into a Tensor Parallelism configuration for the decode stage to maximize the speed of token generation.

2. Tiered KV Cache Buffering

Frequent re-sharding can introduce significant overhead. To mitigate this, Seesaw utilizes CPU memory as a strategic "waiting room" or buffer for the KV cache. The system completes a large batch of prefills, offloads the resulting KV caches to the CPU, and then brings them back to the GPU in a single, massive batch for an efficient decoding session.

3. Transition-Minimizing Scheduling

To prevent the system from constantly "flipping" between configurations, Seesaw uses a specialized scheduler. Rather than interleaving individual prefill and decode steps, it groups tasks to minimize the number of re-sharding events, ensuring that the cost of the transition is amortized over a large volume of processed tokens.

4. Asynchronous Pipelining

Seesaw hides the latency associated with moving data between the CPU and GPU by overlapping these transfers with active computation. This ensures that the GPUs remain utilized even while the system is preparing for the next phase of inference.

Experimental Evaluation

The researchers evaluated Seesaw against vLLM using two primary datasets representing common offline workloads:

  • ShareGPT: A dataset of conversational history with balanced input and output lengths.
  • arXiv-summarization: A dataset featuring long input prompts (scientific papers) and shorter outputs, placing extreme pressure on the prefill stage.

Testing was conducted on NVIDIA A10, L4, and A100 GPUs. A particular focus was placed on systems connected via PCIe (such as AWS G5 instances), which have lower interconnect bandwidth compared to high-end NVLink systems, making them more sensitive to communication bottlenecks.

Key Results and Insights

Seesaw demonstrated substantial performance improvements across all tested configurations:

  • Throughput Gains: Seesaw achieved an average speedup of 1.36x and a peak improvement of 1.78x compared to vLLM.
  • PCIe Efficiency: The most dramatic gains were observed on PCIe-based systems. By reducing the reliance on high-bandwidth interconnects during the prefill phase, Seesaw effectively allows cheaper GPU clusters to perform at levels previously reserved for expensive NVLink-enabled hardware.
  • Workload Adaptability: Unlike static engines, which see performance degrade when the ratio of input-to-output tokens changes, Seesaw maintained high throughput across varying workloads. It successfully adapted to both the long-context requirements of arXiv summarization and the balanced nature of ShareGPT.

Conclusion and Future Work

Seesaw proves that the bottleneck in LLM inference is not just hardware capacity, but the rigidity of software execution strategies. By treating model sharding as a dynamic variable rather than a static constant, Seesaw balances the scales between prefill and decode efficiency.

Future research directions include the integration of more complex strategies like sequence parallelism and the development of machine-learning-based controllers to automatically select the optimal sharding strategy based on real-time hardware telemetry and model architecture. While re-sharding latency remains a factor for ultra-low-latency applications, for high-throughput offline processing, Seesaw represents a significant leap forward in inference engine design.

Summary updated

Abstract

To improve the efficiency of distributed large language model (LLM) inference, various parallelization strategies, such as tensor and pipeline parallelism, have been proposed. However, the distinct computational characteristics inherent in the two stages of LLM inference—prefilling and decoding—render a single static parallelization strategy insufficient for the effective optimization of both stages. In this work, we present Seesaw, an LLM inference engine optimized for throughput-oriented tasks. The key idea behind Seesaw is dynamic model re-sharding, a technique that facilitates the dynamic reconfiguration of parallelization strategies across stages, thereby maximizing throughput at both phases. To mitigate re-sharing overhead and optimize computational efficiency, we employ tiered KV cache buffering and transition-minimizing scheduling. These approaches work synergistically to reduce the overhead caused by frequent stage transitions while ensuring maximum batching efficiency. Our evaluation demonstrates that Seesaw achieves a throughput increase of up to 1.78$\times$ (1.36$\times$ on average) compared to vLLM, the most widely used state-of-the-art LLM inference engine.
BibTeX
@inproceedings{su2025seesaw,
  author = {Qidong Su and Wei Zhao and Xin Li and Muralidhar Andoorveedu and Chenhao Jiang and Zhanda Zhu and Kevin Song and Christina Giannoula and Gennady Pekhimenko},
  title = {{Seesaw: High-throughput LLM Inference via Model Re-sharding}},
  booktitle = {MLSys},
  year = {2025},
  url = {https://openreview.net/forum?id=YDksTjY3YY},
}
Figure