ACL 2024system demonstrations27 citations

EasyEdit: An Easy-to-use Knowledge Editing Framework for Large Language Models

Peng Wang, Ningyu Zhang, Bozhong Tian, Zekun Xi, Yunzhi Yao, Ziwen Xu, Mengru Wang, Shengyu Mao

Abstract

Large Language Models (LLMs) usually suffer from knowledge cutoff or fallacy issues, which means they are unaware of unseen events or generate text with incorrect facts owing to outdated/noisy data. To this end, many knowledge editing approaches for LLMs have emerged – aiming to subtly inject/edit updated knowledge or adjust undesired behavior while minimizing the impact on unrelated inputs. Nevertheless, due to significant differences among various knowledge editing methods and the variations in task setups, there is no standard implementation framework available for the community, which hinders practitioners from applying knowledge editing to applications. To address these issues, we propose EasyEdit, an easy-to-use knowledge editing framework for LLMs. It supports various cutting-edge knowledge editing approaches and can be readily applied to many well-known LLMs such as T5, GPT-J, LlaMA, etc. Empirically, we report the knowledge editing results on LlaMA-2 with EasyEdit, demonstrating that knowledge editing surpasses traditional fine-tuning in terms of reliability and generalization. We have released the source code on GitHub, along with Google Colab tutorials and comprehensive documentation for beginners to get started. Besides, we present an online system for real-time knowledge editing, and a demo video.

BibTeX
@inproceedings{wang-etal-2024-easyedit,
    title = "{E}asy{E}dit: An Easy-to-use Knowledge Editing Framework for Large Language Models",
    author = "Wang, Peng  and
      Zhang, Ningyu  and
      Tian, Bozhong  and
      Xi, Zekun  and
      Yao, Yunzhi  and
      Xu, Ziwen  and
      Wang, Mengru  and
      Mao, Shengyu  and
      Wang, Xiaohan  and
      Cheng, Siyuan  and
      Liu, Kangwei  and
      Ni, Yuansheng  and
      Zheng, Guozhou  and
      Chen, Huajun",
    editor = "Cao, Yixin  and
      Feng, Yang  and
      Xiong, Deyi",
    booktitle = "Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations)",
    month = aug,
    year = "2024",
    address = "Bangkok, Thailand",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2024.acl-demos.9/",
    doi = "10.18653/v1/2024.acl-demos.9",
    pages = "82--93"
}
EasyEdit: An Easy-to-use Knowledge Editing Framework for Large Language Models · ACL 2024