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

08/14/2023
by   Peng Wang, et al.
0

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 the 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 to apply 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 apply 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 at https://github.com/zjunlp/EasyEdit, 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 at http://knowlm.zjukg.cn/easyedit.mp4.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/22/2023

Can We Edit Factual Knowledge by In-Context Learning?

Previous studies have shown that large language models (LLMs) like GPTs ...
research
05/22/2023

Editing Large Language Models: Problems, Methods, and Opportunities

Recent advancements in deep learning have precipitated the emergence of ...
research
01/10/2023

Does Localization Inform Editing? Surprising Differences in Causality-Based Localization vs. Knowledge Editing in Language Models

Language models are known to learn a great quantity of factual informati...
research
11/20/2022

Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors

Large pre-trained models decay over long-term deployment as input distri...
research
01/25/2023

Editing Language Model-based Knowledge Graph Embeddings

Recently decades have witnessed the empirical success of framing Knowled...
research
06/13/2022

Memory-Based Model Editing at Scale

Even the largest neural networks make errors, and once-correct predictio...
research
05/02/2019

Real Differences between OT and CRDT under a General Transformation Framework for Consistency Maintenance in Co-Editors

OT (Operational Transformation) was invented for supporting real-time co...

Please sign up or login with your details

Forgot password? Click here to reset