arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.15523cs.CL
收藏

COST-EFF:基于细化多出口语言模型的时空效率协同优化

COST-EFF: Collaborative Optimization of Spatial and Temporal Efficiency with Slenderized Multi-exit Language Models

Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络空间安全学院);MOE Key Laboratory of Computational Linguistics, Peking University(北京大学计算语言学教育部重点实验室)

Bowen Shen, Zheng Lin, Yuanxin Liu, Zhengxiao Liu, Lei Wang, Weiping Wang

摘要:

基于transformer的预训练语言模型(PLM)尽管具有先进的能力,但大多数情况下都存在过多的开销。对于资源受限的设备,迫切需要一个空间和时间上有效的模型,保留了PLM的主要能力。然而,现有的静态压缩模型不知道输入实例之间的不同复杂性,可能导致简单和复杂输入的冗余和不足。此外,早期退出的微型模型在进行预测和服务于更深层之间的权衡中遇到了挑战。出于这样的考虑,我们提出了一个协同优化的PLM集成静态模型压缩和动态推理加速。具体来说,PLM在宽度上被细化,而深度保持不变,补充了逐层提前退出以动态加速推理。为了解决提前退出的权衡问题,我们提出了一种联合训练方法,该方法可以校准细化并保留每个退出的贡献结构,而不仅仅是最后一层。在GLUE基准测试平台上进行了实验,实验结果表明,在高压缩率和加速率下,该方法具有Pareto最优性,参数为BERT的1/8,FLOPs为1/19。

英文摘要:

Transformer-based pre-trained language models (PLMs) mostly suffer from excessive overhead despite their advanced capacity. For resource-constrained devices, there is an urgent need for a spatially and temporally efficient model which retains the major capacity of PLMs. However, existing statically compressed models are unaware of the diverse complexities between input instances, potentially resulting in redundancy and inadequacy for simple and complex inputs. Also, miniature models with early exiting encounter challenges in the trade-off between making predictions and serving the deeper layers. Motivated by such considerations, we propose a collaborative optimization for PLMs that integrates static model compression and dynamic inference acceleration. Specifically, the PLM is slenderized in width while the depth remains intact, complementing layer-wise early exiting to speed up inference dynamically. To address the trade-off of early exiting, we propose a joint training approach that calibrates slenderization and preserves contributive structures to each exit instead of only the final layer. Experiments are conducted on GLUE benchmark and the results verify the Pareto optimality of our approach at high compression and acceleration rate with 1/8 parameters and 1/19 FLOPs of BERT.

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

↑