With the development of deep learning and Transformer-based pre-trained models like BERT, the accuracy of many NLP tasks has been dramatically improved. However, the large number of parameters and computations also pose challenges for their deployment. For instance, using BERT can improve the predictions in the financial sentiment analysis (FSA) task but slow it down, where speed and accuracy are equally important in terms of profits. To address these issues, we first propose an efficient and lightweight BERT (ELBERT) along with a novel confidence-window-based (CWB) early exit mechanism. Based on ELBERT, an innovative method to accelerate text processing on the GPU platform is developed, solving the difficult problem of making the early exit mechanism work more effectively with a large input batch size. Afterward, a fast and high-accuracy FSA system is built. Experimental results show that the proposed CWB early exit mechanism achieves significantly higher accuracy than existing early exit methods on BERT under the same computation cost. By using this acceleration method, our FSA system can boost the processing speed by nearly 40 times to over 1000 texts per second with sufficient accuracy, which is nearly twice as fast as FastBERT, thus providing a more powerful text processing capability for modern trading systems.
翻译:由于开发了BERT等深层次的学习和基于变革的预培训模型,许多NLP任务的准确性已经大大提高,然而,大量的参数和计算也对其部署构成挑战,例如,使用BERT可以改进金融情绪分析(FSA)任务中的预测,但放慢速度和准确性在利润方面同等重要的速度和准确性。为了解决这些问题,我们首先提出一个高效和轻量的BERT(ELBERT),以及一个新的基于信任窗口的早期退出机制。在ELBERT的基础上,开发了加速GPU平台文本处理的创新方法,用大量投入批量解决使早期退出机制更有效运行的困难问题。之后,建立了一个快速和高度准确的FSA系统。实验结果表明,拟议的CWB早期退出机制在计算成本上大大高于现有的早期退出方法。通过使用这一加速方法,我们的FSA系统可以将加速处理速度提高近40倍至1000多的文本速度,以更快的速度将快速的文本作为快速的第二版。