arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2203.00748cs.CLcs.LG
收藏

E-LANG:基于能量的Super和Swift语言模型联合推理

E-LANG: Energy-Based Joint Inferencing of Super and Swift Language Models

Huawei Technologies Canada Co., Ltd.(华为技术加拿大有限公司)

Mohammad Akbari, Amin Banitalebi-Dehkordi, Yong Zhang

摘要:

构建巨大且功能强大的语言模型是过去几年的一种趋势。尽管它们的性能很好,但它们的计算成本很高。一个常见的解决方案是应用模型压缩或选择轻量级架构,这通常需要一个单独的固定大小的模型,每个理想的计算预算,并可能会失去性能的情况下,沉重的压缩。本文提出了一种有效的动态推理方法E-LANG,它将推理分布在大型精确超级模型和轻量级Swift模型之间。为此,决策模块基于潜在空间中的表示的能量特征将输入路由到Super或Swift模型。该方法易于采用,并且与架构无关。因此,它可以应用于黑盒预训练模型,而不需要架构操作,重新组装模块或重新训练。与仅适用于编码器骨干和分类任务的现有方法不同,我们的方法也适用于编码器-解码器结构和序列到序列任务,如翻译。E-LANG的性能通过一组T5和BERT主干在GLUE、SuperGLUE和WMT上的实验来验证。特别是,我们优于T5- 11 B,在GLUE上的平均计算速度为3.3 $\times$,在SuperGLUE上的平均计算速度为2.9 $\times$。我们还实现了基于BERT的SOTA上胶与3.2 $\times$少计算。代码和演示在补充材料中提供。

英文摘要:

Building huge and highly capable language models has been a trend in the past years. Despite their great performance, they incur high computational cost. A common solution is to apply model compression or choose light-weight architectures, which often need a separate fixed-size model for each desirable computational budget, and may lose performance in case of heavy compression. This paper proposes an effective dynamic inference approach, called E-LANG, which distributes the inference between large accurate Super-models and light-weight Swift models. To this end, a decision making module routes the inputs to Super or Swift models based on the energy characteristics of the representations in the latent space. This method is easily adoptable and architecture agnostic. As such, it can be applied to black-box pre-trained models without a need for architectural manipulations, reassembling of modules, or re-training. Unlike existing methods that are only applicable to encoder-only backbones and classification tasks, our method also works for encoder-decoder structures and sequence-to-sequence tasks such as translation. The E-LANG performance is verified through a set of experiments with T5 and BERT backbones on GLUE, SuperGLUE, and WMT. In particular, we outperform T5-11B with an average computations speed-up of 3.3$\times$ on GLUE and 2.9$\times$ on SuperGLUE. We also achieve BERT-based SOTA on GLUE with 3.2$\times$ less computations. Code and demo are available in the supplementary materials.

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

↑