Reproduce “LoKI: Low-damage Knowledge Implanting of Large Language Models” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Runyu Wang, Peng Ping, Zhengyu Guo, Xiaoye Zhang, Quan Shi, Liting Zhou, Tianbo Ji

LoKI introduces a parameter-efficient fine-tuning framework that strategically adapts large language models by implanting task-specific knowledge into "low-damage" components of FFN layers. The method significantly mitigates catastrophic forgetting, showing only 0.46% general capability degradation compared to over 84% for full fine-tuning, while achieving competitive or superior task performance.

Key insights

  • Factual and semantic knowledge in large language models is primarily localized within the Feed-Forward Network (FFN) layers, making them key targets for targeted modification.
  • Pre-trained LLMs contain "dormant" or low-impact parameters, particularly within FFN layers, that can serve as safe slots for implanting new task-specific knowledge without significantly disrupting existing general capabilities.
  • Preserving the hierarchical organization of knowledge across different transformer layers is crucial for mitigating catastrophic forgetting, necessitating a balanced distribution of trainable parameters across layers.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.