zjunlp / EasyEdit

[知识编辑] [ACL 2024] An Easy-to-use Knowledge Editing Framework for LLMs.
https://zjunlp.github.io/project/KnowEdit
MIT License
1.63k stars 200 forks source link

LoRA does not work #315

Closed Tot-ziens closed 3 weeks ago

Tot-ziens commented 3 weeks ago

LoRA editing does not work, the pre-edit outputs: Snipaste_2024-06-26_20-18-58

and post-edit outputs: Snipaste_2024-06-26_20-15-01

https://github.com/zjunlp/EasyEdit/commit/d62ae568c87144384e5d94b4f8a75ad26a1083fa#diff-35c40720142e2be3428100729e86956ac7c6725491150b62159171bf830946f9

In this Refactor and in line 333 and 338 in editor.py, you deleted keep_original_weight paramter, which caused the model edit based on LoRA to delete the adapter weights and only keep the base model. Is this a bug, or am I using LoRA the wrong way?

XeeKee commented 3 weeks ago

Thank you very much for your attention to EasyEdit. We will fix this bug in the near future.

pengzju commented 3 weeks ago

Since there are two editing scenarios:

pengzju commented 3 weeks ago

There doesn't seem to be any bug in the code. I hope this answers your question.

Tot-ziens commented 3 weeks ago

There doesn't seem to be any bug in the code. I hope this answers your question.

Thanks a lot. I have found how this parameter works.