Adaptive Large Language Models By Layerwise Attention Shortcuts

Prateek Verma, Mert Pilanci
9/17/2024
cs.CLcs.AIcs.LG

No confident code implementation found for this paper.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{verma2024adaptive,
  title  = {Adaptive Large Language Models By Layerwise Attention Shortcuts},
  author = {Prateek Verma and Mert Pilanci},
  year   = {2024},
  eprint = {2409.10870},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.10870v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.10870.svg)](https://codeofpaper.com/paper/2409.10870)

Discussion