EMNLP Findings2020
General Purpose Text Embeddings from Pre-trained Language Models for Scalable Inference
Jingfei Du, Myle Ott, Haoran Li, Xing Zhou, Veselin Stoyanov
Abstract
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.
Ask Lune
Ask anything. The answer quotes the paper.
Lune reads all of it and the papers around it, then shows you the passages behind every answer.
Lune answers from
the full paper · 3 top-tier papers that cite it · related work
Free to start. No credit card required.
Cited by top-tier papers3
- Towards Optimal Caching and Model Selection for Large Model InferenceBanghua Zhu, Ying Sheng, Lianmin Zheng, Clark W. Barrett et al.NeurIPS 2023 · 19 citations
- Robust Concept Erasure via Kernelized Rate-Distortion MaximizationSomnath Basu Roy Chowdhury, Nicholas Monath, Kumar Avinava Dubey, Amr Ahmed et al.NeurIPS 2023 · 12 citations
- Plug-and-Play Document Modules for Pre-trained ModelsChaojun Xiao, Zhengyan Zhang, Xu Han, Chi-Min Chan et al.ACL 2023 · 5 citations
Builds on3
- ALBERT: A Lite BERT for Self-supervised Learning of Language RepresentationsZhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel et al.ICLR 2020 · 7,418 citations
- Training with Quantization Noise for Extreme Model CompressionPierre Stock, Angela Fan, Benjamin Graham, Edouard Grave et al.ICLR 2021 · 262 citations
- Towards Backward-Compatible Representation LearningYantao Shen, Yuanjun Xiong, Wei Xia, Stefano SoattoCVPR 2020
Related papers
- Learning Easily Updated General Purpose Text Representations with Adaptable Task-Specific PrefixKuan-Hao Huang, Liang Tan, Rui Hou, Sinong Wang et al.EMNLP Findings 2023
- Masking as an Efficient Alternative to Finetuning for Pretrained Language ModelsMengjie Zhao, Tao Lin, Fei Mi, Martin Jaggi et al.EMNLP 2020 · 61 citations
- PreQuant: A Task-agnostic Quantization Approach for Pre-trained Language ModelsZhuocheng Gong, Jiahao Liu, Qifan Wang, Yang Yang et al.ACL Findings 2023 · 5 citations
- Meta-KD: A Meta Knowledge Distillation Framework for Language Model Compression across DomainsHaojie Pan, Chengyu Wang, Minghui Qiu, Yichang Zhang et al.ACL 2021
- Learning to Compress Prompts with Gist TokensJesse Mu, Xiang Li, Noah D. GoodmanNeurIPS 2023 · 488 citations
