Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Efficient Transformers with Dynamic Token Pooling

About

Transformers achieve unrivalled performance in modelling language, but remain inefficient in terms of memory and time complexity. A possible remedy is to reduce the sequence length in the intermediate layers by pooling fixed-length segments of tokens. Nevertheless, natural units of meaning, such as words or phrases, display varying sizes. To address this mismatch, we equip language models with a dynamic-pooling mechanism, which predicts segment boundaries in an autoregressive fashion. We compare several methods to infer boundaries, including end-to-end learning through stochastic re-parameterisation, supervised learning (based on segmentations from subword tokenizers or spikes in conditional entropy), as well as linguistically motivated boundaries. We perform character-level evaluation on texts from multiple datasets and morphologically diverse languages. The results demonstrate that dynamic pooling, which jointly segments and models language, is both faster and more accurate than vanilla Transformers and fixed-length pooling within the same computational budget.

Piotr Nawrot, Jan Chorowski, Adrian {\L}a\'ncucki, Edoardo M. Ponti• 2022

Related benchmarks

TaskDatasetResultRank
Language UnderstandingMMLU
Accuracy33.7
844
Question AnsweringOpenBookQA
Accuracy46.4
305
Question AnsweringBoolQ
Accuracy50.6
201
Named Entity RecognitionWikiAnn--
40
Natural Language UnderstandingARC Easy
Accuracy66.1
36
Natural Language UnderstandingHellaSwag
Accuracy57.7
35
Natural Language UnderstandingARC-C
Accuracy40.6
34
Natural Language UnderstandingWinoGrande
Accuracy57.9
30
Natural Language UnderstandingPIQA
PIQA Accuracy72.4
16
Language Modelingtext8 English (test)
BPC1.133
8
Showing 10 of 33 rows

Other info

Code

Follow for update