We focus on the way the MLP keys (rome/compute_u.py
and rome/compute_v.py
scripts for details.
The derived ROME update equation is
where
Note that the optimization step to compute
where
We find that the latter leads to rapid degradation in model performance in a sequential editing setting, and prone to particular edits known as disabling edits that render the model unusable post-update. Our experiments focus on unifying the computation of the keys in the update equation, and we study the use of
We recommend using Docker to set up a clean dev environment.
docker compose up -d --build
To download the datasets used for evaluation, install Git LFS if needed:
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install -y git-lfs
git lfs pull
The script supports sequential editing with the --sequential
flag. With sequential editing, the edited model is evaluated for downstream task performance on 4 GLUE datasets after every 20 edits. The interval can be changed within the code-base.
You can evaluate either GPT2-XL or GPTJ-6B using the appropriate hyperparameter file to configure how the update equation is computed.
python experiments/evaluate.py \
--model_name=${MODEL_NAME} \
--hparams_fname=${HPARAM_FILE_NAME} \
--ds_name=cf \
--sequential
If you find our work useful, please cite it using the following:
@article{gupta2024rebuilding,
title={Rebuilding ROME: Resolving Model Collapse during Sequential Model Editing},
author={Gupta, Akshat and Anumanchipalli, Gopala},
journal={arXiv preprint arXiv:2403.07175},
year={2024}
}
@article{gupta2024model,
title={Model Editing at Scale leads to Gradual and Catastrophic Forgetting},
author={Gupta, Akshat and Rao, Anurag and Anumanchipalli, Gopala},
journal={arXiv preprint arXiv:2401.07453},
year={2024}
}