Edge Intelligence Optimization for Large Language Model Inference with Batching and Quantization

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Zhang, Xinyuan, Liu, Jiang, Xiong, Zehui, Huang, Yudong, Xie, Gaochang, Zhang, Ran
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866929340780904448
author Zhang, Xinyuan
Liu, Jiang
Xiong, Zehui
Huang, Yudong
Xie, Gaochang
Zhang, Ran
author_facet Zhang, Xinyuan
Liu, Jiang
Xiong, Zehui
Huang, Yudong
Xie, Gaochang
Zhang, Ran
contents Generative Artificial Intelligence (GAI) is taking the world by storm with its unparalleled content creation ability. Large Language Models (LLMs) are at the forefront of this movement. However, the significant resource demands of LLMs often require cloud hosting, which raises issues regarding privacy, latency, and usage limitations. Although edge intelligence has long been utilized to solve these challenges by enabling real-time AI computation on ubiquitous edge resources close to data sources, most research has focused on traditional AI models and has left a gap in addressing the unique characteristics of LLM inference, such as considerable model size, auto-regressive processes, and self-attention mechanisms. In this paper, we present an edge intelligence optimization problem tailored for LLM inference. Specifically, with the deployment of the batching technique and model quantization on resource-limited edge devices, we formulate an inference model for transformer decoder-based LLMs. Furthermore, our approach aims to maximize the inference throughput via batch scheduling and joint allocation of communication and computation resources, while also considering edge resource constraints and varying user requirements of latency and accuracy. To address this NP-hard problem, we develop an optimal Depth-First Tree-Searching algorithm with online tree-Pruning (DFTSP) that operates within a feasible time complexity. Simulation results indicate that DFTSP surpasses other batching benchmarks in throughput across diverse user settings and quantization techniques, and it reduces time complexity by over 45% compared to the brute-force searching method.
format Preprint
id arxiv_https___arxiv_org_abs_2405_07140
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Edge Intelligence Optimization for Large Language Model Inference with Batching and Quantization
Zhang, Xinyuan
Liu, Jiang
Xiong, Zehui
Huang, Yudong
Xie, Gaochang
Zhang, Ran
Machine Learning
Artificial Intelligence
Networking and Internet Architecture
Generative Artificial Intelligence (GAI) is taking the world by storm with its unparalleled content creation ability. Large Language Models (LLMs) are at the forefront of this movement. However, the significant resource demands of LLMs often require cloud hosting, which raises issues regarding privacy, latency, and usage limitations. Although edge intelligence has long been utilized to solve these challenges by enabling real-time AI computation on ubiquitous edge resources close to data sources, most research has focused on traditional AI models and has left a gap in addressing the unique characteristics of LLM inference, such as considerable model size, auto-regressive processes, and self-attention mechanisms. In this paper, we present an edge intelligence optimization problem tailored for LLM inference. Specifically, with the deployment of the batching technique and model quantization on resource-limited edge devices, we formulate an inference model for transformer decoder-based LLMs. Furthermore, our approach aims to maximize the inference throughput via batch scheduling and joint allocation of communication and computation resources, while also considering edge resource constraints and varying user requirements of latency and accuracy. To address this NP-hard problem, we develop an optimal Depth-First Tree-Searching algorithm with online tree-Pruning (DFTSP) that operates within a feasible time complexity. Simulation results indicate that DFTSP surpasses other batching benchmarks in throughput across diverse user settings and quantization techniques, and it reduces time complexity by over 45% compared to the brute-force searching method.
title Edge Intelligence Optimization for Large Language Model Inference with Batching and Quantization
topic Machine Learning
Artificial Intelligence
Networking and Internet Architecture
url https://arxiv.org/abs/2405.07140