arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2105.03343cs.LGcs.CL
收藏

剪枝自适应:基于BERT的案例研究

Adapting by Pruning: A Case Study on BERT

Yang Gao, Nicolo Colombo, Wei Wang

摘要:

使预训练的神经模型适应下游任务已成为获得高质量模型的标准做法。在这项工作中,我们提出了一种新的模型自适应范式,通过修剪进行自适应,修剪预训练模型中的神经连接以优化目标任务的性能;所有剩余的连接都保持其权重不变。我们制定适应修剪作为一个可微损失的优化问题,并提出了一个有效的算法来修剪模型。我们证明了该算法在标准假设下是接近最优的,并应用该算法来适应BERT的一些GLUE任务。结果表明,我们的方法可以修剪高达50%的权重在BERT,同时产生类似的性能相比,微调完整的模型。我们还比较了我们的方法与其他国家的最先进的修剪方法,并研究其所获得的子网络的拓扑差异。

英文摘要:

Adapting pre-trained neural models to downstream tasks has become the standard practice for obtaining high-quality models. In this work, we propose a novel model adaptation paradigm, adapting by pruning, which prunes neural connections in the pre-trained model to optimise the performance on the target task; all remaining connections have their weights intact. We formulate adapting-by-pruning as an optimisation problem with a differentiable loss and propose an efficient algorithm to prune the model. We prove that the algorithm is near-optimal under standard assumptions and apply the algorithm to adapt BERT to some GLUE tasks. Results suggest that our method can prune up to 50% weights in BERT while yielding similar performance compared to the fine-tuned full model. We also compare our method with other state-of-the-art pruning methods and study the topological differences of their obtained sub-networks.

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

↑