├── CITATION.cff ├── CONTRIBUTING.md ├── LICENSE ├── README.md └── third_party ├── LICENSE ├── baselines ├── README.md ├── efk │ └── __init__.py ├── ft │ ├── __init__.py │ ├── ft_hparams.py │ └── ft_main.py ├── kn │ ├── __init__.py │ ├── kn_hparams.py │ ├── kn_main.py │ └── knowledge_neurons │ │ ├── LICENSE │ │ ├── README.md │ │ ├── knowledge_neurons │ │ ├── __init__.py │ │ ├── data.py │ │ ├── knowledge_neurons.py │ │ └── patch.py │ │ ├── pararel_evaluate.py │ │ ├── plot_pararel_results.py │ │ ├── requirements.txt │ │ ├── setup.py │ │ └── tests │ │ └── tests.py └── mend │ ├── README.md │ ├── __init__.py │ ├── algs │ ├── efk.py │ ├── enn.py │ ├── ft.py │ └── mend.py │ ├── config │ ├── alg │ │ ├── efk.yaml │ │ ├── enn.yaml │ │ ├── ft.yaml │ │ └── mend.yaml │ ├── config.yaml │ ├── experiment │ │ ├── fc.yaml │ │ ├── gen.yaml │ │ └── qa.yaml │ └── model │ │ ├── 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 │ ├── data_classes │ ├── fever.py │ ├── nq.py │ ├── wiki.py │ └── zsre.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 │ ├── requirements.txt │ ├── run.py │ ├── trainer.py │ └── utils.py ├── data-analysis.ipynb ├── dsets ├── __init__.py ├── attr_snippets.py ├── counterfact.py ├── knowns.py ├── tfidf_stats.py └── zsre.py ├── experiments ├── __init__.py ├── causal_trace.py ├── evaluate.py ├── py │ ├── demo.py │ ├── eval_utils_counterfact.py │ └── eval_utils_zsre.py ├── summarize.py ├── sweep.py └── tracing.py ├── globals.yml ├── hparams ├── FT │ ├── 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 ├── KE │ ├── gpt2-xl.json │ ├── gpt2-xl_CF.json │ └── gpt2-xl_zsRE.json ├── KN │ └── gpt2-xl.json ├── MEMIT │ ├── EleutherAI_gpt-j-6B.json │ └── gpt2-xl.json ├── MEND │ ├── EleutherAI_gpt-j-6B.json │ ├── EleutherAI_gpt-j-6B_CF.json │ ├── gpt2-xl.json │ ├── gpt2-xl_CF.json │ └── gpt2-xl_zsRE.json └── ROME │ ├── EleutherAI_gpt-j-6B.json │ ├── gpt2-large.json │ ├── gpt2-medium.json │ └── gpt2-xl.json ├── memit ├── __init__.py ├── compute_ks.py ├── compute_z.py ├── memit_hparams.py └── memit_main.py ├── notebooks ├── average_causal_effects.ipynb ├── causal_trace.ipynb ├── causal_trace_frozen_mlp_attn.ipynb ├── rome.ipynb └── vis │ ├── table_population.ipynb │ ├── table_population_zsre.ipynb │ └── visualize_sweeps.ipynb ├── requirements.txt ├── rome ├── README.md ├── __init__.py ├── compute_u.py ├── compute_v.py ├── layer_stats.py ├── repr_tools.py ├── rome_hparams.py ├── rome_main.py └── tok_dataset.py ├── scripts ├── causal_trace.sh ├── colab_reqs │ ├── additional.txt │ └── rome.txt ├── collect_layer_stats.sh ├── ipynb_drop_output.py ├── rome.yml ├── setup_clean_ipynb.sh └── setup_conda.sh └── util ├── __init__.py ├── fewshot_utils.py ├── generate.py ├── globals.py ├── hparams.py ├── logit_lens.py ├── nethook.py ├── perplexity.py └── runningstats.py /CITATION.cff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/CITATION.cff -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/README.md -------------------------------------------------------------------------------- /third_party/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/LICENSE -------------------------------------------------------------------------------- /third_party/baselines/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/README.md -------------------------------------------------------------------------------- /third_party/baselines/efk/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/efk/__init__.py -------------------------------------------------------------------------------- /third_party/baselines/ft/__init__.py: -------------------------------------------------------------------------------- 1 | from .ft_main import FTHyperParams, apply_ft_to_model, execute_ft 2 | -------------------------------------------------------------------------------- /third_party/baselines/ft/ft_hparams.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/ft/ft_hparams.py -------------------------------------------------------------------------------- /third_party/baselines/ft/ft_main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/ft/ft_main.py -------------------------------------------------------------------------------- /third_party/baselines/kn/__init__.py: -------------------------------------------------------------------------------- 1 | from .kn_main import KNHyperParams, apply_kn_to_model 2 | -------------------------------------------------------------------------------- /third_party/baselines/kn/kn_hparams.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/kn/kn_hparams.py -------------------------------------------------------------------------------- /third_party/baselines/kn/kn_main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/kn/kn_main.py -------------------------------------------------------------------------------- /third_party/baselines/kn/knowledge_neurons/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/kn/knowledge_neurons/LICENSE -------------------------------------------------------------------------------- /third_party/baselines/kn/knowledge_neurons/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/kn/knowledge_neurons/README.md -------------------------------------------------------------------------------- /third_party/baselines/kn/knowledge_neurons/knowledge_neurons/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/kn/knowledge_neurons/knowledge_neurons/__init__.py -------------------------------------------------------------------------------- /third_party/baselines/kn/knowledge_neurons/knowledge_neurons/data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/kn/knowledge_neurons/knowledge_neurons/data.py -------------------------------------------------------------------------------- /third_party/baselines/kn/knowledge_neurons/knowledge_neurons/knowledge_neurons.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/kn/knowledge_neurons/knowledge_neurons/knowledge_neurons.py -------------------------------------------------------------------------------- /third_party/baselines/kn/knowledge_neurons/knowledge_neurons/patch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/kn/knowledge_neurons/knowledge_neurons/patch.py -------------------------------------------------------------------------------- /third_party/baselines/kn/knowledge_neurons/pararel_evaluate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/kn/knowledge_neurons/pararel_evaluate.py -------------------------------------------------------------------------------- /third_party/baselines/kn/knowledge_neurons/plot_pararel_results.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/kn/knowledge_neurons/plot_pararel_results.py -------------------------------------------------------------------------------- /third_party/baselines/kn/knowledge_neurons/requirements.txt: -------------------------------------------------------------------------------- 1 | transformers 2 | einops 3 | numpy 4 | torch==1.13.1 5 | seaborn -------------------------------------------------------------------------------- /third_party/baselines/kn/knowledge_neurons/setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/kn/knowledge_neurons/setup.py -------------------------------------------------------------------------------- /third_party/baselines/kn/knowledge_neurons/tests/tests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/kn/knowledge_neurons/tests/tests.py -------------------------------------------------------------------------------- /third_party/baselines/mend/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/README.md -------------------------------------------------------------------------------- /third_party/baselines/mend/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/__init__.py -------------------------------------------------------------------------------- /third_party/baselines/mend/algs/efk.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/algs/efk.py -------------------------------------------------------------------------------- /third_party/baselines/mend/algs/enn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/algs/enn.py -------------------------------------------------------------------------------- /third_party/baselines/mend/algs/ft.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/algs/ft.py -------------------------------------------------------------------------------- /third_party/baselines/mend/algs/mend.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/algs/mend.py -------------------------------------------------------------------------------- /third_party/baselines/mend/config/alg/efk.yaml: -------------------------------------------------------------------------------- 1 | # @package _global_ 2 | 3 | alg: efk 4 | train_base: False 5 | lr: 1e-5 6 | -------------------------------------------------------------------------------- /third_party/baselines/mend/config/alg/enn.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/alg/enn.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/alg/ft.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/alg/ft.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/alg/mend.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/alg/mend.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/config.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/experiment/fc.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/experiment/fc.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/experiment/gen.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/experiment/gen.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/experiment/qa.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/experiment/qa.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/model/bart-base.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/model/bart-base.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/model/bert-base.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/model/bert-base.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/model/distilgpt2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/model/distilgpt2.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/model/gpt2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/model/gpt2.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/model/gpt2large.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/model/gpt2large.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/model/gpt2medium.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/model/gpt2medium.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/model/gpt2xl.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/model/gpt2xl.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/model/gptj.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/model/gptj.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/model/gptneo27.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/model/gptneo27.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/model/t5large.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/model/t5large.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/model/t5small.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/model/t5small.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/model/t5xl.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/model/t5xl.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/config/model/t5xxl.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/config/model/t5xxl.yaml -------------------------------------------------------------------------------- /third_party/baselines/mend/data_classes/fever.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/data_classes/fever.py -------------------------------------------------------------------------------- /third_party/baselines/mend/data_classes/nq.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/data_classes/nq.py -------------------------------------------------------------------------------- /third_party/baselines/mend/data_classes/wiki.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/data_classes/wiki.py -------------------------------------------------------------------------------- /third_party/baselines/mend/data_classes/zsre.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/data_classes/zsre.py -------------------------------------------------------------------------------- /third_party/baselines/mend/editable_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/editable_model.py -------------------------------------------------------------------------------- /third_party/baselines/mend/efk_hparams.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/efk_hparams.py -------------------------------------------------------------------------------- /third_party/baselines/mend/efk_main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/efk_main.py -------------------------------------------------------------------------------- /third_party/baselines/mend/hooks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/hooks.py -------------------------------------------------------------------------------- /third_party/baselines/mend/losses.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/losses.py -------------------------------------------------------------------------------- /third_party/baselines/mend/mend_hparams.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/mend_hparams.py -------------------------------------------------------------------------------- /third_party/baselines/mend/mend_main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/mend_main.py -------------------------------------------------------------------------------- /third_party/baselines/mend/models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/models.py -------------------------------------------------------------------------------- /third_party/baselines/mend/nn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/nn.py -------------------------------------------------------------------------------- /third_party/baselines/mend/oracle.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/oracle.py -------------------------------------------------------------------------------- /third_party/baselines/mend/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/requirements.txt -------------------------------------------------------------------------------- /third_party/baselines/mend/run.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/run.py -------------------------------------------------------------------------------- /third_party/baselines/mend/trainer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/trainer.py -------------------------------------------------------------------------------- /third_party/baselines/mend/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/baselines/mend/utils.py -------------------------------------------------------------------------------- /third_party/data-analysis.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/data-analysis.ipynb -------------------------------------------------------------------------------- /third_party/dsets/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/dsets/__init__.py -------------------------------------------------------------------------------- /third_party/dsets/attr_snippets.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/dsets/attr_snippets.py -------------------------------------------------------------------------------- /third_party/dsets/counterfact.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/dsets/counterfact.py -------------------------------------------------------------------------------- /third_party/dsets/knowns.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/dsets/knowns.py -------------------------------------------------------------------------------- /third_party/dsets/tfidf_stats.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/dsets/tfidf_stats.py -------------------------------------------------------------------------------- /third_party/dsets/zsre.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/dsets/zsre.py -------------------------------------------------------------------------------- /third_party/experiments/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /third_party/experiments/causal_trace.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/experiments/causal_trace.py -------------------------------------------------------------------------------- /third_party/experiments/evaluate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/experiments/evaluate.py -------------------------------------------------------------------------------- /third_party/experiments/py/demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/experiments/py/demo.py -------------------------------------------------------------------------------- /third_party/experiments/py/eval_utils_counterfact.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/experiments/py/eval_utils_counterfact.py -------------------------------------------------------------------------------- /third_party/experiments/py/eval_utils_zsre.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/experiments/py/eval_utils_zsre.py -------------------------------------------------------------------------------- /third_party/experiments/summarize.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/experiments/summarize.py -------------------------------------------------------------------------------- /third_party/experiments/sweep.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/experiments/sweep.py -------------------------------------------------------------------------------- /third_party/experiments/tracing.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/experiments/tracing.py -------------------------------------------------------------------------------- /third_party/globals.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/globals.yml -------------------------------------------------------------------------------- /third_party/hparams/FT/EleutherAI_gpt-j-6B_constr.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/FT/EleutherAI_gpt-j-6B_constr.json -------------------------------------------------------------------------------- /third_party/hparams/FT/EleutherAI_gpt-j-6B_unconstr.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/FT/EleutherAI_gpt-j-6B_unconstr.json -------------------------------------------------------------------------------- /third_party/hparams/FT/gpt2-large_constr.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/FT/gpt2-large_constr.json -------------------------------------------------------------------------------- /third_party/hparams/FT/gpt2-medium_constr.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/FT/gpt2-medium_constr.json -------------------------------------------------------------------------------- /third_party/hparams/FT/gpt2-xl_attn.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/FT/gpt2-xl_attn.json -------------------------------------------------------------------------------- /third_party/hparams/FT/gpt2-xl_constr.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/FT/gpt2-xl_constr.json -------------------------------------------------------------------------------- /third_party/hparams/FT/gpt2-xl_unconstr.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/FT/gpt2-xl_unconstr.json -------------------------------------------------------------------------------- /third_party/hparams/KE/gpt2-xl.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/KE/gpt2-xl.json -------------------------------------------------------------------------------- /third_party/hparams/KE/gpt2-xl_CF.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/KE/gpt2-xl_CF.json -------------------------------------------------------------------------------- /third_party/hparams/KE/gpt2-xl_zsRE.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/KE/gpt2-xl_zsRE.json -------------------------------------------------------------------------------- /third_party/hparams/KN/gpt2-xl.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/KN/gpt2-xl.json -------------------------------------------------------------------------------- /third_party/hparams/MEMIT/EleutherAI_gpt-j-6B.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/MEMIT/EleutherAI_gpt-j-6B.json -------------------------------------------------------------------------------- /third_party/hparams/MEMIT/gpt2-xl.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/MEMIT/gpt2-xl.json -------------------------------------------------------------------------------- /third_party/hparams/MEND/EleutherAI_gpt-j-6B.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/MEND/EleutherAI_gpt-j-6B.json -------------------------------------------------------------------------------- /third_party/hparams/MEND/EleutherAI_gpt-j-6B_CF.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/MEND/EleutherAI_gpt-j-6B_CF.json -------------------------------------------------------------------------------- /third_party/hparams/MEND/gpt2-xl.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/MEND/gpt2-xl.json -------------------------------------------------------------------------------- /third_party/hparams/MEND/gpt2-xl_CF.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/MEND/gpt2-xl_CF.json -------------------------------------------------------------------------------- /third_party/hparams/MEND/gpt2-xl_zsRE.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/MEND/gpt2-xl_zsRE.json -------------------------------------------------------------------------------- /third_party/hparams/ROME/EleutherAI_gpt-j-6B.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/ROME/EleutherAI_gpt-j-6B.json -------------------------------------------------------------------------------- /third_party/hparams/ROME/gpt2-large.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/ROME/gpt2-large.json -------------------------------------------------------------------------------- /third_party/hparams/ROME/gpt2-medium.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/ROME/gpt2-medium.json -------------------------------------------------------------------------------- /third_party/hparams/ROME/gpt2-xl.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/hparams/ROME/gpt2-xl.json -------------------------------------------------------------------------------- /third_party/memit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/memit/__init__.py -------------------------------------------------------------------------------- /third_party/memit/compute_ks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/memit/compute_ks.py -------------------------------------------------------------------------------- /third_party/memit/compute_z.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/memit/compute_z.py -------------------------------------------------------------------------------- /third_party/memit/memit_hparams.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/memit/memit_hparams.py -------------------------------------------------------------------------------- /third_party/memit/memit_main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/memit/memit_main.py -------------------------------------------------------------------------------- /third_party/notebooks/average_causal_effects.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/notebooks/average_causal_effects.ipynb -------------------------------------------------------------------------------- /third_party/notebooks/causal_trace.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/notebooks/causal_trace.ipynb -------------------------------------------------------------------------------- /third_party/notebooks/causal_trace_frozen_mlp_attn.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/notebooks/causal_trace_frozen_mlp_attn.ipynb -------------------------------------------------------------------------------- /third_party/notebooks/rome.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/notebooks/rome.ipynb -------------------------------------------------------------------------------- /third_party/notebooks/vis/table_population.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/notebooks/vis/table_population.ipynb -------------------------------------------------------------------------------- /third_party/notebooks/vis/table_population_zsre.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/notebooks/vis/table_population_zsre.ipynb -------------------------------------------------------------------------------- /third_party/notebooks/vis/visualize_sweeps.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/notebooks/vis/visualize_sweeps.ipynb -------------------------------------------------------------------------------- /third_party/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/requirements.txt -------------------------------------------------------------------------------- /third_party/rome/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/rome/README.md -------------------------------------------------------------------------------- /third_party/rome/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/rome/__init__.py -------------------------------------------------------------------------------- /third_party/rome/compute_u.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/rome/compute_u.py -------------------------------------------------------------------------------- /third_party/rome/compute_v.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/rome/compute_v.py -------------------------------------------------------------------------------- /third_party/rome/layer_stats.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/rome/layer_stats.py -------------------------------------------------------------------------------- /third_party/rome/repr_tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/rome/repr_tools.py -------------------------------------------------------------------------------- /third_party/rome/rome_hparams.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/rome/rome_hparams.py -------------------------------------------------------------------------------- /third_party/rome/rome_main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/rome/rome_main.py -------------------------------------------------------------------------------- /third_party/rome/tok_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/rome/tok_dataset.py -------------------------------------------------------------------------------- /third_party/scripts/causal_trace.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/scripts/causal_trace.sh -------------------------------------------------------------------------------- /third_party/scripts/colab_reqs/additional.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/scripts/colab_reqs/additional.txt -------------------------------------------------------------------------------- /third_party/scripts/colab_reqs/rome.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/scripts/colab_reqs/rome.txt -------------------------------------------------------------------------------- /third_party/scripts/collect_layer_stats.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/scripts/collect_layer_stats.sh -------------------------------------------------------------------------------- /third_party/scripts/ipynb_drop_output.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/scripts/ipynb_drop_output.py -------------------------------------------------------------------------------- /third_party/scripts/rome.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/scripts/rome.yml -------------------------------------------------------------------------------- /third_party/scripts/setup_clean_ipynb.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/scripts/setup_clean_ipynb.sh -------------------------------------------------------------------------------- /third_party/scripts/setup_conda.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/scripts/setup_conda.sh -------------------------------------------------------------------------------- /third_party/util/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/util/__init__.py -------------------------------------------------------------------------------- /third_party/util/fewshot_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/util/fewshot_utils.py -------------------------------------------------------------------------------- /third_party/util/generate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/util/generate.py -------------------------------------------------------------------------------- /third_party/util/globals.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/util/globals.py -------------------------------------------------------------------------------- /third_party/util/hparams.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/util/hparams.py -------------------------------------------------------------------------------- /third_party/util/logit_lens.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/util/logit_lens.py -------------------------------------------------------------------------------- /third_party/util/nethook.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/util/nethook.py -------------------------------------------------------------------------------- /third_party/util/perplexity.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/util/perplexity.py -------------------------------------------------------------------------------- /third_party/util/runningstats.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/belief-localization/HEAD/third_party/util/runningstats.py --------------------------------------------------------------------------------