Galaxy: A Resource-Efficient Collaborative Edge AI System for In-situ Transformer Inference

Shengyuan Ye,Jiangsu Du,Liekang Zeng,Wenzhong Ou,Xiaowen Chu,Yutong Lu,Xu Chen
DOI: https://doi.org/10.48550/arXiv.2405.17245
2024-05-27
Abstract:Transformer-based models have unlocked a plethora of powerful intelligent applications at the edge, such as voice assistant in smart home. Traditional deployment approaches offload the inference workloads to the remote cloud server, which would induce substantial pressure on the backbone network as well as raise users' privacy concerns. To address that, in-situ inference has been recently recognized for edge intelligence, but it still confronts significant challenges stemming from the conflict between intensive workloads and limited on-device computing resources. In this paper, we leverage our observation that many edge environments usually comprise a rich set of accompanying trusted edge devices with idle resources and propose Galaxy, a collaborative edge AI system that breaks the resource walls across heterogeneous edge devices for efficient Transformer inference acceleration. Galaxy introduces a novel hybrid model parallelism to orchestrate collaborative inference, along with a heterogeneity-aware parallelism planning for fully exploiting the resource potential. Furthermore, Galaxy devises a tile-based fine-grained overlapping of communication and computation to mitigate the impact of tensor synchronizations on inference latency under bandwidth-constrained edge environments. Extensive evaluation based on prototype implementation demonstrates that Galaxy remarkably outperforms state-of-the-art approaches under various edge environment setups, achieving up to 2.5x end-to-end latency reduction.
Distributed, Parallel, and Cluster Computing,Artificial Intelligence,Machine Learning,Networking and Internet Architecture
What problem does this paper attempt to address?
### Problems Addressed by the Paper The paper aims to address the resource constraints faced by Transformer model inference on edge devices. Specifically, the traditional approach of offloading inference tasks to remote cloud servers not only increases the burden on backbone networks but also raises user privacy concerns. To overcome these issues, the paper proposes a collaborative edge AI system named Galaxy, which accelerates Transformer model inference through the following methods: 1. **Utilizing Multi-Device Collaboration**: It is observed that in common edge environments (such as smart homes), there are usually multiple trusted edge devices with idle resources. Galaxy leverages these devices for distributed computing to break the resource barriers between different heterogeneous devices. 2. **Hybrid Model Parallelism (HMP)**: A new hybrid model parallelism architecture is introduced, combining the advantages of Tensor Parallelism (TP) and Sequence Parallelism (SP) to optimize the distributed inference process across devices. 3. **Resource-Aware Workload Planning**: A workload planning algorithm is designed that comprehensively considers device heterogeneity and memory budgets, ensuring balanced workload distribution and full utilization of computational resources across devices. 4. **Fine-Grained Communication Optimization**: A tile-based fine-grained communication optimization scheme is proposed, which reduces the latency caused by tensor synchronization in bandwidth-constrained environments by decoupling the tight dependency between continuous computation and communication operations. Through the above methods, Galaxy significantly enhances inference performance in edge environments. Experimental results show that it can achieve up to 2.5 times reduction in end-to-end latency compared to existing methods.