Adaptive Large Language Models By Layerwise Attention Shortcuts

Prateek Verma, Mert Pilanci
{"title":"Adaptive Large Language Models By Layerwise Attention Shortcuts","authors":"Prateek Verma, Mert Pilanci","doi":"arxiv-2409.10870","DOIUrl":null,"url":null,"abstract":"Transformer architectures are the backbone of the modern AI revolution.\nHowever, they are based on simply stacking the same blocks in dozens of layers\nand processing information sequentially from one block to another. In this\npaper, we propose to challenge this and introduce adaptive computations for\nLLM-like setups, which allow the final layer to attend to all of the\nintermediate layers as it deems fit through the attention mechanism, thereby\nintroducing computational \\textbf{attention shortcuts}. These shortcuts can\nthus make the architecture depth and context adaptive. We showcase four\ndifferent datasets, namely acoustic tokens, natural language, and symbolic\nmusic, and we achieve superior performance for GPT-like architecture. We give\nevidence via attention maps that the models learn complex dependencies across\nlayers that are adaptive in context and depth depending on the input tokens.","PeriodicalId":501284,"journal":{"name":"arXiv - EE - Audio and Speech Processing","volume":"19 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-09-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - EE - Audio and Speech Processing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2409.10870","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Transformer architectures are the backbone of the modern AI revolution. However, they are based on simply stacking the same blocks in dozens of layers and processing information sequentially from one block to another. In this paper, we propose to challenge this and introduce adaptive computations for LLM-like setups, which allow the final layer to attend to all of the intermediate layers as it deems fit through the attention mechanism, thereby introducing computational \textbf{attention shortcuts}. These shortcuts can thus make the architecture depth and context adaptive. We showcase four different datasets, namely acoustic tokens, natural language, and symbolic music, and we achieve superior performance for GPT-like architecture. We give evidence via attention maps that the models learn complex dependencies across layers that are adaptive in context and depth depending on the input tokens.
分层注意力快捷方式自适应大型语言模型
变压器架构是现代人工智能革命的支柱。然而,它们的基础是简单地将相同的区块堆叠成数十层,并按顺序从一个区块处理信息到另一个区块。在本文中,我们提议挑战这一点,并为类似于LLM的设置引入自适应计算,允许最后一层通过注意力机制,在它认为合适的时候关注所有中间层,从而引入计算(textbf{注意力捷径})。这些捷径可以使架构具有深度和上下文自适应能力。我们展示了四个不同的数据集,即声学标记、自然语言和符号音乐,我们发现类似于 GPT 的架构具有更优越的性能。我们通过注意力图提供了证据,证明模型学习了跨层的复杂依赖关系,这种依赖关系在上下文和深度上都是自适应的,这取决于输入的标记。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信