memit  by kmeng01

Transformer memory mass-editor (ICLR 2023 research paper)

Created 2 years ago
513 stars

Top 60.9% on SourcePulse

GitHubView on GitHub
Project Summary

MEMIT enables efficient, large-scale factual editing within pre-trained transformer language models. It targets researchers and practitioners seeking to correct or update knowledge embedded in LLMs without full retraining. The primary benefit is the ability to modify thousands of facts with minimal computational overhead compared to fine-tuning.

How It Works

MEMIT operates by identifying and modifying specific weights within the transformer's attention layers. It formulates factual edits as targeted interventions, calculating necessary weight adjustments to steer the model's output towards the desired new fact. This approach avoids catastrophic forgetting and allows for precise, localized modifications.

Quick Start & Requirements

  • Install via bash ./scripts/setup_conda.sh $CONDA_HOME.
  • Requires Conda for environment management, PyTorch, and CUDA.
  • Demo notebook available at notebooks/memit.ipynb.
  • Evaluation suite at experiments/evaluate.py.

Highlighted Details

  • Capable of editing thousands of facts in a single pass.
  • Demonstrates effectiveness on models like GPT-J-6B.
  • Provides tools for full evaluation and result summarization.

Maintenance & Community

The project is associated with ICLR 2023 and authored by Kevin Meng et al. No specific community channels or active maintenance signals are provided in the README.

Licensing & Compatibility

The project is released under an unspecified license. The README does not detail licensing terms or compatibility for commercial use.

Limitations & Caveats

The README does not specify the license, making commercial use uncertain. It also lacks explicit details on supported model architectures beyond the GPT-J-6B example.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
3 stars in the last 30 days

Explore Similar Projects

Starred by Stas Bekman Stas Bekman(Author of "Machine Learning Engineering Open Book"; Research Engineer at Snowflake) and Thomas Wolf Thomas Wolf(Cofounder of Hugging Face).

transformer by sannykim

0%
546
Resource list for studying Transformers
Created 6 years ago
Updated 1 year ago
Starred by Jeremy Howard Jeremy Howard(Cofounder of fast.ai) and Stas Bekman Stas Bekman(Author of "Machine Learning Engineering Open Book"; Research Engineer at Snowflake).

SwissArmyTransformer by THUDM

0.3%
1k
Transformer library for flexible model development
Created 4 years ago
Updated 8 months ago
Feedback? Help us improve.