EMNLP 2023long main0 citations

Leap-of-Thought: Accelerating Transformers via Dynamic Token Routing

Yeachan Kim, Junho Kim, Jun-Hyung Park, Mingyu Lee, SangKeun Lee

Abstract

Computational inefficiency in transformers has been a long-standing challenge, hindering the deployment in resource-constrained or real-time applications. One promising approach to mitigate this limitation is to progressively remove less significant tokens, given that the sequence length strongly contributes to the inefficiency. However, this approach entails a potential risk of losing crucial information due to the irrevocable nature of token removal. In this paper, we introduce Leap-of-Thought (LoT), a novel token reduction approach that dynamically routes tokens within layers. Unlike previous work that irrevocably discards tokens, LoT enables tokens to `leap' across layers. This ensures that all tokens remain accessible in subsequent layers while reducing the number of tokens processed within layers. We achieve this by pairing the transformer with dynamic token routers, which learn to selectively process tokens essential for the task. Evaluation results clearly show that LoT achieves a substantial improvement in computational efficiency. Specifically, LoT attains up to 25x faster inference time without a significant loss in accuracy

transformerlanguage modelstoken routingtoken pruninginput length reduction
BibTeX
@inproceedings{
kim2023leapofthought,
title={Leap-of-Thought: Accelerating Transformers via Dynamic Token Routing},
author={Yeachan Kim and Junho Kim and Jun-Hyung Park and Mingyu Lee and SangKeun Lee},
booktitle={The 2023 Conference on Empirical Methods in Natural Language Processing},
year={2023},
url={https://openreview.net/forum?id=0SF6Kr1lrx}
}