arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2004.14287cs.CL
收藏

基于预训练语言模型的可扩展推理通用文本嵌入

General Purpose Text Embeddings from Pre-trained Language Models for Scalable Inference

Facebook AI(Facebook人工智能研究院)

Jingfei Du, Myle Ott, Haoran Li, Xing Zhou, Veselin Stoyanov

摘要:

目前,许多NLP任务的最新技术是通过大型预训练语言模型实现的,这需要大量的计算。我们探索一种设置,其中许多不同的预测是在一个单一的文本。在这种情况下,推理过程中的一些计算成本可以使用共享的文本编码器分摊到不同的任务中。我们比较了训练这种编码器的方法,并表明在多个任务上预训练的编码器可以很好地推广到看不见的任务。我们还比较了从该编码器中提取固定和有限大小表示的方法,包括从多个层或位置提取的池化特征的不同方法。我们最好的方法相比,有利的知识蒸馏,实现更高的准确性和更低的计算成本,一旦系统是处理约7个任务。此外,我们表明,通过二进制量化,我们可以减少提取的表示的大小的一个因素16,使其可行的存储供以后使用。由此产生的方法提供了一个令人信服的解决方案,当在同一文本上执行多个任务时,使用大规模预训练模型的计算成本只有一小部分。

英文摘要:

The state of the art on many NLP tasks is currently achieved by large pre-trained language models, which require a considerable amount of computation. We explore a setting where many different predictions are made on a single piece of text. In that case, some of the computational cost during inference can be amortized over the different tasks using a shared text encoder. We compare approaches for training such an encoder and show that encoders pre-trained over multiple tasks generalize well to unseen tasks. We also compare ways of extracting fixed- and limited-size representations from this encoder, including different ways of pooling features extracted from multiple layers or positions. Our best approach compares favorably to knowledge distillation, achieving higher accuracy and lower computational cost once the system is handling around 7 tasks. Further, we show that through binary quantization, we can reduce the size of the extracted representations by a factor of 16 making it feasible to store them for later use. The resulting method offers a compelling solution for using large-scale pre-trained models at a fraction of the computational cost when multiple tasks are performed on the same text.

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

↑