Recent advances in deep learning have relied heavily on the use of large Transformers due to their ability to learn at scale. However, the core building block of Transformers, the attention operator, exhibits quadratic cost in sequence length, limiting the amount of context accessible. Existing subquadratic methods based on low-rank and sparse approximations need to be combined with dense attention layers to match Transformers, indicating a gap in capability. In this work, we propose Hyena, a subquadratic drop-in replacement for attention constructed by interleaving implicitly parametrized long convolutions and data-controlled gating. In recall and reasoning tasks on sequences of thousands to hundreds of thousands of tokens, Hyena improves accuracy by more than 50 points over operators relying on state-spaces and other implicit and explicit methods, matching attention-based models. We set a new state-of-the-art for dense-attention-free architectures on language modeling in standard datasets (WikiText103 and The Pile), reaching Transformer quality with a 20% reduction in training compute required at sequence length 2K. Hyena operators are twice as fast as highly optimized attention at sequence length 8K, and 100x faster at sequence length 64K.


翻译:近年来,深度学习取得了许多进展,主要依赖大规模Transformer实现的学习能力。然而,Transformer的核心构造块注意力操作符具有与序列长度二次方成正比的计算量,限制了可访问的上下文范围。现有的基于低秩和稀疏逼近的次二次方法需要与密集注意力层相结合,以匹配Transformer,这表明存在能力差距。在本文中,我们提出了豺狼社会结构(Hyena),它是一个次二次的注意力替代品,通过交错隐式参数化的长卷积和数据控制门的方式构建。在对数千到数十万个令牌的序列进行回归和推理任务时,豺狼社会结构在准确性方面比依赖状态空间和其他隐式和显式方法的操作符提高了50多个分数,而且与基于注意力的模型相当。在标准数据集(WikiText103和The Pile)上,我们在不需要密集注意力的架构上创造了新的最先进技术水平,在序列长度为2K时,训练计算量减少了20%,达到了Transformer的质量。在序列长度为8K时,豺狼社会结构操作速度是高度优化的注意力的两倍,在序列长度为64K时是后者的100倍。

1
下载
关闭预览

相关内容

数学上,序列是被排成一列的对象(或事件);这样每个元素不是在其他元素之前,就是在其他元素之后。这里,元素之间的顺序非常重要。
UIUC-Gargi《增强型语言模型》,64页ppt与视频
专知会员服务
37+阅读 · 2023年5月12日
百篇论文纵览大型语言模型最新研究进展
专知会员服务
70+阅读 · 2023年3月31日
【ICLR-2020】网络反卷积,NETWORK DECONVOLUTION
专知会员服务
39+阅读 · 2020年2月21日
BERT进展2019四篇必读论文
专知会员服务
68+阅读 · 2020年1月2日
【Google论文】ALBERT:自我监督学习语言表达的精简BERT
专知会员服务
24+阅读 · 2019年11月4日
GNN 新基准!Long Range Graph Benchmark
图与推荐
0+阅读 · 2022年10月18日
RoBERTa中文预训练模型:RoBERTa for Chinese
PaperWeekly
57+阅读 · 2019年9月16日
ERNIE Tutorial(论文笔记 + 实践指南)
AINLP
30+阅读 · 2019年8月28日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
17+阅读 · 2018年12月24日
ResNet, AlexNet, VGG, Inception:各种卷积网络架构的理解
全球人工智能
19+阅读 · 2017年12月17日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Arxiv
0+阅读 · 2023年6月6日
Arxiv
0+阅读 · 2023年6月2日
A Survey of Large Language Models
Arxiv
453+阅读 · 2023年3月31日
Hierarchical Graph Capsule Network
Arxiv
20+阅读 · 2020年12月16日
Arxiv
13+阅读 · 2019年11月14日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员