GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - eric-mitchell/serac: Semi-Parametric Editing with a Retrieval-Augmented Counterfactual Model

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
algs
algs
 
 
config
config
 
 
data_classes
data_classes
 
 
scripts
scripts
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
editable_model.py
editable_model.py
 
 
hooks.py
hooks.py
 
 
losses.py
losses.py
 
 
metrics.py
metrics.py
 
 
models.py
models.py
 
 
nn.py
nn.py
 
 
requirements.txt
requirements.txt
 
 
run.py
run.py
 
 
trainer.py
trainer.py
 
 
utils.py
utils.py
 
 

Repository files navigation

Semi-Parametric Editing with a Retrieval-Augmented Counterfactual Model

Code and data for the ICML 2022 paper Memory-based Model Editing at Scale.

See the paper here and the project website here.

Setup

Environment

This codebase uses Python 3.7.9. Other versions may work as well.

Create a virtualenv (pyenv can help with this) and install the dependencies:

$ python -m venv env
$ source env/bin/activate
(env) $ pip install -r requirements.txt

Data

You can download the data needed for this project from this Google Drive link. You just need to unzip the archive into the top-level serac directory.

Running the code

You can run the code with:

(env) $ python -m run +alg=ALG +experiment=EXP +model=MODEL

See the scripts/ directory for examples. ALG may be one of:

  • rep [SERAC]
  • gtn [MEND; Mitchell et al., 2022]
  • enn [Editable Neural Networks; Sinitsin et al., 2020]
  • lu [lookup cache baseline]
  • ft [fine-tuning baseline]

The EXP argument may be one of:

  • zsre [question-answering; must be used with MODEL=t5large]
  • fnli [fact-checking; must be used with MODEL=bert-base]
  • sent [sentiment editing; must be used with MODEL=blender-small]

Citing the paper

If this repository is useful for your own research, you can cite our work with the following BibTeX entry:

@inproceedings{mitchell2022memory,
    title={Memory-Based Model Editing at Scale},
    author={Mitchell, Eric and Lin, Charles and Bosselut, Antoine and Finn, Chelsea and Manning, Christopher D.},
    booktitle={International Conference on Machine Learning},
    url={https://arxiv.org/pdf/2206.06520.pdf},
    year={2022},
}  

About

Semi-Parametric Editing with a Retrieval-Augmented Counterfactual Model

Resources

Readme
MIT license
Activity

Stars

74 stars

Watchers

2 watching

Forks

6 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.