EasyEdit

[ACL 2024] An Easy-to-use Knowledge Editing Framework for LLMs.

What is EasyEdit?

[ACL 2024] An Easy-to-use Knowledge Editing Framework for LLMs.

Overview of EasyEdit

What it is

EasyEdit is an open-source knowledge editing framework for large language models (LLMs), accepted at ACL 2024. It provides a unified interface for editing, steering, and evaluating LLMs without retraining. The framework supports both parameter-modifying methods (EasyEdit 1.0) and inference-time steering methods (EasyEdit 2.0), covering tasks such as knowledge insertion, update, and erasure. It includes a benchmark (KnowEdit) and integrates multiple editing algorithms, including ROME, MEMIT, WISE, and others. EasyEdit is developed by ZJU NLP and is available on GitHub under the MIT license.

Key features

  • Supports multiple knowledge editing methods: ROME, MEMIT, WISE, EMMET, AlphaEdit, CORE, NAMET, UNKE, AnyEdit, and others.
  • Provides a unified framework for both parameter-modifying editing (EasyEdit 1.0) and inference-time steering (EasyEdit 2.0).
  • Includes evaluation tools with multiple paradigms, including token-level teacher-forcing and LLM-as-a-judge approaches.
  • Integrates the KnowEdit benchmark dataset for standardized evaluation.
  • Supports multi-GPU editing, multimodal pipelines, and vLLM deployment.
  • Offers rollback support for certain editing methods (e.g., GRACE).
  • Provides a beginner's guide and tutorial notebooks for newcomers.

Use cases

  • Correcting or updating factual knowledge in pre-trained LLMs without full retraining.
  • Erasing specific knowledge from models for privacy or safety reasons.
  • Steering model behavior during inference for controllable generation.
  • Evaluating the robustness and effectiveness of different knowledge editing techniques.
  • Research on lifelong model editing and continuous knowledge updates.

Getting started

bash# Clone the repositorygit clone https://github.com/zjunlp/EasyEdit.gitcd EasyEdit# Install dependenciespip install -r requirements.txtFor detailed usage, see the repository README and documentation.

License and pricing

The project is licensed under the MIT license. It is open-source and free to use.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/zjunlpeasyedit.svg)](https://yunodb.com/tools/zjunlpeasyedit?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/zjunlpeasyedit?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/zjunlpeasyedit.svg" alt="Featured on YunoDB" height="20"></a>