- Prepare by installing the conda environment using
conda env create --file=env.yaml
, which will install the environmentmemloc
in python 3.9. - Add folders
logs
,checkpoints
and subfolders to the root folder by runningbash setup_folders.sh
. - Train models by running
run_all.sh training
from withinsrc/submit_scripts/
. Model checkpoints will be stored to thecheckpoints/<dataset>
folder, and during training / analysis progress information will be saved tologs/<analysis_type>
. - Subsequently, analyses can be conducted by running
run_all.sh <analysis>
from withinsrc/submit_scripts
where analysis is one ofswapping | retraining | gradients | probing | centroid_analysis
. - Individual analyses can be visualised using the corresponding notebooks (
visualise_layer_swapping.ipynb
,visualise_layer_retraining.ipynb
,visualise_gradients.py
,visualise_probing.ipynb
), that start with cells for the control setup (section 3.2), followed by cells the main results analysis (section 4). - Centroid analysis can be performed using
visualise_centroid_analysis.ipynb
, after first executingvisualise_mmaps.ipynb
for all models / datasets, to compute the generalisation scores used in the centroid analysis correlation analysis. - Afterwards, summary visualisations can be computed using
summarising_visualisations.ipynb
. - For the appendix experiments using the 1.3B models, execute
run_all.sh <mode>
from withinsrc/submit_scripts_big/
first usingtraining
, followed byswapping
andcentroid_analysis
.
-
Notifications
You must be signed in to change notification settings - Fork 0
vernadankers/memorisation_localisation
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Implementation for the ACL-Findings 2024 paper on memorisation localisation for NLP classification tasks.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published