PIPO: Pipelined Offloading for Efficient Inference on Consumer Devices — Detailed Summary

Yangyijian Liu, Jun Li, Wu-Jun Li | School of Computer Science, Nanjing University, China | arXiv:2504.03664v2 (cs.DC), 13 Jun 2025 | Preprint, under review

Per-section summary organized by the paper's headings. Each section includes paragraph-level bullet points and exact quantitative results where the paper provides them.


Abstract


1. Introduction

Background and motivation:

Memory wall on consumer devices:

Three memory-reduction techniques:

Why offloading is necessary:

Offloading mechanics and prior art:

Two issues in existing offloading frameworks:

Main contributions:


Quantization from an algorithmic perspective:


3. Pipelined Offloading

                    model info        hardware spec / system load
  +-------+        -----------> +----------------+ <----------------- +-----------+
  |  LLM  |                     |   Automatic    |                    | Hardware  |
  | layers|                     | Configuration  |                    |  Disk     |
  +-------+                     +-------+--------+                    | (NVMe M.2)|
                                        |                            |  CPU/DRAM |
  +-------------------------------------v---------------------+      |  GPU/VRAM |
  | Task Queue --> Task Divide                                |      +-----------+
  |  [comp][wload][kvload][kvsave] ...                        |
  | +-----------+   +-------------------------------------+   |   +-------------+
  | | ThreadPool|   | Pipeline:                           |   |   | Transfer    |
  | | Thread 0  |   | load weight | load cache | ...      |   |   | Suite       |
  | | Thread 1  |   | InputEmbed->MHA->MLP->MHA-> ... ->  |   |   +-------------+
  | | Thread 2  |   | save cache       MLP->OutputEmbed   |   |   | Compute     |
  | | Thread 3  |   +-------------------------------------+   |   | Kernel      |
  | +-----------+                                             |   +-------------+
  +-----------------------------------------------------------+

Operational overview:

3.1 Offloading Architecture

3.1.1 Offloading Strategies

3.1.2 Task Design

3.2 Pipeline Design

Algorithm 1 — Pipeline Scheduling:

for i in generation_length do
  for j in num_layer do
    CallLoadData(i, j)         # Preload weight and cache for subsequent layers
    PrepareInput(i, j)         # Prepare hidden and mask
    SynchronizeLoadTask(i, j)  # Synchronize current layer's data loading tasks
    Compute(i, j)              # Current layer's computation
    if layer[j] == MHA then
      CallStoreCache(i, j)     # Store KV-cache before loaded
    end if
  end for
end for

3.2.1 Thread Pool Configuration

3.2.2 Pipeline Scheduling

3.2.3 Performance-Memory Tradeoff

3.3 Data Transfer Suite

3.4 Computation Optimization

3.5 Automatic Configuration

Configuration formalism (LLaMA3.1 family example):

System/hardware inputs and the configuration decision (Eq. 1):

Weight on:  GPU,  if W + M < M_GPU
            CPU,  if W + C < M_CPU and B_SSD < B_GPU
            Disk, else

Pipeline:   Performance-optimized,  if M < M_GPU
            Memory-efficient,       else                          (Eq. 1)

Algorithm 2 — PIPO Workflow:

Input: model M, batch size b, length s, precision p, CPU memory M_CPU,
       GPU memory M_GPU, GPU bandwidth B_GPU, SSD bandwidth B_SSD
S_off, S_pipe = Configure(M, b, s, p, M_CPU, M_GPU, B_GPU, B_SSD)  # Auto Config
InitModel(M, b, s, p)                       # Init Model Data
InitTransferSuitAndOperators(M, b, p, S_off)# Init PIPO components
ConstructTaskandQueue(M)                    # Build Inference Runtime
PipelineScheduling()                        # Generation (Call Algorithm 1)

4. Experiment

4.1 Experimental Setting

4.2 Results

End-to-end throughput (Figure 5; X axis = weight storage type and batch size; 'G-4' = weight on GPU bs=4, 'C-8' = CPU-offloading bs=8, 'D-16' = disk-offloading bs=16):

Transfer speed and GPU utilization (Appendix C.1):

Ablation study (Appendix C.2, Figure 9): confirms PIPO's pipeline scheduling contributes the most significant performance gain (1.97x speedup).

TTFT (Appendix C.6): PIPO achieves a 42.5% reduction in time-to-first-token.

Memory footprint (Appendix C.7, C.8): compared to a non-offload implementation, PIPO reduces VRAM usage by 66.4% with only 11.2% performance degradation.


5. Conclusion


Appendix A — Experiments about Block Size

Appendix B — Memory Constraints

Appendix C — Supplementary Experimental Results

Appendix D — Combination with Parallelism Techniques


Limitations (stated and implied)

Future Work / Open Problems

NCCL / Collective Communication Relevance