arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.14371cs.DC
收藏

EdgeShard:通过协作边缘计算实现高效的大语言模型推理

EdgeShard: Efficient LLM Inference via Collaborative Edge Computing

Mingjin Zhang, Jiannong Cao, Xiaoming Shen, Zeyang Cui

AI总结:

针对大语言模型云推理延迟高、成本高和隐私问题,本文提出协作边缘计算框架EdgeShard,通过模型分片和动态规划优化设备选择与分区,在异构原型上实现高达50%延迟降低和2倍吞吐量提升。

摘要:

大语言模型(LLMs)在自然语言处理和内容生成方面展现出巨大潜力。然而,当前的LLMs严重依赖云计算,导致延迟时间长、带宽成本高以及隐私问题。边缘计算通过将LLMs部署在更靠近数据源的边缘设备上,有望解决这些问题。一些工作尝试利用模型量化来减小模型大小以适应资源受限的边缘设备,但这会导致精度损失。其他工作采用云边协作,但受制于不稳定的网络连接。在这项工作中,我们利用协作边缘计算促进边缘设备与云服务器之间的协作,共同执行高效的LLM推理。我们提出了一个通用框架,将LLM模型划分为分片并部署在分布式设备上。为了实现高效的LLM推理,我们构建了一个自适应联合设备选择和模型分区问题,并设计了一种高效的动态规划算法,分别优化推理延迟和吞吐量。在异构物理原型上对Llama2系列模型的实验表明,EdgeShard相较于基线方法实现了高达50%的延迟降低和2倍的吞吐量提升。

英文摘要:

Large language models (LLMs) have shown great potential in natural language processing and content generation. However, current LLMs heavily rely on cloud computing, leading to prolonged latency, high bandwidth cost, and privacy concerns. Edge computing is promising to address such concerns by deploying LLMs on edge devices, closer to data sources. Some works try to leverage model quantization to reduce the model size to fit the resource-constraint edge devices, but they lead to accuracy loss. Other works use cloud-edge collaboration, suffering from unstable network connections. In this work, we leverage collaborative edge computing to facilitate the collaboration among edge devices and cloud servers for jointly performing efficient LLM inference. We propose a general framework to partition the LLM model into shards and deploy on distributed devices. To achieve efficient LLM inference, we formulate an adaptive joint device selection and model partition problem and design an efficient dynamic programming algorithm to optimize the inference latency and throughput, respectively. Experiments of Llama2 serial models on a heterogeneous physical prototype demonstrate that EdgeShard achieves up to 50% latency reduction and 2x throughput improvement over baseline methods.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑