jianghoucheng / AlphaEdit

36 stars 4 forks source link

AlphaEdit

alt text Figure: This is the overall architecture of our AlphaEdit method.

Requirements

At least one A40 48G GPU.

Quick Start

An example for editing Llama3 (8B) on counterfact dataset using NSE

1. Edit Llama3 (8B) model

python3 -m experiments.evaluate     --alg_name=AlphaEdit     --model_name=meta-llama/Meta-Llama-3-8B-Instruct     --hparams_fname=Llama3-8B.json --ds_name=mcf --dataset_size_limit=2000    --num_edits=100 --downstream_eval_steps=5

This command runs an evaluation script for the NSE algorithm using the Llama3-8b-instruct. Below are the explanations for each argument:

Acknowledgment

Our code is based on MEMIT.