arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2303.14882cs.LGcs.AR
收藏

TransCODE:协同设计Transformers和加速器,实现高效训练和推理

TransCODE: Co-design of Transformers and Accelerators for Efficient Training and Inference

Princeton University(普林斯顿大学)

Shikhar Tuli, Niraj K. Jha

摘要:

机器学习模型和评估硬件的自动协同设计对于大规模有效部署此类模型至关重要。尽管Transformer模型具有最先进的性能,但它们还不能在资源受限的硬件平台上执行。Transformer架构的高存储器要求和低并行性加剧了这个问题。最近提出的加速器试图优化Transformer模型的吞吐量和能耗。然而,这样的工作要么局限于模型架构的片面搜索,要么局限于一组现成的设备。此外,以前的工作只加速模型推理而不是训练,这会导致更高的内存和计算资源,使问题更具挑战性。为了解决这些限制,这项工作提出了一个动态的训练框架,称为DynaProp,加快训练过程,减少内存消耗。DynaProp是一种低开销的修剪方法,可以在运行时修剪激活和梯度。为了有效地执行这种方法的硬件上的一组不同的Transformer架构,我们提出了ELECTOR,一个框架,模拟Transformer推理和训练的设计空间的加速器。我们使用这个模拟器结合拟议的协同设计技术,称为代码转换,以获得最佳性能的模型,在给定的任务上具有高精度,并最大限度地减少延迟,能耗和芯片面积。所获得的变压器-加速器对实现了比最先进的对高0.3%的准确度,同时产生低5.2 $\times$的延迟和低3.0 $\times$的能量消耗。

英文摘要:

Automated co-design of machine learning models and evaluation hardware is critical for efficiently deploying such models at scale. Despite the state-of-the-art performance of transformer models, they are not yet ready for execution on resource-constrained hardware platforms. High memory requirements and low parallelizability of the transformer architecture exacerbate this problem. Recently-proposed accelerators attempt to optimize the throughput and energy consumption of transformer models. However, such works are either limited to a one-sided search of the model architecture or a restricted set of off-the-shelf devices. Furthermore, previous works only accelerate model inference and not training, which incurs substantially higher memory and compute resources, making the problem even more challenging. To address these limitations, this work proposes a dynamic training framework, called DynaProp, that speeds up the training process and reduces memory consumption. DynaProp is a low-overhead pruning method that prunes activations and gradients at runtime. To effectively execute this method on hardware for a diverse set of transformer architectures, we propose ELECTOR, a framework that simulates transformer inference and training on a design space of accelerators. We use this simulator in conjunction with the proposed co-design technique, called TransCODE, to obtain the best-performing models with high accuracy on the given task and minimize latency, energy consumption, and chip area. The obtained transformer-accelerator pair achieves 0.3% higher accuracy than the state-of-the-art pair while incurring 5.2$\times$ lower latency and 3.0$\times$ lower energy consumption.

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

↑