Beyond the Cloud: Edge Inference for Generative Large Language Models in Wireless Networks
Generative Artificial Intelligenge (GAI) is revolutionizing the world with its unprecedented content creation ability. Large Language Model (LLM) is one of its most embraced branches. However, due to LLM’s substantial size and resource-intensive nature, it is cloud-hosted, raising concerns about privacy, usage limitations, and latency. In this paper, we propose to utilize ubiquitous distributed wireless edge computing resources for real-time LLM inference. Specifically, we introduce a novel LLM edge inference framework, incorporating batching and model quantization to ensure high throughput inference on resource-limited edge devices. Then, based on the architecture of transformer decoder-based LLMs, we formulate an edge inference optimization problem which is NP-hard, considering batch scheduling and joint allocation of communication and computation resources. The solution is the optimal throughput under edge resource constraints and heterogeneous user requirements on latency and accuracy. To solve this NP-hard problem, we develop an OT-GAH (Optimal Tree-search with Generalized Assignment Heuristics) algorithm with reasonable complexity and <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">$\frac {1}{2}$ </tex-math></inline-formula>-approximation ratio. We first design the OT algorithm with online tree-pruning for single-edge-node multi-user case, which navigates the inference request selection within the tree structure to miximize throughput. We then consider the multi-edge-node case and propose the GAH algorithm, which recrusively invokes the OT in each node’s inference scheduling iteration. Simulation results demonstrate the superiority of OT-GAH batching over other benchmarks, revealing an over 45% time complexity reduction compared to brute-force searching.
Authors
- Zehui Xiong (ORCID: https://orcid.org/0000-0002-4440-941X)
- Jiangtian Nie (ORCID: https://orcid.org/0000-0003-1414-0621)
- Yudong Huang (ORCID: https://orcid.org/0000-0002-7178-9067)
- Dusit Niyato (ORCID: https://orcid.org/0000-0002-7442-7416)
- Jiang Liu (ORCID: https://orcid.org/0000-0002-0729-1299)
- Xinyuan Zhang (ORCID: https://orcid.org/0000-0003-2141-431X)
- Xuemin Shen (ORCID: https://orcid.org/0000-0002-4140-287X)
- Gaochang Xie (ORCID: https://orcid.org/0000-0002-1561-3577)
Institutions
- Beijing University of Posts and Telecommunications (CN)
- University of Waterloo (CA)
- Singapore University of Technology and Design (SG)
- Nanyang Technological University (SG)
- State Key Laboratory of Networking and Switching Technology
Publication Details
- Journal
- IEEE Transactions on Wireless Communications
- Published
- 2024-11-20
- DOI
- https://doi.org/10.1109/twc.2024.3497923
- Citations
- 31
- Primary Topic
- Recommender Systems and Techniques
- Type
- article
- Field-Weighted Citation Impact
- 24.15