首页> 外国专利> BERT MODEL FINE-TUNING METHOD AND APPARATUS BASED ON CONVOLUTIONAL NEURAL NETWORK

BERT MODEL FINE-TUNING METHOD AND APPARATUS BASED ON CONVOLUTIONAL NEURAL NETWORK

机译:基于卷积神经网络的BERT模型微调方法及装置

摘要

Disclosed are a BERT model fine-tuning method and apparatus based on a convolutional neural network. The method comprises: constructing a first BERT model, a hidden layer of which is a transformer block network, and a second BERT model, a hidden layer of which is a convolutional neural network, wherein the number of layers of the hidden layer of the first BERT model is equal to the number of layers of the hidden layer of the second BERT model; training the first BERT model according to a first text set, and performing knowledge distillation on the second BERT model on the basis of the trained first BERT model, so as to obtain a knowledge distillation loss and a distribution loss of the second BERT model; inputting a second text set into the second BERT model, so as to obtain a cross entropy loss of the second BERT model; and updating a network parameter of the second BERT model according to the knowledge distillation loss and the cross entropy loss. The present application is based on neural network technology. By means of the method, a BERT model, a hidden layer of which is a convolutional neural network, is fine-tuned, and the number of parameters in the fine-tuned BERT model is also significantly reduced, thereby greatly improving the calculation speed of the model, and ensuring the accuracy of text classification of the model.
机译:公开了一种基于卷积神经网络的伯特模型微调方法和装置。该方法包括:构造第一伯特模型,其隐藏层是变压器块网络,和第二伯特模型,其隐藏层是卷积神经网络,其中第一伯特模型的隐藏层的层数等于第二伯特模型的隐藏层的层数;根据第一文本集训练第一伯特模型,并在训练的第一伯特模型的基础上对第二伯特模型进行知识提取,以获得第二伯特模型的知识提取损失和分布损失;将第二文本集输入到第二伯特模型中,以获得第二伯特模型的交叉熵损失;以及根据知识提取损失和交叉熵损失更新第二个伯特模型的网络参数。目前的应用基于神经网络技术。通过该方法,对隐层为卷积神经网络的伯特模型进行了微调,微调后的伯特模型中的参数数量也显著减少,从而大大提高了模型的计算速度,并确保了模型的文本分类精度。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号