arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2508.20375cs.DCcs.LGcs.PF
收藏

CoFormer:与异构边缘设备协作实现可扩展的Transformer推理

CoFormer: Collaborating with Heterogeneous Edge Devices for Scalable Transformer Inference

School of Information and Electrionics, Beijing Institute of Technology(信息与电子学院,北京理工大学);School of Cyber Science and Technology, Shenzhen Campus of Sun Yat-sen University(网络安全科学与技术学院,中山大学深圳校区);School of Computer Science, National Engineering Research Center for Multimedia Software, Wuhan University(计算机学院,多媒体软件国家工程研究中心,武汉大学);Information Technology Service Center of People’s Court, Beijing(人民法院信息技术服务中心,北京);College of Computing and Data Science, Nanyang Technological University(计算与数据科学学院,南洋理工大学)

Guanyu Xu, Zhiwei Hao, Li Shen, Yong Luo, Fuhui Sun, Xiaoyan Wang, Han Hu, Yonggang Wen

AI总结:

CoFormer提出将大型Transformer分解为多个小模型并在异构边缘设备上分布式协作推理,通过DeBo算法优化分解策略与模型校准,在保持性能的同时实现显著加速、降内存与降能耗。

摘要:

Transformer模型的卓越性能推动了资源受限边缘设备上智能应用的部署。然而,由于这些模型巨大的计算需求和资源要求,确保实时边缘系统的高质量服务是一项重大挑战。现有策略通常要么将Transformer计算卸载到其他设备,要么在单个边缘设备上直接部署压缩模型。然而,这些策略要么导致相当大的通信开销,要么在准确性与效率之间产生次优的权衡。为应对这些挑战,我们提出了一种面向通用Transformer模型的协作推理系统,称为CoFormer。CoFormer背后的核心思想是利用Transformer的可分解性与可整合性。一个现成的大型Transformer可以被分解为多个较小的模型进行分布式推理,并将它们的中间结果聚合以生成最终输出。我们将该问题形式化为一个优化问题,以在异构硬件约束下同时最小化推理延迟和精度下降。我们提出DeBo算法,首先求解该优化问题以导出分解策略,然后逐步校准分解后的模型以恢复性能。我们展示了在异构边缘设备上支持多种Transformer模型的能力,对于大型Transformer模型实现了高达3.1倍的推理加速。值得注意的是,CoFormer使得具有16亿参数的GPT2-XL能够在边缘设备上高效推理,将内存需求降低了76.3%。CoFormer还可以在保持令人满意的推理性能的同时,将能耗降低约40%。

英文摘要:

The impressive performance of transformer models has sparked the deployment of intelligent applications on resource-constrained edge devices. However, ensuring high-quality service for real-time edge systems is a significant challenge due to the considerable computational demands and resource requirements of these models. Existing strategies typically either offload transformer computations to other devices or directly deploy compressed models on individual edge devices. These strategies, however, result in either considerable communication overhead or suboptimal trade-offs between accuracy and efficiency. To tackle these challenges, we propose a collaborative inference system for general transformer models, termed CoFormer. The central idea behind CoFormer is to exploit the divisibility and integrability of transformer. An off-the-shelf large transformer can be decomposed into multiple smaller models for distributed inference, and their intermediate results are aggregated to generate the final output. We formulate an optimization problem to minimize both inference latency and accuracy degradation under heterogeneous hardware constraints. DeBo algorithm is proposed to first solve the optimization problem to derive the decomposition policy, and then progressively calibrate decomposed models to restore performance. We demonstrate the capability to support a wide range of transformer models on heterogeneous edge devices, achieving up to 3.1$\times$ inference speedup with large transformer models. Notably, CoFormer enables the efficient inference of GPT2-XL with 1.6 billion parameters on edge devices, reducing memory requirements by 76.3\%. CoFormer can also reduce energy consumption by approximately 40\% while maintaining satisfactory inference performance.

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

↑