TY - GEN
T1 - Transformers are Multi-State RNNs
AU - Oren, Matanel
AU - Hassid, Michael
AU - Yarden, Nir
AU - Adi, Yossi
AU - Schwartz, Roy
N1 - Publisher Copyright: © 2024 Association for Computational Linguistics.
PY - 2024
Y1 - 2024
N2 - Transformers are considered conceptually different from the previous generation of state-of-the-art NLP models-recurrent neural networks (RNNs).In this work, we demonstrate that decoder-only transformers can in fact be conceptualized as unbounded multi-state RNNs-an RNN variant with unlimited hidden state size.We further show that transformers can be converted into bounded multi-state RNNs by fixing the size of their hidden state, effectively compressing their key-value cache.We introduce a novel, training-free compression policy-Token Omission Via Attention (TOVA). Our experiments with four long range tasks and several LLMs show that TOVA outperforms several baseline compression policies.Particularly, our results are nearly on par with the full model, using in some cases only 1/8 of the original cache size, which translates to 4.8X higher throughput.Our results shed light on the connection between transformers and RNNs, and help mitigate one of LLMs' most painful computational bottlenecks-the size of their key-value cache.
AB - Transformers are considered conceptually different from the previous generation of state-of-the-art NLP models-recurrent neural networks (RNNs).In this work, we demonstrate that decoder-only transformers can in fact be conceptualized as unbounded multi-state RNNs-an RNN variant with unlimited hidden state size.We further show that transformers can be converted into bounded multi-state RNNs by fixing the size of their hidden state, effectively compressing their key-value cache.We introduce a novel, training-free compression policy-Token Omission Via Attention (TOVA). Our experiments with four long range tasks and several LLMs show that TOVA outperforms several baseline compression policies.Particularly, our results are nearly on par with the full model, using in some cases only 1/8 of the original cache size, which translates to 4.8X higher throughput.Our results shed light on the connection between transformers and RNNs, and help mitigate one of LLMs' most painful computational bottlenecks-the size of their key-value cache.
UR - https://www.scopus.com/pages/publications/85211359478
U2 - 10.18653/v1/2024.emnlp-main.1043
DO - 10.18653/v1/2024.emnlp-main.1043
M3 - Conference contribution
T3 - EMNLP 2024 - 2024 Conference on Empirical Methods in Natural Language Processing, Proceedings of the Conference
SP - 18724
EP - 18741
BT - EMNLP 2024 - 2024 Conference on Empirical Methods in Natural Language Processing, Proceedings of the Conference
A2 - Al-Onaizan, Yaser
A2 - Bansal, Mohit
A2 - Chen, Yun-Nung
PB - Association for Computational Linguistics (ACL)
T2 - 2024 Conference on Empirical Methods in Natural Language Processing, EMNLP 2024
Y2 - 12 November 2024 through 16 November 2024
ER -