SHINE: A Scalable In-Context Hypernetwork for Mapping Context to LoRA in a Single Pass
cs.CL, cs.AI
Submitted: 2026-02-06
Updated: 2026-10-19
Code: https://github.com/MuLabPKU/SHINE
License: http://creativecommons.org/licenses/by/4.0/
The gist: We propose SHINE (Scalable Hyper In-context NEtwork), a scalable hypernetwork that can map diverse meaningful contexts into high-quality LoRA adapters for large language models (LLMs).
Terminology
Abstract
We propose SHINE (Scalable Hyper In-context NEtwork), a scalable hypernetwork that can map diverse meaningful contexts into high-quality LoRA adapters for large language models (LLMs). By reusing the frozen LLM's own parameters in an in-context hypernetwork design and introducing architectural innovations, SHINE overcomes key limitations of prior hypernetworks and achieves strong expressive power with a relatively small number of parameters. We introduce a pretraining and instruction fine-tuning pipeline, and train our hypernetwork to generate high quality LoRA adapters from diverse meaningful contexts in a single forward pass. It updates LLM parameters without any fine-tuning, and immediately enables complex question answering tasks related to the context without directly accessing the context, effectively transforming in-context knowledge to in-parameter knowledge in one pass. Our work achieves outstanding results on various tasks, greatly saves time, computation and memory costs compared to SFT-based LLM adaptation, and shows great potential for scaling. Our code is available at https://github.com/MuLabPKU/SHINE
Sources
- Zhyper: Factorized Hypernetworks for Conditioned LLM Fine-Tuning
- Understanding LoRA as Knowledge Memory: An Empirical Analysis
- Good Agentic Friends Do Not Just Give Verbal Advice: They Can Update Your Weights
- Doc-to-LoRA: Learning to Instantly Internalize Contexts
- The Override Gap: A Magnitude Account of Knowledge Conflict Failure in Hypernetwork-Based Instant LLM Adaptation
- Training Verifiers to Solve Math Word Problems
- MMTEB: Massive Multilingual Text Embedding Benchmark
- In-Place Test-Time Training
- GradMetaNet: An Equivariant Architecture for Learning on Gradients
- Training Transformers for KV Cache Compressibility
- SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarization
- ViT$^3$: Unlocking Test-Time Training in Vision
- Linear-Time Global Visual Modeling without Explicit Attention
- Learn-To-Learn on Arbitrary Textual Conditioning: A Hypernetwork-Driven Meta-Gated LLM
- Context Parametrization with Compositional Adapters
- Meta-Tool: Efficient Few-Shot Tool Adaptation for Small Language Models
- Linearizing Vision Transformer with Test-Time Training
- Drag-and-Drop LLMs: Zero-Shot Prompt-to-Weights
- TransMLA: Multi-Head Latent Attention Is All You Need
- MTEB: Massive Text Embedding Benchmark
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering