Giter Site home page Giter Site logo

malmen-hf's Introduction

MALMEN: MAssive Language Model Editing Network

This is the official repo of our ICLR'24 paper Massive Editing for Large Language Models via Meta Learning. You can email [email protected] for any issue.

Setup

You can create a virtual environment and install the dependencies via Anaconda.

$ conda create -n malmen
$ conda activate malmen
(malmen)$ pip install -r requirements.txt

The datasets for all experiments presented in the manuscript are available at this Google Drive link. You need to specify the paths to the json files in config.data.train_path and config.data.valid_path. You should also specify an empty folder in config.editor.cache_dir to store cache files generated during running the code.

Running

You can set all hyper-parameters via modifying the yaml files in the folder config. You should run the code by executing the main.py file. You can also specify the hyper-parameters on the command line.

(malmen)$ python main.py  \
    data=zsre  \
    model=gpt-j  \
    editor=malmen

Acknowledgement

We thank the implementation of MEND and MEMIT, which inspires some code in this repo.

Citation

@inproceedings{tan23malmen,
    title={Massive Editing for Large Language Models via Meta Learning},
    author={Chenmien Tan and Ge Zhang and Jie Fu},
    booktitle={International Conference on Learning Representations},
    year={2024},
    url={https://openreview.net/pdf?id=L6L1CJQ2PE}
}

malmen-hf's People

Contributors

chenmientan avatar

Stargazers

 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.