PIPO: Pipelined Offloading for Efficient Inference on Consumer Devices

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


Problem

Large language models have high memory and computation demand, making them hard to deploy on consumer devices (PCs, laptops) that use GPUs with limited memory — a 7B–30B model needs 15GB to tens of GB just for weights, and the KV-cache grows with sequence length and batch size. Quantization (4x reduction) is insufficient for a 30B model on an 8GB GPU, and sparsification causes accuracy loss, so offloading weights/KV-cache to CPU memory or NVMe disk is necessary. But existing offloading frameworks have two issues: insufficient inference concurrency (for OPT-30B with CPU-offloading, over 90% of inference time is spent on data transfer and GPU computation is only ~5%, leaving the GPU idle) and underutilization of disk bandwidth (frameworks like FlexGen primarily rely on CPU-offloading, requiring up to 200GB of CPU memory, and do not exploit NVMe SSD bandwidth).


Core Insight

A fine-grained, task-level-synchronized offloading pipeline backed by a compact three-thread pool — combined with an NVMe-aware data transfer suite and dequantization-free INT4 compute kernels — converts the GPU-idle, transfer-bound offloading regime into a high-concurrency one, raising GPU utilization from below 40% to over 90% on a 6GB consumer GPU.


Method

PIPO has three key components: (1) a pipeline + thread pool, (2) a transfer suite


Experimental Setup

Component Value
Primary device Lenovo Thinkbook laptop
GPU NVIDIA RTX3060 (6GB)
CPU memory 16GB
Storage 1TB M.2 SSD
Secondary device Desktop with RTX4090, 64GB (Appendix C.5)
Models OPT (1.3B, 6.7B, 13B, 30B, 66B), LLaMA3.1 (8B, 70B), LLaMA3.2-1B, MoE (Mixtral 8x7B, DeepSeek-R1 671B)
Precision FP16/BF16 and INT4 weights; activations FP16/BF16; INT4 KV-cache supported
Workload Text generation; prompt 512 tokens, generate 32 tokens; batch size 1–32
Baseline FlexGen (SOTA offloading), extended to support LLaMA
Implementation Reconstruction/extension of FlexGen with new C++/CUDA + Python modules
Runs Averaged over at least 3 independent runs
Block size 32MB (tuned via Appendix A: disk->CPU best at 8MB ~12.2 GB/s; CPU->GPU saturates above 32MB ~22–23 GB/s)

Headline Quantitative Results

End-to-end throughput vs. FlexGen:

GPU utilization: raised from below 40% to over 90% — 36%->97% (LLaMA3.1-8B INT4 bs=16) and 37%->93% (OPT-30B INT4 bs=12).

Transfer speed: 26% improvement in disk-to-GPU transfer speed (suite beats FlexGen's PyTorch implementation once data size exceeds 8MB).

Ablation (INT4 OPT-13B, bs=4, disk): pipeline scheduling alone = 1.97x; +transfer suite = 2.41x; +compute kernel = 2.66x over FlexGen — pipeline scheduling is the largest single contributor.

Latency (LLaMA3.1-8B, bs=1, disk): 42.5% TTFT reduction; e.g., at context 512, TTFT 2.120s->1.218s and decode latency 2.074s->0.837s.

Memory footprint: vs. a non-offload implementation, PIPO reduces VRAM by 66.4% at only 11.2% performance degradation; disk-offloading cuts DRAM usage by up to 10GB while matching FlexGen throughput.

MoE on a 6GB/16GB laptop: 12.482 tokens/s on Mixtral 8x7B; DeepSeek-R1 671B completed at 0.13 tokens/s (disk-offloading) — no prior work deployed these on such limited VRAM/DRAM.

High-end (RTX4090) partial offloading: LLaMA3.1-70B-INT4 (40% GPU/60% CPU) 5.454->7.718 tokens/s; OPT-30B-FP16 (45% GPU/55% CPU) 6.870->8.665 tokens/s.


Limitations


Open Problems Called Out

  1. Predicting/scheduling MoE experts before the gate operator to better overlap expert weight loading with computation.
  2. Deeper integration of DP/TP/PP/EP parallelism with pipelined offloading for multi-GPU consumer and server settings.
  3. Generalizing automatic block-size and configuration selection across a wider range of consumer hardware.