Knowledge Grafting of Large Language Models

Guodong Du, Xuanning Zhou, Junlin Li, Zhuo Li, Zesheng Shi +7 more
5/24/2025
cs.AIcs.CLcs.LG

Official code: duguodong7/GraftLLM (9 stars, last commit 2025-06-10).

Abstract

Cross-capability transfer is a key challenge in large language model (LLM) research, with applications in multi-task integration, model compression, and continual learning. Recent works like FuseLLM and FuseChat have demonstrated the potential of transferring multiple model capabilities to lightweight models, enhancing adaptability and efficiency, which motivates our investigation into more efficient cross-capability transfer methods. However, existing approaches primarily focus on small, homogeneous models, limiting their applicability. For large, heterogeneous models, knowledge distillation with full-parameter fine-tuning often overlooks the student model's intrinsic capacity and risks catastrophic forgetting, while PEFT methods struggle to effectively absorb knowledge from source LLMs. To address these issues, we introduce GraftLLM, a novel method that stores source model capabilities in a target model with SkillPack format. This approach preserves general capabilities, reduces parameter conflicts, and supports forget-free continual learning and model fusion. We employ a module-aware adaptive compression strategy to compress parameter updates, ensuring efficient storage while maintaining task-specific knowledge. The resulting SkillPack serves as a compact and transferable knowledge carrier, ideal for heterogeneous model fusion and continual learning. Experiments across various scenarios demonstrate that GraftLLM outperforms existing techniques in knowledge transfer, knowledge fusion, and forget-free learning, providing a scalable and efficient solution for cross-capability transfer. The code is publicly available at: https://github.com/duguodong7/GraftLLM.

View on arXivView PDF

Code Implementations(1)

Knowledge Grafting of Large Language Models

90Shell, PythonMay 23, 20251 years ago

Similar Papers

Cite this paper

@article{du2025knowledge,
  title  = {Knowledge Grafting of Large Language Models},
  author = {Guodong Du and Xuanning Zhou and Junlin Li and Zhuo Li and Zesheng Shi and Wanyu Lin and Ho-Kin Tang and Xiucheng Li and Fangming Liu and Wenya Wang and Min Zhang and Jing Li},
  year   = {2025},
  eprint = {2505.18502},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.18502v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.18502.svg)](https://codeofpaper.com/paper/2505.18502)

Discussion