Funnel-Transformer:过滤掉顺序冗余以提高语言处理效率
Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing
摘要:
随着语言预训练的成功,人们非常希望开发更有效的可扩展性更好的架构,可以以更低的成本利用丰富的未标记数据。为了提高效率,我们研究了在维护全长令牌级演示时被忽视的冗余,特别是对于只需要序列的单向量演示的任务。基于这种直觉,我们提出了漏斗变换器,它逐渐将隐藏状态的序列压缩到一个较短的序列,从而降低了计算成本。更重要的是,通过将长度减少节省的FLOP重新投资于构建更深或更宽的模型,我们进一步提高了模型容量。此外,为了执行常见预训练目标所需的令牌级预测,Funnel-Transformer能够通过解码器从减少的隐藏序列中恢复每个令牌的深度表示。从经验上看,在具有相当或更少的FLOP的情况下,Funnel-Transformer在各种序列级预测任务上都优于标准的Transformer,包括文本分类、语言理解和阅读理解。代码和预先训练的检查点可在https://github.com/laiguokun/Funnel-Transformer上获得。
英文摘要:
With the success of language pretraining, it is highly desirable to develop more efficient architectures of good scalability that can exploit the abundant unlabeled data at a lower cost. To improve the efficiency, we examine the much-overlooked redundancy in maintaining a full-length token-level presentation, especially for tasks that only require a single-vector presentation of the sequence. With this intuition, we propose Funnel-Transformer which gradually compresses the sequence of hidden states to a shorter one and hence reduces the computation cost. More importantly, by re-investing the saved FLOPs from length reduction in constructing a deeper or wider model, we further improve the model capacity. In addition, to perform token-level predictions as required by common pretraining objectives, Funnel-Transformer is able to recover a deep representation for each token from the reduced hidden sequence via a decoder. Empirically, with comparable or fewer FLOPs, Funnel-Transformer outperforms the standard Transformer on a wide variety of sequence-level prediction tasks, including text classification, language understanding, and reading comprehension. The code and pretrained checkpoints are available at https://github.com/laiguokun/Funnel-Transformer.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。