arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2108.10808cs.LGcs.AIcs.CC
收藏

Greenformers:通过低秩近似提高Transformer模型的计算和存储效率

Greenformers: Improving Computation and Memory Efficiency in Transformer Models via Low-Rank Approximation

The Hong Kong University of Science and Technology(香港科技大学)

Samuel Cahyawijaya

摘要:

在这篇论文中,我们介绍了Greenformers,一个集合的模型效率的方法来提高最近著名的Transformer模型的效率与低秩近似的方法。深度学习模型的发展趋势是向更复杂、更大的模型发展。虽然它可以带来更好、更准确的预测,但最终的模型成本更高,因为它需要使用大量GPU资源进行数周的训练。特别是,自2017年首次亮相以来,基于transformer的模型的大小和计算成本已从约1亿个参数大幅增加到2021年初的约1.6万亿个参数。这种计算量巨大的模型也给环境带来了巨大的成本,甚至达到了令人担忧的碳足迹水平。其中一些模型是如此庞大,以至于在没有GPU集群的情况下甚至不可能运行模型。Greenformer通过应用低秩近似方法来提高Transformer模型的模型效率。具体来说,我们提出了一种低秩因式分解方法,以提高效率的Transformer模型称为低秩Transformer。我们进一步比较我们的模型与现有的低秩因子分解方法称为Linformer。基于我们的分析,低秩Transformer模型适合于提高处理短序列(<= 512)输入数据的时间和存储器效率,而Linformer模型适合于提高处理长序列输入数据(>= 512)的效率。我们还表明,低秩Transformer更适合于设备上部署,因为它显着减少了模型的大小。此外,我们估计,将LRT应用于现有的BERT基础模型可以显着降低计算,经济和环境成本,开发此类模型的原始成本的30%以上。

英文摘要:

In this thesis, we introduce Greenformers, a collection of model efficiency methods to improve the model efficiency of the recently renowned transformer models with a low-rank approximation approach. The development trend of deep learning models tends to results in a more complex and larger model. Although it leads to a better and more accurate prediction, the resulting model becomes even more costly, as it requires weeks of training with a huge amount of GPU resources. Particularly, the size and computational cost of transformer-based models have increased tremendously since its first debut in 2017 from ~100 million parameters up to ~1.6 trillion parameters in early 2021. This computationally hungry model also incurs a substantial cost to the environment and even reaches an alarming level of carbon footprint. Some of these models are so massive that it is even impossible to run the model without a GPU cluster. Greenformers improve the model efficiency of transformer models by applying low-rank approximation approaches. Specifically, we propose a low-rank factorization approach to improve the efficiency of the transformer model called Low-Rank Transformer. We further compare our model with an existing low-rank factorization approach called Linformer. Based on our analysis, the Low-Rank Transformer model is suitable for improving both the time and memory efficiency in processing short-sequence (<= 512) input data, while the Linformer model is suitable for improving the efficiency in processing long-sequence input data (>= 512). We also show that Low-Rank Transformer is more suitable for on-device deployment, as it significantly reduces the model size. Additionally, we estimate that applying LRT to the existing BERT-base model can significantly reduce the computational, economical, and environmental costs for developing such models by more than 30% of its original costs.

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

↑