Adaptive Batch Processing and Resource Allocation for LLM Inference in Edge Computing
摘要
Large Language Models (LLMs) have revolutionized artificial intelligence, showcasing unprecedented capabilities across a wide range of tasks and significantly enhancing edge computing. However, deploying LLMs on edge devices presents challenges due to the distributed nature of users across edge nodes and the complexity of request types. To address these challenges, this paper first establishes an LLM inference model within an edge computing system and formulates an optimization problem aimed at maximizing the number of requests processed per unit time while satisfying user demands. To solve this problem, we model the system as a Semi-Markov Decision Process (SMDP) and employ reinforcement learning methods to propose the Dynamic Inference Separable Proximal Policy Optimization (DISPPO) algorithm. This algorithm dynamically adjusts the order of the prefill and decode stages. We evaluate the performance of DISPPO in edge-based LLM inference by comparing it with traditional inference methods. Simulation results demonstrate that DISPPO outperforms traditional methods in LLM inference scenarios. Additionally, we explore the algorithm’s performance across different batch sizes.