Layer-wise CPU-GPU Scheduling for LLM Inference on Memory-Limited Consumer GPUs
Naoto Sugiura, Yuta Tokusashi, Hiroki Matsutani
Abstract
As large language model inference environments expand toward consumer devices, it remains challenging to efficiently run models that exceed GPU memory capacity in single-GPU settings. The latency of transferring weights that do not fit in GPU memory accounts for about 98\% of inference time and remains a major obstacle. In this paper, we focus on the fact that during the decode phase, layer computation time on the CPU can be shorter than weight transfer time, presenting an opportunity to hide weight transfers by utilizing this computation time. Therefore, we propose a method to hide transfer latency by executing certain layers on the CPU during the decode phase while asynchronously transferring the next layer's weights to the GPU in the background of that computation. To realize this scheduling, we formulate the placement of CPU/GPU computation and weight transfers as a latency minimization problem and perform optimization using an approximation model with relaxed temporal constraints. Evaluation results confirm that in a consumer desktop environment, our approach accelerates OPT-30B inference by 3.5x compared to HuggingFace Accelerate and 6.3x compared to DeepSpeed Zero-Inference.
Create a lesson
Related papers
GC-MoE: Overlapping Expert-Parallel Token Dispatch with FP8/FP4 Grouped GEMM via CUDA Green Contexts
Yong Li, Kan Liu, Tao Lan
When the Consumer Is an Agent: Execution-Grounded Service-Level Agreements
Michal Orzechowski, Renata G. Slota, Jacek Kitowski
PhotonZip: Lifecycle-Aware Compression for HDF5-Based Synchrotron Workflows
Haoxu Li, Wenjing Huang, Chengyu Liu et al.
EpiLoRA: Fusing Many LoRA Adapters into Low-Precision GEMMs for Serving and RL
Hieu Tran, Hong Yu
INSIGHT-HPC: An Interpretable System Intelligence for Global HPC Telemetry
Rupak Kadel, Jie Li, Yong Chen
DynSL: Resource-Adaptive Model Training across Heterogeneous Edge Devices
Boris Radovič, Istemi Ekin Akkus, Marco Canini et al.