Transformer is a powerful model for text understanding. However, it is inefficient due to its quadratic complexity to input sequence length. Although there are many methods on Transformer acceleration, they are still either inefficient on long sequences or not effective enough. In this paper, we propose Fastformer, which is an efficient Transformer model based on additive attention. In Fastformer, instead of modeling the pair-wise interactions between tokens, we first use additive attention mechanism to model global contexts, and then further transform each token representation based on its interaction with global context representations. In this way, Fastformer can achieve effective context modeling with linear complexity. Extensive experiments on five datasets show that Fastformer is much more efficient than many existing Transformer models and can meanwhile achieve comparable or even better long text modeling performance.


翻译:变换器是一个强大的文本理解模型。 但是,它由于输入序列长度的四重复杂度而效率低下。 虽然变换器加速率有许多方法, 但它们在长序列上仍然效率低下, 或不够有效。 在本文中, 我们建议 Fastexer, 这是一种基于添加关注的高效变换器模型。 在 Fasterent 中, 我们首先使用添加式注意机制, 而不是模拟代号之间的双向互动, 而不是建模全球背景, 然后根据它与全球背景演示的相互作用, 进一步转换每个象征性的表示。 这样, 快速变换器可以实现具有线性复杂性的有效环境建模。 对五个数据集的广泛实验显示, Fastexerve 比许多现有的变换器模型效率高得多, 同时还可以实现可比的甚至更好的长文本建模效果。

0
下载
关闭预览

相关内容

ACM/IEEE第23届模型驱动工程语言和系统国际会议,是模型驱动软件和系统工程的首要会议系列,由ACM-SIGSOFT和IEEE-TCSE支持组织。自1998年以来,模型涵盖了建模的各个方面,从语言和方法到工具和应用程序。模特的参加者来自不同的背景,包括研究人员、学者、工程师和工业专业人士。MODELS 2019是一个论坛,参与者可以围绕建模和模型驱动的软件和系统交流前沿研究成果和创新实践经验。今年的版本将为建模社区提供进一步推进建模基础的机会,并在网络物理系统、嵌入式系统、社会技术系统、云计算、大数据、机器学习、安全、开源等新兴领域提出建模的创新应用以及可持续性。 官网链接:http://www.modelsconference.org/
【CVPR2021】基于Transformer的视频分割领域
专知会员服务
36+阅读 · 2021年4月16日
Transformer文本分类代码
专知会员服务
116+阅读 · 2020年2月3日
注意力机制介绍,Attention Mechanism
专知会员服务
166+阅读 · 2019年10月13日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
最新BERT相关论文清单,BERT-related Papers
专知会员服务
52+阅读 · 2019年9月29日
一文读懂Attention机制
机器学习与推荐算法
63+阅读 · 2020年6月9日
已删除
将门创投
14+阅读 · 2019年5月29日
一文读懂「Attention is All You Need」| 附代码实现
PaperWeekly
37+阅读 · 2018年1月10日
论文共读 | Attention is All You Need
黑龙江大学自然语言处理实验室
14+阅读 · 2017年9月7日
Attention is All You Need | 每周一起读
PaperWeekly
10+阅读 · 2017年6月28日
Arxiv
26+阅读 · 2021年5月17日
Arxiv
3+阅读 · 2020年9月30日
Universal Transformers
Arxiv
5+阅读 · 2019年3月5日
Arxiv
4+阅读 · 2018年10月31日
Arxiv
26+阅读 · 2017年12月6日
VIP会员
相关VIP内容
【CVPR2021】基于Transformer的视频分割领域
专知会员服务
36+阅读 · 2021年4月16日
Transformer文本分类代码
专知会员服务
116+阅读 · 2020年2月3日
注意力机制介绍,Attention Mechanism
专知会员服务
166+阅读 · 2019年10月13日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
最新BERT相关论文清单,BERT-related Papers
专知会员服务
52+阅读 · 2019年9月29日
相关资讯
一文读懂Attention机制
机器学习与推荐算法
63+阅读 · 2020年6月9日
已删除
将门创投
14+阅读 · 2019年5月29日
一文读懂「Attention is All You Need」| 附代码实现
PaperWeekly
37+阅读 · 2018年1月10日
论文共读 | Attention is All You Need
黑龙江大学自然语言处理实验室
14+阅读 · 2017年9月7日
Attention is All You Need | 每周一起读
PaperWeekly
10+阅读 · 2017年6月28日
相关论文
Arxiv
26+阅读 · 2021年5月17日
Arxiv
3+阅读 · 2020年9月30日
Universal Transformers
Arxiv
5+阅读 · 2019年3月5日
Arxiv
4+阅读 · 2018年10月31日
Arxiv
26+阅读 · 2017年12月6日
Top
微信扫码咨询专知VIP会员