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 比许多现有的变换器模型效率高得多, 同时还可以实现可比的甚至更好的长文本建模效果。

1
下载
关闭预览

相关内容

ACM/IEEE第23届模型驱动工程语言和系统国际会议,是模型驱动软件和系统工程的首要会议系列,由ACM-SIGSOFT和IEEE-TCSE支持组织。自1998年以来,模型涵盖了建模的各个方面,从语言和方法到工具和应用程序。模特的参加者来自不同的背景,包括研究人员、学者、工程师和工业专业人士。MODELS 2019是一个论坛,参与者可以围绕建模和模型驱动的软件和系统交流前沿研究成果和创新实践经验。今年的版本将为建模社区提供进一步推进建模基础的机会,并在网络物理系统、嵌入式系统、社会技术系统、云计算、大数据、机器学习、安全、开源等新兴领域提出建模的创新应用以及可持续性。 官网链接:http://www.modelsconference.org/
专知会员服务
30+阅读 · 2021年7月30日
注意力机制综述
专知会员服务
83+阅读 · 2021年1月26日
最新《Transformers模型》教程,64页ppt
专知会员服务
314+阅读 · 2020年11月26日
【DeepMind】强化学习教程,83页ppt
专知会员服务
155+阅读 · 2020年8月7日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
79+阅读 · 2020年7月26日
【ACL2020-Facebook AI】大规模无监督跨语言表示学习
专知会员服务
34+阅读 · 2020年4月5日
注意力机制介绍,Attention Mechanism
专知会员服务
170+阅读 · 2019年10月13日
一文读懂Attention机制
机器学习与推荐算法
63+阅读 · 2020年6月9日
从Seq2seq到Attention模型到Self Attention(二)
量化投资与机器学习
23+阅读 · 2018年10月9日
从Seq2seq到Attention模型到Self Attention(一)
量化投资与机器学习
76+阅读 · 2018年10月8日
一文读懂「Attention is All You Need」| 附代码实现
PaperWeekly
37+阅读 · 2018年1月10日
【学习】(Python)SVM数据分类
机器学习研究会
6+阅读 · 2017年10月15日
论文共读 | Attention is All You Need
黑龙江大学自然语言处理实验室
14+阅读 · 2017年9月7日
【音乐】Attention
英语演讲视频每日一推
3+阅读 · 2017年8月22日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Attention is All You Need | 每周一起读
PaperWeekly
10+阅读 · 2017年6月28日
Arxiv
28+阅读 · 2021年5月17日
Universal Transformers
Arxiv
5+阅读 · 2019年3月5日
Arxiv
4+阅读 · 2018年10月31日
Arxiv
27+阅读 · 2017年12月6日
VIP会员
相关VIP内容
专知会员服务
30+阅读 · 2021年7月30日
注意力机制综述
专知会员服务
83+阅读 · 2021年1月26日
最新《Transformers模型》教程,64页ppt
专知会员服务
314+阅读 · 2020年11月26日
【DeepMind】强化学习教程,83页ppt
专知会员服务
155+阅读 · 2020年8月7日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
79+阅读 · 2020年7月26日
【ACL2020-Facebook AI】大规模无监督跨语言表示学习
专知会员服务
34+阅读 · 2020年4月5日
注意力机制介绍,Attention Mechanism
专知会员服务
170+阅读 · 2019年10月13日
相关资讯
一文读懂Attention机制
机器学习与推荐算法
63+阅读 · 2020年6月9日
从Seq2seq到Attention模型到Self Attention(二)
量化投资与机器学习
23+阅读 · 2018年10月9日
从Seq2seq到Attention模型到Self Attention(一)
量化投资与机器学习
76+阅读 · 2018年10月8日
一文读懂「Attention is All You Need」| 附代码实现
PaperWeekly
37+阅读 · 2018年1月10日
【学习】(Python)SVM数据分类
机器学习研究会
6+阅读 · 2017年10月15日
论文共读 | Attention is All You Need
黑龙江大学自然语言处理实验室
14+阅读 · 2017年9月7日
【音乐】Attention
英语演讲视频每日一推
3+阅读 · 2017年8月22日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Attention is All You Need | 每周一起读
PaperWeekly
10+阅读 · 2017年6月28日
相关论文
Arxiv
28+阅读 · 2021年5月17日
Universal Transformers
Arxiv
5+阅读 · 2019年3月5日
Arxiv
4+阅读 · 2018年10月31日
Arxiv
27+阅读 · 2017年12月6日
Top
微信扫码咨询专知VIP会员