rome
Locating and editing factual associations in GPT (NeurIPS 2022)
File Explorer
Download Latest Version (.zip)- __init__.py
- __init__.py
- ft_hparams.py
- ft_main.py
- __init__.py
- data.py
- knowledge_neurons.py
- patch.py
- tests.py
- LICENSE
- pararel_evaluate.py
- plot_pararel_results.py
- README.md
- requirements.txt
- setup.py
- __init__.py
- kn_hparams.py
- kn_main.py
- efk.py
- enn.py
- ft.py
- mend.py
- efk.yaml
- enn.yaml
- ft.yaml
- mend.yaml
- fc.yaml
- gen.yaml
- qa.yaml
- bart-base.yaml
- bert-base.yaml
- distilgpt2.yaml
- gpt2.yaml
- gpt2large.yaml
- gpt2medium.yaml
- gpt2xl.yaml
- gptj.yaml
- gptneo27.yaml
- t5large.yaml
- t5small.yaml
- t5xl.yaml
- t5xxl.yaml
- config.yaml
- fever.py
- nq.py
- wiki.py
- zsre.py
- __init__.py
- editable_model.py
- efk_hparams.py
- efk_main.py
- hooks.py
- losses.py
- mend_hparams.py
- mend_main.py
- models.py
- nn.py
- oracle.py
- README.md
- requirements.txt
- run.py
- trainer.py
- utils.py
- README.md
- __init__.py
- attr_snippets.py
- counterfact.py
- knowns.py
- tfidf_stats.py
- zsre.py
- demo.py
- eval_utils_counterfact.py
- eval_utils_zsre.py
- __init__.py
- causal_trace.py
- evaluate.py
- summarize.py
- sweep.py
- EleutherAI_gpt-j-6B_constr.json
- EleutherAI_gpt-j-6B_unconstr.json
- gpt2-large_constr.json
- gpt2-medium_constr.json
- gpt2-xl_attn.json
- gpt2-xl_constr.json
- gpt2-xl_unconstr.json
- gpt2-xl.json
- gpt2-xl_CF.json
- gpt2-xl_zsRE.json
- gpt2-xl.json
- EleutherAI_gpt-j-6B.json
- EleutherAI_gpt-j-6B_CF.json
- gpt2-xl.json
- gpt2-xl_CF.json
- gpt2-xl_zsRE.json
- EleutherAI_gpt-j-6B.json
- gpt2-large.json
- gpt2-medium.json
- gpt2-xl.json
- experiments
- globals.yml
- table_population.ipynb
- table_population_zsre.ipynb
- util
- visualize_sweeps.ipynb
- average_causal_effects.ipynb
- baselines
- causal_trace.ipynb
- causal_trace_frozen_mlp_attn.ipynb
- dsets
- experiments
- globals.yml
- hparams
- rome
- rome.ipynb
- util
- __init__.py
- compute_u.py
- compute_v.py
- layer_stats.py
- README.md
- repr_tools.py
- rome_hparams.py
- rome_main.py
- tok_dataset.py
- additional.txt
- rome.txt
- causal_trace.sh
- collect_layer_stats.sh
- ipynb_drop_output.py
- rome.yml
- setup_clean_ipynb.sh
- setup_conda.sh
- __init__.py
- generate.py
- globals.py
- hparams.py
- logit_lens.py
- nethook.py
- perplexity.py
- runningstats.py
- .gitattributes
- .gitignore
- CITATION.cff
- globals.yml
- LICENSE
- README.md
# Installation Guide
1. Get the code
git clone https://github.com/kmeng01/rome
Downloads the entire project code from GitHub to your computer.
cd rome
Moves into the project folder you just downloaded.
2. Python
Easy RecommendedPrerequisites
python -m rome.layer_stats --layer_num=17 --model_name=gpt2-xl
Runs the Python script (or module).
python -m rome.layer_stats --layer_num=10 --model_name=EleutherAI/gpt-j-6B
Runs the Python script (or module).
python3 -m experiments.evaluate \
Runs the Python script (or module).
python3 -m experiments.summarize --dir_name=ROME --runs=run_<run_id>
Runs the Python script (or module).
python3 -m experiments.summarize --dir_name=X --runs=run_<run_id>
Runs the Python script (or module).
If it runs without errors and prints output in the terminal, it worked.
Pulled directly from this repo's README.
// repository documentation
Was this content helpful?
(0 ratings)
