Transformer models have obtained remarkable accomplishments in various NLP tasks. However, these models have efficiency issues on long sequences, as the complexity of their self-attention module scales quadratically with the sequence length. To remedy the limitation, we present Memformer, a novel language model that utilizes a single unified memory to encode and retrieve past information. It includes a new optimization scheme, Memory Replay Back-Propagation, which promotes long-range back-propagation through time with a significantly reduced memory requirement. Memformer achieves $\mathcal{O}(n)$ time complexity and $\mathcal{O}(1)$ space complexity in processing long sequences, meaning that the model can handle an infinite length sequence during inference. Our model is also compatible with other self-supervised tasks to further improve the performance on language modeling. Experimental results show that Memformer outperforms the previous long-range sequence models on WikiText-103, including Transformer-XL and compressive Transformer.


翻译:变换模型在各种NLP任务中取得了显著成就。 但是, 这些模型在长序列上存在效率问题, 因为它们的自注意模块的复杂度随序列长度而以等宽度衡量。 为了纠正限制, 我们提出MemEx, 这是一种新颖的语言模型, 使用单一的统一记忆来编码和检索过去的信息。 它包括一个新的优化方案, 内存重放后推进, 随着时间的推移, 内存要求会大大降低, 从而推动长程后反向调整 。 元数据在处理长序列中实现了 $\mathcal{O}(n) 时间复杂性和$\mathcal{O}(1) 空间复杂性, 意思是模型在推断过程中可以处理无限的长度序列。 我们的模型也与其他自强任务兼容, 以进一步改进语言模型的性能。 实验结果表明, 元数据比WikiText- 103 上以前的长序列模型( 包括变换器- XL 和压缩变换器) 。

0
下载
关闭预览

相关内容

ACM/IEEE第23届模型驱动工程语言和系统国际会议,是模型驱动软件和系统工程的首要会议系列,由ACM-SIGSOFT和IEEE-TCSE支持组织。自1998年以来,模型涵盖了建模的各个方面,从语言和方法到工具和应用程序。模特的参加者来自不同的背景,包括研究人员、学者、工程师和工业专业人士。MODELS 2019是一个论坛,参与者可以围绕建模和模型驱动的软件和系统交流前沿研究成果和创新实践经验。今年的版本将为建模社区提供进一步推进建模基础的机会,并在网络物理系统、嵌入式系统、社会技术系统、云计算、大数据、机器学习、安全、开源等新兴领域提出建模的创新应用以及可持续性。 官网链接:http://www.modelsconference.org/
最新《Transformers模型》教程,64页ppt
专知会员服务
325+阅读 · 2020年11月26日
【EMNLP2020-清华】基于常识知识图谱的多跳推理语言生成
专知会员服务
74+阅读 · 2020年9月25日
Transformer文本分类代码
专知会员服务
118+阅读 · 2020年2月3日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
已删除
将门创投
8+阅读 · 2019年7月10日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
通过预训练提升语言理解
开放知识图谱
4+阅读 · 2018年11月21日
Star-Transformer
Arxiv
5+阅读 · 2019年2月28日
Music Transformer
Arxiv
5+阅读 · 2018年12月12日
VIP会员
相关VIP内容
最新《Transformers模型》教程,64页ppt
专知会员服务
325+阅读 · 2020年11月26日
【EMNLP2020-清华】基于常识知识图谱的多跳推理语言生成
专知会员服务
74+阅读 · 2020年9月25日
Transformer文本分类代码
专知会员服务
118+阅读 · 2020年2月3日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
相关资讯
已删除
将门创投
8+阅读 · 2019年7月10日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
通过预训练提升语言理解
开放知识图谱
4+阅读 · 2018年11月21日
相关论文
Star-Transformer
Arxiv
5+阅读 · 2019年2月28日
Music Transformer
Arxiv
5+阅读 · 2018年12月12日
Top
微信扫码咨询专知VIP会员