HyperRepair: Recovering Forgotten General Capabilities of Fine-Tuned Language Models
Abstract
Fine-tuning improves a language model's performance in a target domain but can weaken its general capabilities. Existing methods often face a trade-off between general capabilities and domain specialization, making it difficult to preserve both. We introduce HyperRepair, a framework for recovering general capabilities while retaining domain specialization at only inference cost. To make recovery generalizable across models sharing a pretrained backbone, HyperRepair learns a hypernetwork from repairs trained on source models. The hypernetwork uses activation fingerprints that summarize changes from the pretrained backbone to generate a tailored Repairing Side Net (RSN), whose prompt-conditioned gate applies corrections selectively. This enables recovery on models from unseen adaptation domains without target-domain examples or additional optimization. We evaluate HyperRpair across two model families, 12 LoRA adaptation datasets, and 15 general benchmarks. On the default split, HyperRepair achieves 93.4% of the base models' average general score while retaining 99.5% of the fine-tuned models' average domain score.
Create a lesson
Metadata
- Comments
- 29 pages, 5 figures
Related papers
Labadain-MedQA: A Tetun Medical QA Dataset for Fine-Tuning and Evaluating Large Language Models
Shared title terminologycs.CLGabriel de Jesus, Sérgio Nunes
Group-Balanced Supervised Fine-Tuning for Knowledge-Intensive Domains
Shared title terminologycs.CLMark Heimann, Bruno Jacob
Saidzoda-Tajik-E5-Large: Fine-Tuning a 560M Embedder for Tajik Retrieval
Shared title terminologycs.CLTohir Saidzoda, Nekruz Maxudov, Bedil Karimov et al.
KV-Cache Patching: Tracing How and Where Fine-Tuned Behaviors Arise
Shared title terminologycs.CLJonas Loos, Oliver Eberle
Can Large Language Models Extend Their Agentic Capabilities to Goal Pursuit in Open-Ended Multi-Turn Interaction?
Shared title terminologycs.CLMingyu Chen, Jingkai Lin, Xiaofen Xing et al.
What Breaks and What Comes Back: Capability Damage and Recovery in Depth-Pruned Small Language Models
Shared title terminologycs.CLPiyush Dhoka, Vedant Pandhare, Varun Inamdar et al.