Transformer models have achieved promising results on natural language processing (NLP) tasks including extractive question answering (QA). Common Transformer encoders used in NLP tasks process the hidden states of all input tokens in the context paragraph throughout all layers. However, different from other tasks such as sequence classification, answering the raised question does not necessarily need all the tokens in the context paragraph. Following this motivation, we propose Block-skim, which learns to skim unnecessary context in higher hidden layers to improve and accelerate the Transformer performance. The key idea of Block-Skim is to identify the context that must be further processed and those that could be safely discarded early on during inference. Critically, we find that such information could be sufficiently derived from the self-attention weights inside the Transformer model. We further prune the hidden states corresponding to the unnecessary positions early in lower layers, achieving significant inference-time speedup. To our surprise, we observe that models pruned in this way outperform their full-size counterparts. Block-Skim improves QA models' accuracy on different datasets and achieves 3 times speedup on BERT-base model.


翻译:在自然语言处理(NLP)任务方面,包括采掘答答题(QA),变换模型在自然语言处理(NLP)任务方面取得了可喜的成果。 NLP任务中使用了通用的变换器编码器,处理上下文段落中所有输入符号的隐藏状态。然而,与序列分类等其他任务不同,回答所提出的问题不一定需要上下文段落中的所有符号。根据这个动机,我们建议布洛克斯基姆(Block-skim)在较高隐蔽层中学习缩小不必要的环境,以改进和加速变换器的性能。布洛克-斯基姆(Block-Skim)的关键想法是确定必须进一步处理的背景和在推断过程中可以安全地早期丢弃的颜色。关键是,我们发现这些信息可以从变换模型中的自注意重量中充分衍生出。我们进一步细化了与低层早期不必要位置相对的隐藏状态,实现重大的推导时间加速。我们惊讶地看到,以这种方式运行的模型超越了全尺寸对应方。Block-Skimm改进了不同数据集模型的模型的精确度,并在不同数据位上实现加速。

1
下载
关闭预览

相关内容

自动问答(Question Answering, QA)是指利用计算机自动回答用户所提出的问题以满足用户知识需求的任务。不同于现有搜索引擎,问答系统是信息服务的一种高级形式,系统返回用户的不再是基于关键词匹配排序的文档列表,而是精准的自然语言答案。近年来,随着人工智能的飞速发展,自动问答已经成为倍受关注且发展前景广泛的研究方向。

知识荟萃

精品入门和进阶教程、论文和代码整理等

更多

查看相关VIP内容、论文、资讯等
【Tutorial】计算机视觉中的Transformer,98页ppt
专知会员服务
139+阅读 · 2021年10月25日
最新《Transformers模型》教程,64页ppt
专知会员服务
278+阅读 · 2020年11月26日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
【文本匹配】Question Answering论文
深度学习自然语言处理
8+阅读 · 2020年4月20日
RoBERTa中文预训练模型:RoBERTa for Chinese
PaperWeekly
57+阅读 · 2019年9月16日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
ResNet, AlexNet, VGG, Inception:各种卷积网络架构的理解
全球人工智能
19+阅读 · 2017年12月17日
计算机视觉近一年进展综述
机器学习研究会
8+阅读 · 2017年11月25日
最佳实践:深度学习用于自然语言处理(三)
待字闺中
3+阅读 · 2017年8月20日
Arxiv
3+阅读 · 2018年11月29日
Arxiv
5+阅读 · 2018年3月16日
VIP会员
相关资讯
【文本匹配】Question Answering论文
深度学习自然语言处理
8+阅读 · 2020年4月20日
RoBERTa中文预训练模型:RoBERTa for Chinese
PaperWeekly
57+阅读 · 2019年9月16日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
ResNet, AlexNet, VGG, Inception:各种卷积网络架构的理解
全球人工智能
19+阅读 · 2017年12月17日
计算机视觉近一年进展综述
机器学习研究会
8+阅读 · 2017年11月25日
最佳实践:深度学习用于自然语言处理(三)
待字闺中
3+阅读 · 2017年8月20日
Top
微信扫码咨询专知VIP会员