Lune

ICLR2025Top-tier venue

Generative Adapter: Contextualizing Language Models in Parameters with A Single Forward Pass

Tong Chen, Hao Fang, Patrick Xia, Xiaodong Liu, Benjamin Van Durme, Luke Zettlemoyer, Jianfeng Gao, Hao Cheng

Abstract

Large language models (LMs) are typically adapted to improve performance on new contexts (text prompts that define new tasks or domains) through fine-tuning or prompting. However, there is an accuracy compute tradeoff -- fine-tuning incurs significant training cost and prompting increases inference overhead. We introduce GenerativeAdapterGenerativeAdapter, an effective and efficient adaptation method that directly maps new contexts to low-rank LM adapters, thereby significantly reducing inference overhead with no need for finetuning. The adapter generator is trained via self-supervised learning, and can be used to adapt a single frozen LM for any new task simply by mapping the associated task or domain context to a new adapter. We apply GenerativeAdapterGenerativeAdapter to two pretrained LMs (Mistral-7B-Instruct and Llama2-7B-Chat) and evaluate the adapted models in three adaption scenarios: knowledge acquisition from documents, learning from demonstrations, and personalization for users. In StreamingQA, our approach is effective in injecting knowledge into the LM's parameters, achieving a 63.5% improvement in F1 score over the model with supervised fine-tuning (from 19.519.5 to 31.531.5) for contexts as long as 32K tokens. In the MetaICL in-context learning evaluation, our method achieves an average accuracy of 44.944.9 across 26 tasks, outperforming the base model. On MSC, our method proves to be highly competitive in memorizing user information from conversations with a 4x reduction in computation and memory costs compared to prompting with full conversation history. Together, these results suggest that GenerativeAdapterGenerativeAdapter should allow for general adaption to a wide range of different contexts.

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.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • LoRA: Low-Rank Adaptation of Large Language Models cites Language Models are Few-Shot Learners
  • IA2: Alignment with ICL Activations improves Supervised Fine-Tuning cites LoRA: Low-Rank Adaptation of Large Language Models
  • IA2: Alignment with ICL Activations improves Supervised Fine-Tuning cites Language Models are Few-Shot Learners
  • Doc-to-LoRA: Learning to Instantly Internalize Contexts cites Language Models are Few-Shot Learners
  • Random Feature Attention cites Language Models are Few-Shot Learners
  • Self-Adapting Language Models cites LoRA: Low-Rank Adaptation of Large Language Models
  • Self-Adapting Language Models cites Language Models are Few-Shot Learners
  • SHINE: A Scalable In-Context Hypernetwork for Mapping Context to LoRA in a Single Pass cites Doc-to-LoRA: Learning to Instantly Internalize Contexts
  • SHINE: A Scalable In-Context Hypernetwork for Mapping Context to LoRA in a Single Pass cites Self-Adapting Language Models
  • SHINE: A Scalable In-Context Hypernetwork for Mapping Context to LoRA in a Single Pass cites Language Models are Few-Shot Learners
  • Language Models are Few-Shot Learners cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
  • Linear Transformers Are Secretly Fast Weight Programmers cites Random Feature Attention
  • Training Large Reasoning Models Efficiently via Progressive Thought Encoding cites LoRA: Low-Rank Adaptation of Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. Self-Adapting Language ModelsAdam Zweiger, Jyothish Pari, Han Guo, Yoon Kim et al.NeurIPS 2025 · 78 citations
  2. Doc-to-LoRA: Learning to Instantly Internalize ContextsRujikorn Charakorn, Edoardo Cetin, Shinnosuke Uesaka, Robert LangeICML 2026 · 27 citations
  3. SHINE: A Scalable In-Context Hypernetwork for Mapping Context to LoRA in a Single PassYewei Liu, Xiyuan Wang, Yansheng Mao, Yoav Gelberg et al.ICML 2026 · 11 citations
  4. Training Large Reasoning Models Efficiently via Progressive Thought EncodingZeliang Zhang, Xiaodong Liu, Hao Cheng, Hao Sun et al.ICLR 2026 · 2 citations
  5. IA2: Alignment with ICL Activations improves Supervised Fine-TuningAayush Mishra, Daniel Khashabi, Anqi LiuICLR 2026 · 1 citation

Builds on20

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
  3. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  4. Random Feature AttentionHao Peng, Nikolaos Pappas, Dani Yogatama, Roy Schwartz et al.ICLR 2021 · 425 citations
  5. Linear Transformers Are Secretly Fast Weight ProgrammersImanol Schlag, Kazuki Irie, Jürgen SchmidhuberICML 2021 · 394 citations

Related papers

  1. LLaMA-Adapter: Efficient Fine-tuning of Large Language Models with Zero-initialized AttentionRenrui Zhang, Jiaming Han, Chris Liu, Aojun Zhou et al.ICLR 2024 · 174 citations
  2. Context Tuning for In-Context OptimizationJack Lu, Ryan Teehan, Zhenbang Yang, Mengye RenICML 2026
  3. PortLLM: Personalizing Evolving Large Language Models with Training-Free and Portable Model PatchesRana Muhammad Shahroz, Pingzhi Li, Sukwon Yun, Zhenyu Wang et al.ICLR 2025
  4. Optimization Inspired Few-Shot Adaptation for Large Language ModelsBoyan Gao, Xin Wang, Yibo Yang, David A. CliftonNeurIPS 2025 · 3 citations
  5. Drag-and-Drop LLMs: Zero-Shot Prompt-to-WeightsZhiyuan Liang, Dongwen Tang, Yuhao Zhou, Xuanlei Zhao et al.NeurIPS 2025 · 22 citations
Dusk over the sea between two cliffs drawn in fine vertical lines