[NeurIPS'23] Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors
Python
85
25 commits
updated Dec 21, 2024
Official implementation of Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors (NeurIPS 2023).
Please feel free to email Tom or raise an issue with this repository and we'll get back to you as soon as possible.
conda env create --name grace_env --file environment.yml
conda activate grace_env
pip install -e .
The QA experiments use data linked by the MEND repository. Per their instructions, you can download the data for NQ and zsRE from their Google Drive link and unzip each sub-directory into grace/data. SCOTUS and Hallucination data are handled through huggingface. zip files can be unzipped using tar -xf [filename].zip.
The data for the SCOTUS experiments is available on huggingface
Our pre-trained models are public:
Experiments are run using main.py. Experiment settings and hyperparameters are chosen using hydra. While more examples are available in ./scripts/main.sh, three representative experiments can be run as follows:
python grace/main.py experiment=hallucination model=gpt2xl editor=grace
python grace/main.py experiment=scotus model=bert editor=grace
python grace/main.py experiment=qa model=t5small editor=grace
Please use the following to cite this work:
@inproceedings{hartvigsen2023aging,
title={Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors},
author={Hartvigsen, Thomas and Sankaranarayanan, Swami and Palangi, Hamid and Kim, Yoon and Ghassemi, Marzyeh},
booktitle={Advances in Neural Information Processing Systems},
year={2023}
}
287 followers · starred Dec 2023
6 followers · starred May 2025
[NeurIPS'23] Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors
Python
85
25 commits
updated Dec 21, 2024
Official implementation of Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors (NeurIPS 2023).
Please feel free to email Tom or raise an issue with this repository and we'll get back to you as soon as possible.
conda env create --name grace_env --file environment.yml
conda activate grace_env
pip install -e .
The QA experiments use data linked by the MEND repository. Per their instructions, you can download the data for NQ and zsRE from their Google Drive link and unzip each sub-directory into grace/data. SCOTUS and Hallucination data are handled through huggingface. zip files can be unzipped using tar -xf [filename].zip.
The data for the SCOTUS experiments is available on huggingface
Our pre-trained models are public:
Experiments are run using main.py. Experiment settings and hyperparameters are chosen using hydra. While more examples are available in ./scripts/main.sh, three representative experiments can be run as follows:
python grace/main.py experiment=hallucination model=gpt2xl editor=grace
python grace/main.py experiment=scotus model=bert editor=grace
python grace/main.py experiment=qa model=t5small editor=grace
Please use the following to cite this work:
@inproceedings{hartvigsen2023aging,
title={Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors},
author={Hartvigsen, Thomas and Sankaranarayanan, Swami and Palangi, Hamid and Kim, Yoon and Ghassemi, Marzyeh},
booktitle={Advances in Neural Information Processing Systems},
year={2023}
}
287 followers · starred Dec 2023
6 followers · starred May 2025