Coder Social home page Coder Social logo

serac's Introduction

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:

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},
}  

serac's People

Contributors

eric-mitchell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.