Comments (14)
您好,我建议您参考论文的第二章节针对编辑定义的阐述。
编辑每条样本都会产生新的model weights,测试新的模型权重的输出即可得到四个指标(Reliability, Generalization, Locality, Portability)。您可以参考zsre_mend_eval_portability_gpt4 .json
中的样本格式
prompt
代表编辑输入target_new
代表编辑输出loc
和loc_ans
用于测试localityportability
用于测试Portability
from easyedit.
如果此回复解决了您的问题,请帮忙关闭此issue
from easyedit.
您好,我建议您参考论文的第二章节针对编辑定义的阐述。
编辑每条样本都会产生新的model weights,测试新的模型权重的输出即可得到四个指标(Reliability, Generalization, Locality, Portability)。您可以参考
zsre_mend_eval_portability_gpt4 .json
中的样本格式
prompt
代表编辑输入target_new
代表编辑输出loc
和loc_ans
用于测试localityportability
用于测试Portability
请问zsre_mend_eval_portability_gpt4 .json就是论文表2测试ZsRE所使用的数据集吗?如果不是,是使用哪一个json呢?另外还有COUNTERFACT。因为我后续可能有实验需要进行对标,烦请指明一下,谢谢!
from easyedit.
您好,我建议您参考论文的第二章节针对编辑定义的阐述。
编辑每条样本都会产生新的model weights,测试新的模型权重的输出即可得到四个指标(Reliability, Generalization, Locality, Portability)。您可以参考zsre_mend_eval_portability_gpt4 .json
中的样本格式
prompt
代表编辑输入target_new
代表编辑输出loc
和loc_ans
用于测试localityportability
用于测试Portability请问zsre_mend_eval_portability_gpt4 .json就是论文表2测试ZsRE所使用的数据集吗?如果不是,是使用哪一个json呢?另外还有COUNTERFACT。因为我后续可能有实验需要进行对标,烦请指明一下,谢谢!
表2使用的数据分别为:
- zsre:
zsre_mend_eval.json
- counterfact:
counterfact-original-edit.json
如果您需要测试portability请使用zsre_mend_eval_portability_gpt4 .json
from easyedit.
您好,我建议您参考论文的第二章节针对编辑定义的阐述。
编辑每条样本都会产生新的model weights,测试新的模型权重的输出即可得到四个指标(Reliability, Generalization, Locality, Portability)。您可以参考zsre_mend_eval_portability_gpt4 .json
中的样本格式
prompt
代表编辑输入target_new
代表编辑输出loc
和loc_ans
用于测试localityportability
用于测试Portability请问zsre_mend_eval_portability_gpt4 .json就是论文表2测试ZsRE所使用的数据集吗?如果不是,是使用哪一个json呢?另外还有COUNTERFACT。因为我后续可能有实验需要进行对标,烦请指明一下,谢谢!
表2使用的数据分别为:
- zsre:
zsre_mend_eval.json
- counterfact:
counterfact-original-edit.json
如果您需要测试portability请使用zsre_mend_eval_portability_gpt4 .json
好的,感谢!
from easyedit.
你好!zsre_mend_eval.json中有77个待编辑答案"alt"是空的,导致编辑错误,请问怎么处理?
from easyedit.
你好!zsre_mend_eval.json中有77个待编辑答案"alt"是空的,导致编辑错误,请问怎么处理?
您好,这个是rome在处理数据时的疏忽,在我们的实验中直接忽略了这些数据
from easyedit.
你好!对于CounterFact数据集counterfact-original-edit.json,我有一些疑问,还请指教一下:
1、paraphrase_prompts、neighborhood_prompts、attribute_prompts、generation_prompts是测试的哪些指标?观察neighborhood_prompts和attribute_prompts,它们的prompt似乎差别不大,是否用于测试Locality?而generation_prompts似乎和paraphrase_prompts差别不大,是否用于测试Generality?
2、代码好像不支持多条rephrase_prompts的测试。这对zsre数据集没事,因为它的测试都只有一条。但是在counterfact中,比如paraphrase_prompts就有两条,而neighborhood_prompts则接近10条。是否在测试时只随机选择一条进行测试?
3、locality_inputs中的ground_truth在counterfact数据集中似乎并没有提供,需要怎么处理?对于locality,我的理解是对比模型编辑前后对编辑无关prompt的预测的相似度。那么ground_truth似乎并不需要,是否可以省略?但是代码中好像是写死了需要读取ground_truth的。
from easyedit.
- 问题一:抱歉由于我的疏忽上传了ROME原始版本的cf数据集,我已经将数据集的Google Drive、百度网盘替换,请您再下载即可。数据包含的字段为
prompt
,target_new
,ground_truth
,rephrase
,locality
,locality_nas
与EasyEdit对应。针对您说的paraphrase_prompts、neighborhood_prompts、attribute_prompts、generation_prompts,这是ROME原论文的概念,具体而言paraphrase_prompts和generation_prompts用于测试Generalization, neighborhood_prompts和attribute_prompts用于测试Locality,在我们的实验设置中随机选择了一条样本作为测试。 - 问题二:您好,我已经更新了数据集,即用随机选择一条进行测试。如果您想要一对多(例如一条编辑对应多个rephrase,多个neighborhood_prompts)取平均,您需要自行更改easyedit的代码,目前工具并未支持此功能。
- 问题三:这是一个很好的问题,理论上并不需要ground_truth,但是在我们的实验设置中,采用条件生成的方式来进行预测
- 具体而言,通过(prompt+target_new_token_0)来预测target_new_token_1
- 通过(prompt+target_new_token_0+target_new_token_1)来预测target_new_token_2
- 通过(prompt+target_new_token_0+target_new_token_1+target_new_token_2)来预测target_new_token_3
- 以此类推
- 最终得到locality的输出
(如果您想省略ground_truth,可以更改evaluation的方式,通过generate来对比生成,但很抱歉,这个功能暂未支持)
感谢您宝贵的建议。
from easyedit.
感谢你的详细解答!观察了代码,关于问题3,我理解你的意思应该是:
- prompt -> target_new_token_0
- prompt + ground_truth_token_0 -> target_new_token_1
- prompt + ground_truth_token_0 + ground_truth_token_1 -> target_new_token_2
- ...
from easyedit.
是的,非常准确
from easyedit.
你好!新换的counterfact数据集中好像没有subject
from easyedit.
已经更新了
from easyedit.
如果解决了您的问题,请帮忙关闭此issue
from easyedit.
Related Issues (20)
- Llama2 ROME index out of bound HOT 4
- ROME + GPT-2XL + zSRE replicate results HOT 6
- ROME + llama-2-7b +" Can't load the configuration of './hugging_cache/llama-2-7b'" HOT 9
- Any batch size to recommend for MEMIT batch edit? HOT 4
- does not appear to have a file named config.json HOT 2
- personality edit code HOT 4
- personality edit code
- personality edit code
- Does EasyEdit support training on H800? HOT 5
- L1-distance between original and edited model weights is 0!! HOT 2
- Knowledge Editing with BERT on FEVER Dataset HOT 1
- 在使用KN编辑Chatglm2-6b时出现TypeError报错 HOT 2
- Test case for ChatGLM2 HOT 2
- KN doesn't work on Llama model HOT 6
- Provide MEND and SERAC trained models HOT 9
- Implement performance on ground truth in pre and post measures HOT 1
- Git too fast, can't see the result. HOT 1
- 能否出个qwen的相关tutorial HOT 4
- About Baichuan HOT 2
- I use two A40 GPUs and KN to edit llama2-7b. But the result is still OOM. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easyedit.