EdgeShard: Efficient LLM Inference via Collaborative Edge Computing

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhang, Mingjin, Cao, Jiannong, Shen, Xiaoming, Cui, Zeyang
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910457738035200
author Zhang, Mingjin
Cao, Jiannong
Shen, Xiaoming
Cui, Zeyang
author_facet Zhang, Mingjin
Cao, Jiannong
Shen, Xiaoming
Cui, Zeyang
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2405_14371
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle EdgeShard: Efficient LLM Inference via Collaborative Edge Computing
Zhang, Mingjin
Cao, Jiannong
Shen, Xiaoming
Cui, Zeyang
Distributed, Parallel, and Cluster Computing
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.
title EdgeShard: Efficient LLM Inference via Collaborative Edge Computing
topic Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2405.14371