-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Continual Editing #220
Comments
Thank you for your attention, if you would like to edit sequentially. You can set
|
Thanks for your quick reply, about this line: |
In our paper, the sequential editing used is to edit one item and test the performance of the other. For example, after editing the second item, use the current checkpoint to test the performance of the second item, and the cycle repeats. "This aligns with our original paper." The pseudocode looks like this: for i, request in tqdm(enumerate(requests)):
edited_model, weights_copy = edit_func(model, tok, request, hparams)
edit_evaluation(all_metrics, request, edited_model, hparams, tok, i)
with torch.no_grad():
for k, v in weights_copy.items():
nethook.get_parameter(model, k)[...] = v.to(f'cuda:{hparams.device}') However, a more scientific test method is to edit N items and use this checkpoint to test the performance of 1-N. You can appreciate the difference. If you go this route, the pseudocode looks like this: for i, request in tqdm(enumerate(requests)):
edited_model, weights_copy = edit_func(model, tok, request, hparams)
for i, request in tqdm(enumerate(requests)):
edit_evaluation(all_metrics, request, edited_model, hparams, tok, i) |
If you have any questions, please feel free to leave a message. Thank you again for your attention. 😊 |
Hi, do you have any further issues? |
No, thanks for the detailed comment! |
Hi, thanks again for this excellent framework and papers, In you paper youve talked about "Continual Editing", is there a piece of code that handles this experiments? if not do you have any idea how to implement it using the current code, with minimum amount of changes?
Please share your thoughts.
Thank again!
The text was updated successfully, but these errors were encountered: