zjunlp/EasyEdit

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

What it solves

EasyEdit provides a unified framework for knowledge editing in Large Language Models (LLMs), allowing users to correct hallucinations, remove biases, or update outdated factual information without needing to retrain the entire model from scratch.

How it works

The framework supports two primary approaches to model modification:

  1. Parameter-based Editing (EasyEdit 1.0): Updates internal model parameters or introduces additional parameters to change specific knowledge (e.g., inserting, updating, or erasing facts).
  2. Inference-time Steering (EasyEdit 2.0): Enables real-time steering of LLMs during inference to control behavior and knowledge without retraining.

It integrates a wide variety of editing algorithms (such as ROME, MEMIT, and WISE) and provides tools for evaluating the success of these edits across different datasets.

Who it’s for

It is designed for AI researchers and developers who need to precisely manipulate the knowledge and behavior of pre-trained LLMs, as well as those working on lifelong model editing and multimodal model modification.

Highlights

  • Comprehensive Algorithm Library: Supports a vast array of editing methods including ROME, MEMIT, AlphaEdit, and CORE.
  • Unified Workflow: Provides a consistent interface for both parameter-modifying edits and real-time steering.
  • Lifelong Editing: Includes specialized methods like WISE and SimIE for continuous, long-term knowledge updates.
  • Multimodal Support: Extends editing capabilities to Multimodal Large Language Models (MLLMs).
  • Evaluation Tools: Includes the KnowEdit benchmark and automated pipelines for assessing editing performance.

Related

  • Project
  • Project
  • Project
  • Project