arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2108.10197cs.CLstat.CO
收藏

在生产系统中部署基于BERT的查询-标题相关性分类器:从战壕看

Deploying a BERT-based Query-Title Relevance Classifier in a Production System: a View from the Trenches

eBay Inc.(易趣公司)

Leonard Dahlmann, Tomer Lancewicki

摘要:

Transformers的双向编码器表示(BERT)模型已经从根本上提高了许多自然语言处理(NLP)任务的性能,例如文本分类和命名实体识别(NER)应用。然而,由于BERT的巨大尺寸,因此针对低延迟和高吞吐量的工业用例对其进行扩展具有挑战性。我们成功地优化了查询标题相关性(QTR)分类器,通过一个紧凑的模型,我们命名为BERT双向长短期记忆(BertBiLSTM)部署。该模型能够在CPU上最多0.2ms内推断输入。BertBiLSTM在上述现实生产任务的准确性和效率方面超过了现成的BERT模型的性能。我们分两个阶段实现这一结果。首先,我们创建一个预训练的模型,称为eBERT,它是使用我们独特的项目标题语料库训练的原始BERT架构。然后,我们针对QTR任务对eBERT进行微调。其次,我们通过知识蒸馏(KD)过程对BertBiLSTM模型进行训练,以模仿eBERT模型的性能,并显示数据增强的效果,以达到相似的目标。实验结果表明,该模型优于其他紧凑和生产准备模型。

英文摘要:

The Bidirectional Encoder Representations from Transformers (BERT) model has been radically improving the performance of many Natural Language Processing (NLP) tasks such as Text Classification and Named Entity Recognition (NER) applications. However, it is challenging to scale BERT for low-latency and high-throughput industrial use cases due to its enormous size. We successfully optimize a Query-Title Relevance (QTR) classifier for deployment via a compact model, which we name BERT Bidirectional Long Short-Term Memory (BertBiLSTM). The model is capable of inferring an input in at most 0.2ms on CPU. BertBiLSTM exceeds the off-the-shelf BERT model's performance in terms of accuracy and efficiency for the aforementioned real-world production task. We achieve this result in two phases. First, we create a pre-trained model, called eBERT, which is the original BERT architecture trained with our unique item title corpus. We then fine-tune eBERT for the QTR task. Second, we train the BertBiLSTM model to mimic the eBERT model's performance through a process called Knowledge Distillation (KD) and show the effect of data augmentation to achieve the resembling goal. Experimental results show that the proposed model outperforms other compact and production-ready models.

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

↑