Transformer-based language models (LMs) are powerful and widely-applicable tools, but their usefulness is constrained by a finite context window and the expensive computational cost of processing long text documents. We propose to adapt pre-trained LMs into AutoCompressors. These language models are capable of compressing long contexts into compact summary vectors, which are then accessible to the model as soft prompts. Summary vectors are trained with an unsupervised objective, whereby long documents are processed in segments, and summary vectors from all previous segments are used in language modeling. We fine-tune OPT and Llama-2 models on sequences of up to 30,720 tokens and show that AutoCompressors can utilize long contexts to improve perplexity. We evaluate AutoCompressors on in-context learning by compressing task demonstrations and find that summary vectors are good substitutes for plain-text demonstrations, increasing accuracy while reducing inference costs. Finally, we explore the benefits of pre-computing summary vectors for large corpora by applying summary vectors to retrievalaugmented language modeling and a passage re-ranking task. Overall, AutoCompressors emerge as a simple and inexpensive solution to extend the context window of LMs while speeding up inference over long contexts.
Autoencoding-Free Context Compression for LLMs via Contextual Semantic Anchors
School of Computer Science and Engineering, Northeastern University, Shenyang, China(东北大学计算机科学与工程学院,中国沈阳);NiuTrans Research, Shenyang, China(沈阳NiuTrans研究院,中国);Kunming University of Science and Technology, Kunming, China(昆明理工大学,中国昆明)
Improving Transfer Learning for Sequence Labeling Tasks by Adapting Pre-trained Neural Language Models
FACULTY OF ELECTRICAL ENGINEERING AND COMPUTING(电气工程与计算学院);University of Zagreb, Faculty of Electrical Engineering and Computing(Zagreb大学电气工程与计算学院);Department of Electronics, Microelectronics, Computer and Intelligent systems(电子、微电子、计算机和智能系统系);Text Analysis and Knowledge Engineering Laboratory (TakeLab)(文本分析与知识工程实验室)
Position IDs Matter: An Enhanced Position Layout for Efficient Context Compression in Large Language Models
NLP Lab, School of Computer Science and Engineering, Northeastern University, Shenyang, China(东北大学计算机科学与工程学院自然语言处理实验室);NiuTrans Research, Shenyang, China(NiuTrans研究院)
Perception Compressor: A Training-Free Prompt Compression Framework in Long Context Scenarios
Shenzhen International Graduate School, Tsinghua University(清华大学深圳国际研究生院);Pengcheng Laboratory(鹏城实验室);Ant Group(蚂蚁集团);School of Artificial Intelligence, Sun Yat-sen University(中山大学人工智能学院)
Adapting Psycholinguistic Research for LLMs: Gender-inclusive Language in a Coreference Context
Insight SFI Research Centre for Data Analytics(Insight SFI数据 analytics研究中心);School of Information and Communication Studies(信息与传播研究学院);School of Mathematics and Statistics(数学与统计学院);University College Dublin(都柏林大学学院)
Dynamic Compressing Prompts for Efficient Inference of Large Language Models
School of Software Engineering, South China University of Technology(华南理工大学软件学院);Pazhou Lab(琶洲实验室);School of Future Technology, South China University of Technology(华南理工大学未来技术学院);Peng Cheng Laboratory(鹏城实验室);Hong Kong Polytechnic University(香港理工大学);Department of Computer Science and Technology, Chongqing University of Posts and Telecommunications(重庆邮电大学计算机科学与技术学院)
ChatRetriever: Adapting Large Language Models for Generalized and Robust Conversational Dense Retrieval
Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Université de Montréal(蒙特利尔大学);Beijing Academy of Artificial Intelligence(北京人工智能研究院);Waseda University(早稻田大学)
From Context to EDUs: Faithful and Structured Context Compression via Elementary Discourse Unit Decomposition
DeepLang AI;Department of Computer Science and Technology, Tsinghua University(计算机科学与技术系,清华大学);Beijing University of Posts and Telecommunications(北京邮电大学);Beijing Jiaotong University(北京交通大学)
Gradual Forgetting: Logarithmic Compression for Extending Transformer Context Windows
Department of Computer Science, Indiana University Bloomington(计算机科学系,印第安纳大学布卢明顿分校);Department of Psychological and Brain Sciences, Indiana University Bloomington(心理学与脑科学系,印第安纳大学布卢明顿分校)