Plug-and-Play Document Modules for Pre-trained Models
Chaojun Xiao, Zhengyan Zhang, Xu Han, Chi-Min Chan, Yankai Lin, Zhiyuan Liu, Xiangyang Li, Zhonghua Li, Zhao Cao, Maosong Sun
Abstract
Large-scale pre-trained models (PTMs) have been widely used in document-oriented NLP tasks, such as question answering. However, the encoding-task coupling requirement results in the repeated encoding of the same documents for different tasks and queries, which is highly computationally inefficient. To this end, we target to decouple document encoding from downstream tasks, and propose to represent each document as a plug-and-play document module, i.e., a document plugin, for PTMs (PlugD). By inserting document plugins into the backbone PTM for downstream tasks, we can encode a document one time to handle multiple tasks, which is more efficient than conventional encoding-task coupling methods that simultaneously encode documents and input queries using task-specific encoders. Extensive experiments on 8 datasets of 4 typical NLP tasks show that PlugD enables models to encode documents once and for all across different scenarios. Especially, PlugD can save 69% computational costs while achieving comparable performance to state-of-the-art encoding-task coupling methods. Additionally, we show that PlugD can serve as an effective post-processing way to inject knowledge into task-specific models, improving model performance without any additional model training. Our code and checkpoints can be found in https://github.com/ thunlp/Document-Plugin .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- LoRA: Low-Rank Adaptation of Large Language Models cites Language Models are Few-Shot Learners
- KB-Plugin: A Plug-and-play Framework for Large Language Models to Induce Programs over Low-resourced Knowledge Bases cites LoRA: Low-Rank Adaptation of Large Language Models
- KB-Plugin: A Plug-and-play Framework for Large Language Models to Induce Programs over Low-resourced Knowledge Bases cites Language Models are Few-Shot Learners
- KB-Plugin: A Plug-and-play Framework for Large Language Models to Induce Programs over Low-resourced Knowledge Bases cites Plug-and-Play Knowledge Injection for Pre-trained Language Models
- Plug-and-Play Knowledge Injection for Pre-trained Language Models cites LoRA: Low-Rank Adaptation of Large Language Models
- Plug-and-Play Knowledge Injection for Pre-trained Language Models cites Flamingo: a Visual Language Model for Few-Shot Learning
- Cartridges: Lightweight and general-purpose long context representations via self-study cites LoRA: Low-Rank Adaptation of Large Language Models
- Cartridges: Lightweight and general-purpose long context representations via self-study cites Big Bird: Transformers for Longer Sequences
- Cartridges: Lightweight and general-purpose long context representations via self-study cites Plug-and-Play Knowledge Injection for Pre-trained Language Models
- Finetuned Language Models are Zero-Shot Learners cites Language Models are Few-Shot Learners
- Augmentation-Adapted Retriever Improves Generalization of Language Models as Generic Plug-In cites Language Models are Few-Shot Learners
- Augmentation-Adapted Retriever Improves Generalization of Language Models as Generic Plug-In cites Plug-and-Play Knowledge Injection for Pre-trained Language Models
- Flamingo: a Visual Language Model for Few-Shot Learning cites Language Models are Few-Shot Learners
- Flamingo: a Visual Language Model for Few-Shot Learning cites Finetuned Language Models are Zero-Shot Learners
Cited by top-tier papers5
- Cartridges: Lightweight and general-purpose long context representations via self-studySabri Eyuboglu, Ryan Ehrlich, Simran Arora, Neel Guha et al.ICLR 2026 · 74 citations
- Augmentation-Adapted Retriever Improves Generalization of Language Models as Generic Plug-InZichun Yu, Chenyan Xiong, Shi Yu, Zhiyuan LiuACL 2023 · 15 citations
- Plug-and-Play Knowledge Injection for Pre-trained Language ModelsZhengyan Zhang, Zhiyuan Zeng, Yankai Lin, Huadong Wang et al.ACL 2023 · 10 citations
- KB-Plugin: A Plug-and-play Framework for Large Language Models to Induce Programs over Low-resourced Knowledge BasesJiajie Zhang, Shulin Cao, Linmei Hu, Ling Feng et al.EMNLP 2024 · 3 citations
- Diff-Plugin: Revitalizing Details for Diffusion-Based Low-Level TasksYuhao Liu, Zhanghan Ke, Fang Liu, Nanxuan Zhao et al.CVPR 2024
Builds on26
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- Flamingo: a Visual Language Model for Few-Shot LearningJean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech et al.NeurIPS 2022 · 6,707 citations
- Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu et al.ICLR 2022 · 4,966 citations
- Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie et al.NeurIPS 2020 · 3,159 citations
Related papers
- Decouple knowledge from paramters for plug-and-play language modelingXin Cheng, Yankai Lin, Xiuying Chen, Dongyan Zhao et al.ACL Findings 2023 · 4 citations
- XDoc: Unified Pre-training for Cross-Format Document UnderstandingJingye Chen, Tengchao Lv, Lei Cui, Cha Zhang et al.EMNLP Findings 2022 · 5 citations
- General Purpose Text Embeddings from Pre-trained Language Models for Scalable InferenceJingfei Du, Myle Ott, Haoran Li, Xing Zhou et al.EMNLP Findings 2020 · 8 citations
- Variator: Accelerating Pre-trained Models with Plug-and-Play Compression ModulesChaojun Xiao, Yuqi Luo, Wenbin Zhang, Pengle Zhang et al.EMNLP Findings 2023 · 1 citation
- A Hierarchical Encoding-Decoding Scheme for Abstractive Multi-document SummarizationChenhui Shen, Liying Cheng, Xuan-Phi Nguyen, Yang You et al.EMNLP Findings 2023 · 18 citations
