arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2311.13657cs.CLcs.LG
收藏

高效的Transformer知识蒸馏:性能综述

Efficient Transformer Knowledge Distillation: A Performance Review

Clemson University(克莱姆森大学);Giant Oak Inc.(巨橡公司)

Nathan Brown, Ashton Williamson, Tahj Anderson, Logan Lawrence

AI总结:

本研究评估了高效注意力transformer通过知识蒸馏进行模型压缩的性能,引入了长上下文NER数据集GONERD,发现蒸馏后的模型在保留高达98.8%性能的同时将推理时间减少57.8%。

摘要:

随着预训练transformer语言模型持续取得最先进的性能,自然语言处理社区推动了模型压缩和高效注意力机制的进展,以解决高计算需求和有限输入序列长度的问题。尽管有这些各自独立的努力,但尚未对这两个领域的交叉点进行过研究。在本研究中,我们对通过知识蒸馏在高效注意力transformer上进行模型压缩进行了评估。我们提供了最先进的高效注意力架构压缩的成本-性能权衡,以及与它们的全注意力对应物相比在性能上取得的提升。此外,我们引入了一个新的长上下文命名实体识别数据集GONERD,用于训练和测试NER模型在长序列上的性能。我们发现,蒸馏的高效注意力transformer能够保留大量原始模型性能,在短上下文任务(GLUE, SQUAD, CoNLL-2003)上保留高达98.6%,在长上下文问答任务(HotpotQA, TriviaQA)上保留高达94.6%,在长上下文命名实体识别(GONERD)上保留高达98.8%,同时将推理时间减少高达57.8%。我们发现,对于大多数任务上的大多数模型,执行知识蒸馏是一种有效的方法,能以低成本产生高性能的高效注意力模型。

英文摘要:

As pretrained transformer language models continue to achieve state-of-the-art performance, the Natural Language Processing community has pushed for advances in model compression and efficient attention mechanisms to address high computational requirements and limited input sequence length. Despite these separate efforts, no investigation has been done into the intersection of these two fields. In this work, we provide an evaluation of model compression via knowledge distillation on efficient attention transformers. We provide cost-performance trade-offs for the compression of state-of-the-art efficient attention architectures and the gains made in performance in comparison to their full attention counterparts. Furthermore, we introduce a new long-context Named Entity Recognition dataset, GONERD, to train and test the performance of NER models on long sequences. We find that distilled efficient attention transformers can preserve a significant amount of original model performance, preserving up to 98.6% across short-context tasks (GLUE, SQUAD, CoNLL-2003), up to 94.6% across long-context Question-and-Answering tasks (HotpotQA, TriviaQA), and up to 98.8% on long-context Named Entity Recognition (GONERD), while decreasing inference times by up to 57.8%. We find that, for most models on most tasks, performing knowledge distillation is an effective method to yield high-performing efficient attention models with low costs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑