Learning to Skip for Language Modeling

Dewen Zeng, Nan Du, Tao Wang, Yuanzhong Xu, Tao Lei +2 more
11/26/2023
cs.CL

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Overparameterized large-scale language models have impressive generalization performance of in-context few-shot learning. However, most language models allocate the same amount of parameters or computation to each token, disregarding the complexity or importance of the input data. We argue that in language model pretraining, a variable amount of computation should be assigned to different tokens, and this can be efficiently achieved via a simple routing mechanism. Different from conventional early stopping techniques where tokens can early exit at only early layers, we propose a more general method that dynamically skips the execution of a layer (or module) for any input token with a binary router. In our extensive evaluation across 24 NLP tasks, we demonstrate that the proposed method can significantly improve the 1-shot performance compared to other competitive baselines only at mild extra cost for inference.

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. 3 weaker matches are hidden by default — 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{zeng2023learning,
  title  = {Learning to Skip for Language Modeling},
  author = {Dewen Zeng and Nan Du and Tao Wang and Yuanzhong Xu and Tao Lei and Zhifeng Chen and Claire Cui},
  year   = {2023},
  eprint = {2311.15436},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.15436v1}
}

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/2311.15436.svg)](https://codeofpaper.com/paper/2311.15436)

Discussion