Search arXivSearch

arXiv · 2403.01164

HeteGen: Heterogeneous Parallel Inference for Large Language Models on Resource-Constrained Devices

Abstract

In recent times, the emergence of Large Language Models (LLMs) has resulted in increasingly larger model size, posing challenges for inference on low-resource devices. Prior approaches have explored offloading to facilitate low-memory inference but often suffer from efficiency due to I/O bottlenecks. To achieve low-latency LLMs inference on resource-constrained devices, we introduce HeteGen, a novel approach that presents a principled framework for heterogeneous parallel computing using CPUs and GPUs. Based on this framework, HeteGen further employs heterogeneous parallel computing and asynchronous overlap for LLMs to mitigate I/O bottlenecks. Our experiments demonstrate a substantial improvement in inference speed, surpassing state-of-the-art methods by over 317% at most.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Xuanlei Zhao, Bin Jia, Haotian Zhou, Ziming Liu, Shenggan Cheng, Yang You. 2024-03-02. HeteGen: Heterogeneous Parallel Inference for Large Language Models on Resource-Constrained Devices. https://arxiv.org/abs/2403.01164

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Accelerating Transfer-Learning-Based Autotuning with Predictive LLVM IR Performance Ranking

As the complexity of High Performance Computing (HPC) ecosys- tems continually increases, achieving optimal performance becomes a challenge. Traditional performance autotuning techniques pro- vide promising means to navigate this complexity, these techniques remain computationally intensive and require many evaluations to find optimal configurations. This work proposes an autotuning framework that designs a machine learning-based ensemble LLVM Intermediate Representa- tion (IR) ranker, Neural Configuration Scorer (NCS). NCS ranks the performance of IRs sampled by a transfer-learning-based autotuner, improving the efficiency of the tuning process by reducing tuning overheads and circumventing subpar evaluations. By leveraging knowledge from related tasks, we are able to effectively exploit the transfer relationship to access high-performing configurations in fewer samples than traditional techniques that rely upon itera- tive refinement. Our framework can achieve similar performance improvements as state-of-the-art autotuning techniques with up to 61.67% fewer evaluations, averaging 27.85% fewer evaluations across various HPC benchmarks.

cs.PF

Learning Metastable Dynamics

Metastability---a phenomenon where systems remain trapped in quasi-stable states before abruptly transitioning under rare perturbations---is ubiquitous in physical systems. Although metastability is a widely observed phenomenon, its identification and analysis present significant challenges. To address these challenges, we propose a novel framework for analyzing metastability using Koopman theory. We use a finite set of system trajectories to learn a representation of the dynamics that defines a latent space in which the system evolves linearly, thereby enabling a systematic characterization of metastable behavior through the spectral properties of the linear mapping. Empirical evaluations demonstrate that our approach is capable of anticipating metastable behavior significantly earlier than its actual manifestation, even with $10\%$ of the simulation duration. Moreover, we establish that the dominant eigenvalue of the learned Koopman matrix in the latent space serves as a critical indicator for detecting metastability across both single-server and multi-server configurations.

cs.PF

Pareto-Optimal Scheduling in the Half-batch Multiserver-job Model

In large-scale computing systems, jobs often demand heterogeneous server allocations: large jobs that occupy a substantial fraction of the servers are of high importance and are thus latency-sensitive, while small jobs fill in the remaining capacity to maintain throughput. To model this dynamic, we introduce the half-batch multiserver-job (MSJ) framework, a queueing model in which large jobs arrive according to a Poisson process and require all servers simultaneously, while small jobs, each needing only one server, are always available. We prove that, in the half-batch MSJ model, the Pareto frontier for large-job mean response time and small-job throughput admits a simple and exact characterization. It is generated by a family of convoy policies, under which the system serves small jobs until $k$ large jobs have arrived and then switches to serving large jobs, together with convex combinations of neighboring convoy policies. Our result is fully general and non-asymptotic, holding for every stable arrival rate $λ$, every number of servers $n$, and every large-job size distribution $S$.

cs.PF