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

By Jingfei Du, Myle Ott, Haoran Li, Xing Zhou, Veselin Stoyanov. 2020

10 citations recorded by the source corpus.

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 aim to reduce the inference cost in a setting where many different predictions are made on a single piece of text. In that case, computational cost during inference can be amortized over the different predictions (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 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 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.

Subfields: Natural Language Processing, Representation & Self-Supervised Learning

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Natural Language Processing

  1. Luke S. Zettlemoyer
  2. Mohit Bansal
  3. Robin Jia
  4. Michael Lewis
  5. Percy Liang
  6. Yejin Choi
  7. Jonathan Berant
  8. Samuel R. Bowman

In Representation & Self-Supervised Learning

  1. Michael Lewis
  2. Robin Jia
  3. Luke S. Zettlemoyer
  4. Emily M. Bender
  5. Emily L. Denton
  6. Samuel R. Bowman
  7. Furu Wei
  8. Graham Neubig

Citations in the corpus